The IntToFloat() NWScript command converts an integer to a floating point number.


float IntToFloat (int nInteger)

int nInteger 
The integer that will be converted to a floating point number.

This command is not always needed, as the Toolset's script compiler will automatically convert integers to floats when needed. However, there are instances when an explicit conversion is necessary, such as when one desires the division of integers to produce a fraction.

See also Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.