hi, i need reset one or two global variables, for example, if the time is 0 the global variable "life and time" reset
One way is to create a couple of extra globals e.g. lifeInit and timeInit, and set them to the reset values.
When you want to reset "life" and "time" set them to lifeInit and timeInit.
i understand you, but i forgot that life have 6 global variables (7 in total), for each monster life put the value of the life on te monster on the screen and time only have one (seconds), so i need that when the time be 0 and the moinster have life, only this life reset, because when i destroyed the monster system add 15 seconds more to another monster on screen (in global variable time), if i set the value of "monster1" (example) the monster never lose life.
Why do you keep the monster life as a global variable? Never less you can add event that will check if time is 0, then reset all those life variables to what ever value you like.
event system -> compare global variable -> time <= 0
action system -> set global variable -> health1 = 10
action system -> set global variable -> health2 = 10
I have the solution, thanks friends
Develop games in your browser. Powerful, performant & highly capable.
can you give me the solution?