Bruce
Active member
Hello guys,
I don't know why this simple script does not work...
Can someone please take a look at it?
freespecial1
....
....
@cmd Rotate 25
...
...
If I just use drawmethod rotate 25
then it works, but it always rotate 25 degrees clockwise.
I created a little script, so it can rotate 25 clockwise or counter clockwise depending on the facing direction.
I am using 4.0xx build
Thank you
I don't know why this simple script does not work...
Can someone please take a look at it?
freespecial1
....
....
@cmd Rotate 25
...
...
Code:
void Rotate(float RotateAngle)
{
void self = getlocalvar("self");
int EntityDir = getentityproperty(self, "direction");
if(EntityDir == 0) { // if facing left
changedrawmethod(self, "rotate", RotateAngle);
} else changedrawmethod(self, "rotate", -RotateAngle);
}
If I just use drawmethod rotate 25
then it works, but it always rotate 25 degrees clockwise.
I created a little script, so it can rotate 25 clockwise or counter clockwise depending on the facing direction.
I am using 4.0xx build
Thank you