Forum Discussion
ScottWeiner-152
2 months agoCommunity Member
Passing Objects between JS Triggers
I can't seem to pass an object between triggers in Javascript. In Trigger A, I have a let myTable; statement on the first line. Then I'm using Tabulator to create a myTable. In Trigger B, which ...
Nathan_Hilliard
2 months agoCommunity Member
Math's approach has a lot of great uses. As someone in his post mentions, window globals are also easy, but preferentially avoided. If you want something simple and straightforward, you can also assign references to Storyline text variables. For example:
// In one trigger script...
let myTable;
//... do some coding stuff with myTable
// make sure you have already created a SL text variable called myTable
GetPlayer().SetVar("myTable", myTable);
//-------------------------------------------------------------------------------------------------
// In another trigger script...
myTable = GetPlayer().GetVar("myTable");
//... do stuff with myTable as you normally would
- MathNotermans-92 months agoCommunity Member
Nathaniel 😉, we should start a company.
Nath+Math elearning tricks 😄