Hello, I’m making a game in which you can buy potions. I would like one of the potions to have an effect on the character for a limited amount of time. However the character moves from scene to scene so I need a timer to continue to count when you change scenes. Is there a way to do that? It looks like there are only scene timers that only work until you leave the scene.
OK. I don’t really understand what that means. How can I learn more about it?
you use a global variable, just like you would use a timer.
Use a global variable boolean, that you toggle to true, once a timer effect applies.
then another event that checks if boolean (of a certain item) is true, you change your global variable to add TimeDelta()
as a subevent of if boolean (of a certain item) is true, you check the value of the Global variable that you use as a timer. and if that value is > then your desired time, you stop the effect be setting the boolean to false.
TimeDelta() is the expression that adds the value of the time passed, just like a timer would.
if you dont know what variables are, read a little about it on the wiki:
OK thanks. I’ll read about TimeDelta.