Time under 1 sec get rounded to 1
Hi!
I am making this game, where I need it to handle times under 1 sec in the timer, and it gets the time from a table.
I can display the number right, but the timer will not use it as ex. 0.6 - then it will use 1.
I use it to destroy an actor after a short time (between 0.35 and 1 sec), but it is always about 1 sec.
And when I use numbers under 0.5 (0.49 ex.) it will display it for "0" sec - a very short flash.
Can anyone tell me how to do this?
I have also tried to make it as a rule. When self.time = "time from table" then destroy, but then it takes about 1 sec again before the actor disappear.
/Chris
I am making this game, where I need it to handle times under 1 sec in the timer, and it gets the time from a table.
I can display the number right, but the timer will not use it as ex. 0.6 - then it will use 1.
I use it to destroy an actor after a short time (between 0.35 and 1 sec), but it is always about 1 sec.
And when I use numbers under 0.5 (0.49 ex.) it will display it for "0" sec - a very short flash.
Can anyone tell me how to do this?
I have also tried to make it as a rule. When self.time = "time from table" then destroy, but then it takes about 1 sec again before the actor disappear.
/Chris
Comments
@ComputerWare
Hi Chris, change your table attributes from integer to real, that should do the trick. (Integers are used for whole numbers, real used for numbers with fractions).
-I might have found the answer - I just need to try it out.
OK, please check back; I'd be interested in what else it was then... :-)