playMaker

Author Topic: Timers  (Read 1357 times)

shinodan

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • Shinozone
Timers
« on: April 22, 2012, 11:32:09 PM »
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
  • Full Member
  • *
  • Posts: 228
    • View Profile
Re: Timers
« Reply #1 on: May 09, 2012, 12: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.