npc script sandcrabgohma { void run() { int xstep = 150; int ystep = 67; int counter = 0; int movestate = Rand(4); while(true) { ++counter; unless(counter < 60){ if(Rand(16) < this->Rate) movestate ^= 2; //toggle horizontal and vertical movement. counter = 0; } switch (movestate) { case 0: //Up this->Y -= ystep/100.0; unless(this->Y > 32) movestate |= 1; break; case 1: //down this->Y += ystep/100.0; unless(this->Y < 128) movestate |= 1; break; case 2: //left this->X -= xstep/100.0; unless(this->X > 32) movestate |= 1; break; case 3: //right default: this->X += xstep/100.0; unless(this->X < 176) movestate |= 1; break; } Waitframe(); } } }
it's suppose to turn gohmas walk pattern into that of sand crabs but it seems Gohma's movement is hard coded?