If you are moving it via events (e.g. lerp), you just need to do this:
instance variable angleOfMovement = angle(previousX, previousY, self.X, self.Y),
previousX = self.X
previousY = self.Y
Okay, I've done this to get the angle.. now I'm just having trouble setting the condition based on angleOfMovement. It appeared to be working for finding angles between 0-45, 45-90, 225-315, and so forth. But when it crossed over zero, like between an angle of 315-45, it seems to break.. I assume because it's reading the angles as values.
The logic I keep going to is to use:
System - In Between Values
315 < npc.angleOfMovement < 45
Also, I tried replacing the values with angles so:
Angle(0,0,1,-1) < npc.angleOfMovement < Angle (0,0,1,1)
There is also the "between angles" and "within angle" on the NPC, but these appear to be locked to the original npc angle parameter and not my angleOfMovement instance variable??
Hopefully the above problem makes sense.. I just want to perform an action based on whether the moving angle of the sprite is within 45 degrees of 0, 45,90, 180 degrees, etc.