Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hello excuse my english,
How to do when i execute javascript of object browser in event sheet for get the result of javascript code to a global variable of construct ?
Thank you
If it does return a value, you can just set the value in an action:
globalvariable = browser.execjs("your code")
On function your_function
On some event
- browser.execjs("
/* do some stuff maybe async then */
c2_callFunction('your_function', ['string', 1]);
");
Develop games in your browser. Powerful, performant & highly capable.
Thank you very much !