• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Reaper(OW) like Rotation

G

Greenhawk

Guest
What's up guys! Long time no see. So I've been trying to tackle an issue in my game where my character spins around in a 360, like the Reaper Ultimate in Overwatch and all attempts have failed. I tried making a rotating sprite. I tried coding it through image_angle=direction and it would just point in one direction. So my question is:

How can I make the object spin around in a circle without having to make a rotating sprite?

P.S: it's a 2D top down shooter (I forgot to mention that)

Thanks in Advance
 

Cpaz

Member
Probably something along the lines of this:

Code:
///step event
if rotate{ //if boss is doing the "spin" attack, so replace this with whatever check you'd have for that
     //do things like set sprite, sprite animation speed (if any) etc
    if alarm[whichever]=-1
         alarm[whichever]=5; //change the 5 to however long you'd prefer it to take
}

///alarm (whichever alarm is free)
direction +=10; //or however much you'd want to rotate

if rotate_finish //maybe check the direction? Or just whatever you prefer to check
     rotate=false;

if rotate{ //repeat the alarm set in the alarm just to make things more concrete
    if alarm[whichever]=-1
         alarm[whichever]=5; //change the 5 to however long you'd prefer it to take
}
Also keep in mind that reaper was basically rotated in the animation, so I'd hand animate the sprite to get the best effect.
 
Top