Hello , first of all thank you for this wonderful software.
My question is , how can i get data from C2 to html page , i want to display for example health,golden data in html page.
For example :
var goldenfromC2 = document.getElementById('golden');
sorry for my english <img src="smileys/smiley9.gif" border="0" align="middle" /> , i hope you understand me <img src="smileys/smiley36.gif" border="0" align="middle" /> .. have a nice day
Welcome to C2 for a start ^^
Thank you for answer ,
for example i have a global variable called `money` how can i send this data to my webpage can you give me an example please?
i did , "alert(this.runtime.all_global_vars);" but it returned me
i need display these global variables as text on my webpage not as text object on canvas
because i want to make Ui on html page.
No, directly in C2, create an event going like this :
EDIT : ho, and if you had logged the globals instead of alerting it, you would have seen that you can access those by hand too, no need to eval in C2.
Develop games in your browser. Powerful, performant & highly capable.
I did like so ,
it says money_outside_C2 is not defined