Game Development Community

Datablock fields return incorrectly?

by Morrock · in Torque Game Engine · 07/26/2008 (3:21 pm) · 3 replies

Hi there. I'm trying to get the value of a datablock's field, but it always returns slightly off. For example with a default starter.fps, the line echo(CrossbowExplosionSmokeEmitter.lifetimeMS) will return 224 (when the value in crossbow.cs is clearly 250) When I change the value in crossbow.cs to 500, the echo will return 480.

Why is it doing this, and is there any way to get the correct value? Any help/ideas are appreciated.

#1
07/26/2008 (5:41 pm)
Torsion can help you debug your script errors since it evaluates expressions that you highlight and wait a short moment while it gets the answer.
#2
07/26/2008 (5:46 pm)
I'm not really sure how Torsion could help with this, it seems more like a Torque issue than a script issue, unless I'm using echo() horribly wrong.
#3
07/26/2008 (5:58 pm)
Deden over IRC solved this for me, it's likely because of the rounding to tick-aligned values of 32ms.