Time under 1 sec get rounded to 1

ComputerWareComputerWare Member Posts: 10
edited August 2012 in Working with GS (Mac)
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

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    @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).

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ComputerWareComputerWare Member Posts: 10
    it is already... that's the strange part...
    -I might have found the answer - I just need to try it out.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited August 2012

    OK, please check back; I'd be interested in what else it was then... :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ComputerWareComputerWare Member Posts: 10
    I thought it was when one behavior took the table-value and saved it in a attribute that it rounded it, but it is not that problem...
Sign In or Register to comment.