How can I set my 3 digit countdown timer stay in 3 digit format all the way to zero?
My countdown timer starts at 180 for 3 minutes, how can I make it where it'll reach zero in this 000 format?
BTW I'm using Integer instead of the system's time.
Best Answers
-
Socks London, UK.Posts: 12,822
I'm not sure how you are ending the countdown, you don't say, so it's a bit of an open ended question, but this displays 180 to 000:
padInt(180- game.Time,3)
. . . . . . . .
So this, below, will display 180 to 000:
When [numeric expression] 180- game.Time > 0
--Display Text
----padInt(180- game.Time,3) -
tatiang Posts: 11,949
See this explanation of PadInt(): http://forums.gamesalad.com/discussion/comment/279520/#Comment_279520.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
-
Socks London, UK.Posts: 12,822
@Dell7730 said:
it endsDeep, profound even.
@Dell7730 said:
if Attribute game.countdown =0 then it's the end, lolThat's no real help, as you don't say what 'it's the end' means in real terms - it's neither a piece of mathematical information, coding information, design information, narrative or . . . . well or anything ! You're asking for technical input, so your response would ideally be technical.
But putting all that aside, try this:
. . . . . .
When [numeric expression] 180- game.Time > 0
--Display Text
----padInt(180- game.Time,3)
Otherwise:
--Display Text
----'it's the end'
Answers
it ends
if Attribute game.countdown =0 then it's the end, lol
thank you again, you guys rock as usual
if Attribute game.countdown =0 then Destroy this actor
that's basically and technically what happens in my game, lol
not trying to be difficult or anything, just simply how it is, lol
This should do it:
When [numeric expression] 180- game.Time =< 0
--Destroy
this is what I have right now that works based on your awesome expertise
inside my Display Text thingy... lol
padInt(game.Countdown,3)
and it does start at 180 and end at 000