Timer for actions

Show off your games, demos and other (playable) creations.
Post Reply
ProfB
Prole
Posts: 4
Joined: Wed Oct 07, 2020 5:20 pm

Timer for actions

Post by ProfB »

Hello, guys.

I am trying to animate a death animation and here is what I am currently doing: when a collision is detected, I remove the dying element from the table I inserted it before, and when I do it, I'd like it to change it's image to a death one, and then be removed from the table. My problem is that the animation won't appear for too long, because when it changes its image, it's already gone. So I think I need some form of timer to not let it die while the game continues and to the animation stays on screen for a while.

Also, this "timer" system would be used for shooting intervals.

Thank you a lot, guys.
User avatar
pgimeno
Party member
Posts: 3550
Joined: Sun Oct 18, 2015 2:58 pm

Re: Timer for actions

Post by pgimeno »

Please don't open support requests in the Games and Creations forum. Use the Support and Development forum.

There are timer libraries readily available, or you can make your own.

The most popular is probably hump.timer from the hump suite: https://github.com/vrld/hump
Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests