Code: Select all
script "PlayerManager" Enter
{
int x = 1;
while(x==1)
{
if(CheckActorProperty(0,APROP_Waterlevel,3) && (CheckInventory("isUnderwater")==0 ) )
{ SetActorProperty(0,APROP_SPEED,3); GiveInventory("isUnderwater",1); }
if(CheckActorProperty(0,APROP_Waterlevel,0) && (CheckInventory("isUnderwater")==1 ) )
{ SetActorProperty(0,APROP_SPEED,1); TakeInventory("isUnderwater",1); }
GiveInventory("cohChainsawammo",1);
GiveInventory("cohFistammo",1);
Delay(5);
}
}
When the player is submerged, they are supposed to get a triple speed buff, but they instead lose all ability to move in any direction.
When the player is fully out of water, they are supposed to get the regular move speed back. The player still doesn't get any move speed.