playMaker

Author Topic: Timers  (Read 2964 times)

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Timers
« 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.

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: Timers
« Reply #1 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.