There is a much simpler (with fewer events) way to do this, although I don't know if it's less CPU intensive.
Unfortunately, I don't remember where I found this example, so I can't give credit to the original creator. I think what he or she manages with 2 events is simply brilliant!!!
Here is the example, almost as I had found it, I believe I'd striped it some point and click movement functionality and kept only the angle related math.
And here is my adaptation on a tower that uses the sprite's frame number (instead of animations) as a variable in order to change the visual result.
it looks very easy
can you tell me this string "int(32*(1+tower.a/180)+0.5)%33"
i tried to toy around with it... but math is not my strong side
i understand that you convert the angle variable "a" and change it to a integer to "dir" that matches your number of animations so you can call the animation just using "dir"
very impressive... im very good at understanding logic
but math just kills me
SO can you please tell me how would you chage that 32 that returns int(32*(1+tower.a/180)+0.5)%33 expression
to the 12 angles that i need?? instead of 32
and instead of 180º to 360º as you saw in my example... if you help me i will appreciate it and definitely will give you the credit in my game