How do I add time to a countdown timer?

OK so I have a countdown timer, counting down from 60 seconds in a scene. I have an actor, and when it appears and I shake the phone, I want the countdown time to increase 20 seconds. So say the countdown timer was at 24 seconds. The actor would appear, the user would shake the phone, and the time would go from 24 seconds to 44 seconds.

I've made this work using my score instead of time. So when the user shakes the phone, the score goes up by 5. But can I get the countdown timer to increase by 20 seconds? No. And it's driving me nuts haha.

Does anyone know how I can do this? It's just a simple countdown timer like the ones in the tshirtbooth gamesalad tutorials on youtube. Thankyou!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
    I don't know the specific tutorial you are referencing, but if you have an Attribute that keeps track of your time just add 20 to it when you want it to increase, like:

    timeLeft = timeLeft + 20

    Assuming your time attribute is named timeLeft.
Sign In or Register to comment.