ZoriaRPG icon

LWeapon Sprite Rotation for 2.55 Alpha 17

ZoriaRPG | PRO | 04/01/19 02:25:04 PM UTC | 0 ⭐ | 640 👁️ | Never ⏰ | []
C++ |

370 B

|

None

|

0 👍

/

0 👎

lweapon script rotate
{
    void run(bool acw, int degrees_per_frame)
    {
        while(this->isValid())
        {
            if ( acw )
            {
                this->Rotation -= degrees_per_frame;
                if ( this->Rotation < 0 ) this->Rotation += 360;
            }
            else
            {
                this->Rotation += degrees_per_frame;
                if ( this->Rotation > 359 ) this->Rotation -= 360;
            }
            Waitframe();
        }
    }
}

Comments