Forum Discussion
ScottWeiner-152
2 years 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 years 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-9
2 years agoCommunity Member
Nathaniel 😉, we should start a company.
Nath+Math elearning tricks 😄
Related Content
- 2 years ago
- 5 months ago
- 9 months ago
- 12 months ago