Playmaker Forum

PlayMaker News => General Discussion => Topic started by: shinodan on April 23, 2012, 02:32:09 AM

Title: Timers
Post by: shinodan on April 23, 2012, 02:32:09 AM
After looking at the playmaker grenade prefab and seeing its timer i wanted to use it for creating a displayable countdown timer that goes up a few seconds when an item is collected can anyone help me get an idea of how to go about that please? ive made a new game involving a little atom flying through a tunnel but the atom needs energy to stay alive so if you dont collect enough while flying the game ends.
Title: Re: Timers
Post by: justifun on May 09, 2012, 03:16:34 PM
You can simply give the atom a variable health and then subtract 1 per second from it or something.

if it gets to zero game over, or if you pick up a power up it adds 10 to it.

Then use that health variable to display either a number GUI element or translate that into a rectangle power bar or something.