View Single Post
DennisKainz

JCF Member

Joined: Dec 2005

Posts: 422

DennisKainz is notorious for his worthless posts

Jan 10, 2014, 11:17 PM
DennisKainz is offline
Reply With Quote
That is exactly the advice I needed. Thank you again.

There's one thing I can't find in the manual, though. How do I remove the decimal parts from a number?

For example, I want to check the enemy's x speed, but instead of checking it as "1.25" or "4.0625" or "3.785" I want it to be checked respectively as "1", "4" or "3".

Shortly, to check the numbers as natural, non decimal numbers.

And there's a new problem: I can't set a walking enemy's x speed to its current value minus something. 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.

And I can't find a behavior that respects everything. The pickup behavior respects the x and y speed, but always blocks on collision. The spark one doesn't block on collision and respects x and y speed, but ignores you in a range outside 240 or something, which isn't ok if you play in 640x480. Can the AngelScript experts create a behavior which respects everything you input to it, and you decide whether it respects collisions or not?

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.

I'm sorry about bothering you so much. I swear I try to figure stuff out myself, but my logic skills aren't as high as yours.

Last edited by DennisKainz; Jan 13, 2014 at 06:38 AM.