Editing your post didn't bump the thread, so it took me a while to see this:
Quote:
Originally Posted by DennisKainz
There's one thing I can't find in the manual, though. How do I remove the decimal parts from a number?
|
I don't remember which syntax AS uses, but either int(number) or (int)(number) should work.
Quote:
I ask the game to calculate "necro.xSpeed = necro.xSpeed - 0.0625", but it converts it into "necro.xSpeed = necro.xSpeed" when I do, automatically discarding the subtraction part.
And I think it also converts xSpeed from "0" to "1" automatically when a walking enemy is on walking state.
|
0.0625 should be large enough to register as a difference between float values. More likely this is a quirk of BEHAVIOR::WALKINGENEMY. It's built for walking back and forth at a constant speed, and the more you want that to change, the less likely it gets that it'll do everything you need.
Quote:
Also, when I kill an object and play a sound to it, the sound stops along with the object's death, and I don't want to add expressions apart to make the sound continue.
|
Post the code? I'm not sure what this would be.
In the "Requests" department: lwe9.j2l.
__________________
|