How many animations do you have? It seems like 8.
360/8 = 45
Each animation is allowed 45 degrees.
If you have 4 animations, then change 45 to 90.
This will round down to give a whole number as a result.
This will round up to give a whole number as a result.
Now compare the result and set the animations.
0 will be right, 3 will be left..
Im not sure of up and down...
Set Variable :Floor(Shot.Angle/45)
Variable = 0: do this
Variable = 1: do that.
Variable should be an instance variable.
I personally wouldn't use a loop. It is setting the animation 8 times per tick instead of once.
The first 7 times don't count because all 7 are overwritten by the 8th.
Once per tick should be enough, unless I'm missing some info.