Timer Question - need help please?
allc1865
Member, PRO Posts: 777
Hey Everyone
I need help with my timer. I'm trying to create a countdown timer with a custom font. So far I have the timer and the font, but it doesn't countdown. I was wondering if anyone could help me with this?
For my timer actor I have 9 rules set up that say when self.digit = 0, change image, and so on.
I put three of those actors in the scene (I did this because I only want my time to be in the minutes, i.e, 2:00, 1:53), unlocked them and said constrain attribute > self.digit to game.time%60 and so on...
Any help will be great.
Thanks in advance!
I need help with my timer. I'm trying to create a countdown timer with a custom font. So far I have the timer and the font, but it doesn't countdown. I was wondering if anyone could help me with this?
For my timer actor I have 9 rules set up that say when self.digit = 0, change image, and so on.
I put three of those actors in the scene (I did this because I only want my time to be in the minutes, i.e, 2:00, 1:53), unlocked them and said constrain attribute > self.digit to game.time%60 and so on...
Any help will be great.
Thanks in advance!
Best Answer
-
tatiang Posts: 11,949Two things confuse me:
(1) You created and shared a template but you're... not getting this to work yet?
(2) Is there a reason you didn't use the tried-and-true formulas here?
Once you get the digits to count correctly, it's just a matter of constraining the actor's images to the digit expression values and naming those images 0.png, 1.png, 2.png etc.
Also, here's a thread that discusses the OSTime Demo which is a fantastic tool for learning how to do all of this. The thread includes a link to another thread that has the download link for the demo. If for some reason that doesn't work, let me know and I can upload it for you.New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Answers
You might find this demo helpful although there are others on the forums: http://forums.gamesalad.com/discussion/comment/339812/#Comment_339812
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
That counts down from 60 seconds, so I added another digit and it counts down, however I'm setting the number using the self attribute "divisor" to something like "100" or "200" which sets the it 2 minutes if I set it to 200.
Do you mind taking a look at my file?
https://www.dropbox.com/s/qly497b2ppffgwx/timerGame.zip
Thanks.
Thanks.
If I get a chance tonight I'll look at your file but I can't promise anything.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Yes, I'm familiar with the link that you shared here: http://forums.gamesalad.com/discussion/comment/329495/#Comment_329495
then just use a change attribute for self.image to game.timeremaining..".png" and it will change automatically....
just search the threads for how to do this
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks for this! It also helps me a lot.... Your Awesome.... 8-)