Hi, guys, I have a global variable in my event sheet and I want to be able to change its value using Javascript how do I do this?
There is a special Scripting forum.
construct.net/en/forum/construct-3/scripting-51/set-value-global-variable-148584
There is a special Scripting forum. https://www.construct.net/en/forum/construct-3/scripting-51/set-value-global-variable-148584
https://www.construct.net/en/forum/construct-3/scripting-51/set-value-global-variable-148584
Thank you
Moved to scripting forum.
Look at the Integrating events with script example.
Develop games in your browser. Powerful, performant & highly capable.
Note that string syntax like that will be broken in advanced minification mode. If you want it to work even with advanced minification, use dot syntax:
runtime.globalVars.myglobalvar = value;