Script datatype question...
by Matt Rains · in Technical Issues · 12/31/2004 (7:16 am) · 3 replies
Ok... I've been getting prty familier now with the engine. But sometimes I still have a few problems doing simple things.
I've tried looking through documentation about using datatypes in scripts...
here is an example that I cannot get to work.
say:
%x = 66;
%y = 12;
%z = %x / %y;
%z no equals 5.5...
but I only want to have 5 in there... like it's an int.
I've tried uning int since it is declared in the ConsoleTypes... but I'm not sure of the syntax or what I should use...
can someone please clearup using datatypes in script? or point me to a link that will do so... thanks..
I've tried looking through documentation about using datatypes in scripts...
here is an example that I cannot get to work.
say:
%x = 66;
%y = 12;
%z = %x / %y;
%z no equals 5.5...
but I only want to have 5 in there... like it's an int.
I've tried uning int since it is declared in the ConsoleTypes... but I'm not sure of the syntax or what I should use...
can someone please clearup using datatypes in script? or point me to a link that will do so... thanks..
Torque 3D Owner Stephen Zepp
The solution to your specific example is the mFloor script function, which would be used like this:
%z = mFloor(%x/%y);