How to make a fuel gauge..

I am running a modified version of the "basic shoot em' up" template. I want the ship to have a fuel life of 20 seconds or so that resets when I collide with a gas can or the ship with be destroyed if the timer runs out. Is there a way to create a timer that will destroy my ship when it gets to zero, but can be reset when colliding with another actor? Thanks in advance!!!

Comments

  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    Make a universal attribute (integer), then make a stick for the gauge so that depending on the number in the attribute (0-180) the stick rotates. Make sure to make the numbers in the attribute 0-360 so that it acts like a circular gauge. :D
  • Rutmaker37Rutmaker37 Member Posts: 4
    I am not so much worried about making an actual gauge for the HUD, but rather making it where my ship will die if I do not collide with the fuel tanks..
  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    Ok I get it, make it so that every 1 second (or however long you want) change attribute game.fuel to game.fuel -1 Then say if game.fuel =0 then go to scene GameOver and change attribute game.fuel to (insert original fuel value)
  • Rutmaker37Rutmaker37 Member Posts: 4
    That did the trick! I didn't realize I need to make a separate rule for when the fuel attribute is equal to or less than 0.
  • frank067frank067 Member Posts: 56
    Im trying to do the same thing can you post a screen shoot of the additional input, please.
Sign In or Register to comment.