Advertisement
ZoriaRPG

LWeapon Sprite Rotation for 2.55 Alpha 17

Apr 1st, 2019
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. lweapon script rotate
  2. {
  3.     void run(bool acw, int degrees_per_frame)
  4.     {
  5.         while(this->isValid())
  6.         {
  7.             if ( acw )
  8.             {
  9.                 this->Rotation -= degrees_per_frame;
  10.                 if ( this->Rotation < 0 ) this->Rotation += 360;
  11.             }
  12.             else
  13.             {
  14.                 this->Rotation += degrees_per_frame;
  15.                 if ( this->Rotation > 359 ) this->Rotation -= 360;
  16.             }
  17.             Waitframe();
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement