If you have 'automatic rotations' enabled on the missile object (its a checkbox under the runtime options inside the level editor)
to get the current direction (in 360 degree format, not 32) try using
Set Alterable Value D to ->
Retrieve Data From on Object
Missile Object -> Scale / Angle -> Get Angle
Alterable Value D will now give you the current direction. You should rename the Alterable Value D to something like "CurDir" just so you don't lose track of your Alterable variables. Or just always use the Get Angle function whenever you need to know the missile's direction.
As a side note: you could theoretically use the 32 directions to do the same thing, just replace the number 360 with 32 in the above instructions and reference the directions using Animation->Current Direction Value, however 360 degrees will give you much a smoother rotation.
Note:
I just realised in my previous post
Is not necessary. Current Direction will never be > (Target direction + 360) because Current Direction will be between 0 and 359.Quote:
Value B < Value A
Current Direction > (Target direction + 360)
- Subtract 1 to current direction
Anyway, what I've provided may not work 100%, however hopefully it'll put you and the right track and get you thinking as to how best to solve the problem. If you treat it like a challenge, you'll be very satisfied when you solve it.
