Hi, i'm making a game with spells but i don't know how to make a cooldown for them
example :
i press p to shoot a bullet
i have to wait 10 sec
then i can press p again and shoot another bullet
Use Timer behavior on the player. For example, when you cast a spell, set variable SpellEnabled=false and start a timer "cooldown". On timer event, set SpellEnabled=true
Develop games in your browser. Powerful, performant & highly capable.
Do i need to add a instence variable to the player or global variable
You can use instance or global, it's up to you.