Timer Question

Fal01Fal01 Member Posts: 460
edited July 2012 in Working with GS (Mac)
Hi all,
I am trying to make a timer that counts down from 20 to 0,but every time you do a certain task you add on another 5 seconds
so you can prevent it getting to 0. If the time reaches 0 it's game over.

I would normally use interpolate for a countdown but it seems to need a pre-determined number to countdown from.

Any ideas would be greatly appreciated.

It’s not a bug – it’s an undocumented feature

Best Answer

  • Braydon_SFXBraydon_SFX Posts: 9,273
    Accepted Answer
    Create an integer attribute called Time - set this to 20.

    Then, create a Round Rules actor which will be placed on the scene where the player cannot see it.

    Go into the actor and put a timer:

    Every 1 second,
    change attribute game.Time to game.Time-1

    This will decrease the time by one second every second.
    Then, you would just add 5 seconds to the attribute when needed etc.

    Hope this helps.

Answers

  • Fal01Fal01 Member Posts: 460
    Cheers !

    It’s not a bug – it’s an undocumented feature

Sign In or Register to comment.