Forum Discussion
AVT-Digital
4 years agoCommunity Member
Execute JavaScript - passing object to script?
Hi,
Does the Execute JavaScript pass the object which executed the script, to the script in any way?
I'm trying to get hold of the object in JavaScript which calls the script in a easy way so if...
ZsoltOlah
4 years agoSuper Hero
I'm not sure what exactly you mean by "object." The script you put in a JS trigger gets wrapped in a function and then executed from the user.js file based on the conditions and timing of the trigger. You can pass a variable using GetPlayer().GetVar() or set the SL variables using GetPlayer().SetVar(). Beyond that, you can't do too much. The only object you can interact with is the player.