also one can use the actorAttribute self.Time to track seconds & milliseconds displayText: exp: floor(self.Time) … use floorFunction so the milliseconds don't show
at 22 minutes of play/run the self.Time will read 1320 seconds
TSB uses game.Time … that's hour/minute/second/milliseconds … use this to help with self.Time … (just the stuff about seconds) the expressions used are in the Comments (wish this also had a download project!) === IMO a customFont timer that is so small is hardly worth the work
somewhat confused as minutes count-down and seconds count-up … or is the " * " denoting minus? (not criticizing; but the display is very small … if you are using Quicktime to record please select only the actual sceneSize to record) the word before the minutes could be removed and 22 minus seconds might work for clarity
i wanted to try the game.time previously and divide the whole num with 60 so i can get min but i dunno how to get the sec which is the remainder of the division. @mothermoose, it's small cos the embed function is no more, you can only view it full screen so the image can be seen properly.
It's ok, i've solved it, been looking the whole thing in the wrong direction. I am trying to display the custom font correctly instead of the timer and it's now working thx to OST Demo and TSB timer demo. it's something like this for the benefit of those who want to know.
floor(floor(( game.Timer %3600)/60)/10)..".png" (1st digit Min) floor((floor( game.Timer %3600)/60)%10)..".png" (2nd digit Min) floor(( game.Timer %60)/10)..".png" (1st digit Sec) floor( game.Timer %10)..".png" (2nd digit Sec) By combining both demos i was able to come out with this finally. And game.timer is just every 1 sec +1 to itself.
I have a simple problem with math... for a countdown timer, maybe i set an attribute, game.timer 500 as integer. i have the template working with text plain, but, using the constrain attribute for self.image with "floor( game.Game Timer %10)..".png"" dont work countdown in 3 and 3 seconds. whats its the correct value?
I made a counter for my game, i made a minute custom font separate from second custom font. so there are 2 font actors for minutes and 2 for seconds, when seconds turn to 60, minutes become = minutes+1 and seconds become zero again. simple and worked.
Yes, i have that, but i need it with a countdown This is for count real time: floor(floor(( game.Timer %3600)/60)/10)..".png" (1st digit Min) floor((floor( game.Timer %3600)/60)%10)..".png" (2nd digit Min) floor(( game.Timer %60)/10)..".png" (1st digit Sec) floor( game.Timer %10)..".png" (2nd digit Sec)
And i want to set, time to complete a level, ..500 sec And next the countdown, i can take the example, but when move time, countdown in 3 and 3 secons
I cant find a math to complete that, countdown time to image i have test alot of options of floor( game.Timer %10)..".png" (2nd digit Sec) ... If anyone go it maybe helpme..
Comments
Timer one sec
Change it to a minute
And make sure you stop the clock at 59 sec too
timer min +1 but it will still show the 60sec ,very strange
attribute sec and min
if{sec <60}
timer: every second sec +1
}
if{ sec =59 }
change attribute min=min+1
change attribute sec = 0
}
maybe you have a different timer rule somewhere else
displayText: exp: floor(self.Time) … use floorFunction so the milliseconds don't show
at 22 minutes of play/run the self.Time will read 1320 seconds
good video: Tshirtbooth's Displaying Time
TSB uses game.Time … that's hour/minute/second/milliseconds …
use this to help with self.Time … (just the stuff about seconds)
the expressions used are in the Comments
(wish this also had a download project!)
===
IMO a customFont timer that is so small is hardly worth the work
somewhat confused as minutes count-down and seconds count-up … or is the " * " denoting minus?
(not criticizing; but the display is very small … if you are using Quicktime to record please select only the actual sceneSize to record)
the word before the minutes could be removed and 22 minus seconds might work for clarity
@};- MH
@mothermoose, it's small cos the embed function is no more, you can only view it full screen so the image can be seen properly.
for just seconds display: do in ExpressionEditor and select the two self.Time … the other values you can type in
displays :59 seconds then :00
@};- MH
@};- MH
@};- MH
I am trying to display the custom font correctly instead of the timer and it's now working thx to OST Demo and TSB timer demo.
it's something like this for the benefit of those who want to know.
floor(floor(( game.Timer %3600)/60)/10)..".png" (1st digit Min)
floor((floor( game.Timer %3600)/60)%10)..".png" (2nd digit Min)
floor(( game.Timer %60)/10)..".png" (1st digit Sec)
floor( game.Timer %10)..".png" (2nd digit Sec)
By combining both demos i was able to come out with this finally.
And game.timer is just every 1 sec +1 to itself.
glad You solved it! … @GLGAMES
@};- MH
Nevermind, is too easy^^
for a countdown timer, maybe i set an attribute, game.timer 500 as integer.
i have the template working with text plain, but, using the constrain attribute for self.image with "floor( game.Game Timer %10)..".png"" dont work
countdown in 3 and 3 seconds. whats its the correct value?
This is for count real time:
floor(floor(( game.Timer %3600)/60)/10)..".png" (1st digit Min)
floor((floor( game.Timer %3600)/60)%10)..".png" (2nd digit Min)
floor(( game.Timer %60)/10)..".png" (1st digit Sec)
floor( game.Timer %10)..".png" (2nd digit Sec)
And i want to set, time to complete a level, ..500 sec
And next the countdown, i can take the example, but when move time, countdown in 3 and 3 secons
i have test alot of options of floor( game.Timer %10)..".png" (2nd digit Sec)
...
If anyone go it maybe helpme..