I made my platformer character to throw grenades. And this grenade should blow some time (say 3 seconds) after thrown. My problem is if I throw multiple grenades then how to do timer for individual grenades.
I think for each object works
if timer “blow” of granade is greater than x seconds
granade blow animation
There’s no need to use a Foreach. Just the condition that the object timer is > x seconds and the actions to explode it.
But you’ll need to add an object timer to each grenade as it is created.
Thanks, MrMen. I never knew about object timers. This helped a lot.