Code: Select all
Script "TiredMain" Enter
{
int mesx = GetActorX(0);
int mesy = GetActorY(0);
//int mesz = GetActorZ(0);
//str FMC = "FloorMoveChecker";
//Spawn(FMC, mesx, mesy, mesz, 0, 0);
Delay(10);
int mesx2 = GetActorX(0);
int mesy2 = GetActorY(0);
//int mesz2 = GetActorZ(0);
//int Jumpz = GetActorZ(5100);
int VelX = (abs(mesx - mesx2));
int VelY = (abs(mesy - mesy2));
int Movement = (VelX+VelY);
//int VelZ = (abs(mesz2 - Jumpz));
//WEIGHT_VAR = (FixedMul((invnum << 16), 0.002)) ;
int Agility = (CheckInventory("AgilityCounter") << 16);
int CurSpd = GetActorProperty (0, APROP_Speed);
int CurSpd2 = abs(FixedMul((CurSpd << 16), 0.02));
int MaxSpeed = (FixedMul(Agility, 0.02)+0.5);
int MinSpeed = 0.4;
int NewSpd = (CurSpd - 0.005);
Delay(1);
//Print(f:CurSpd2);
if ((Movement >= 100) && (CurSpd >= MinSpeed))
{
If (Movement >= 200)
{
If (Movement >= 400)
{
If (Movement >= 800)
{
NewSpd = (CurSpd - 0.04);
SetActorProperty (0, APROP_Speed, NewSpd);
Print(f:Movement);
}
NewSpd = (CurSpd - 0.02);
SetActorProperty (0, APROP_Speed, NewSpd);
//Print(f:Movement);
}
NewSpd = (CurSpd - 0.01);
SetActorProperty (0, APROP_Speed, NewSpd);
//Print(f:Movement);
}
SetActorProperty (0, APROP_Speed, NewSpd);
//Print(f:Movement);
}
else
{
if (CurSpd < MaxSpeed)
{
NewSpd = (CurSpd + 0.02);
SetActorProperty (0, APROP_Speed, NewSpd);
Print(f:NewSpd);
}
}
restart;
}
So how can I get Movement>x to work? -Thanks