Jump to content

Comparing ActorValues to ints


Zorkaz

Recommended Posts

Yes, but it is ALWAYS better to convert (called Cast) your Integer value to Float than covert a Float to an Int:

If ( iMyIntValue == (Object.GetValue(ThisAV) as Int) ) ; bad

If ( (iMyIntValue as Float) == Object.GetValue(ThisAV) ) ;good

Reason is that you are not changing the PRECISION of an Int, just padding decimal places. But you are forcing a float to round up or down.

 

I have encountered float calls that simply will not convert/round/cast to Int and the calculation keeps returning zero.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...