I can use angle(x1,y1,x2,y2) to get an object to point towards another. This works fine; the object rotates between 0 and 359 as expected.
However, if I'm using this expression to set a variable instead of an object's angle, it returns negative angles. For example, 180 becomes -180 / 225 becomes -135, and so on.
What's the deal with that?
To clarify on what I'm doing...I'm using a sprite object with 8 animations that represent 8 different angles it can face. They are named a0, a45, a90, a135, and so on. I'm using the angle() expression to get the angle between this object and my player, but storing it in an instance variable. I then use this instance variable to tell the object which animation to play (which angle it should be facing). Why? Because the perspective of this object doesn't allow me to simply rotate it - I have to use a different sprite for each 45 degree increment.
I could solve this by putting these negative angles in the animation names, but C2 won't allow the "-" character, so that's not an option.