Using MovePlayerForward Script
Hey, I need to know How to Use This Script Code
MovePlayerForward(float afAmount)
“REQUIRES THE 1.2 PATCH: JUSTINE” Moves the player forward. It needs to be called in a timer that updates 60 times / second.
I entered it into one timer like this and it doesn't even move!
AddUseItemCallback("", "acidjar_1", "pathblock_1", "placeacid", true);
}
void placeacid(string &in asItem, string &in asEntity)
{
RemoveItem("acidjar_1");
SetEntityActive("explosivejar", true);
SetPlayerActive( false);
StartPlayerLookAt("walkto", 10.0f, 10.0f, "");
AddEntityCollideCallback("Player", "walkto", "lookexplosion", true, 1);
AddTimer("walktotimer", 0.3f, "atwalkto");
}
void atwalkto(string &in asTimer)
{
MovePlayerForward(15.0f);
}
void lookexplosion(string &in asParent, string &in asChild, int alState)
{
StopPlayerLookAt();
StartPlayerLookAt("explosivetable", 10.0f, 10.0f, "");
AddTimer("explodetimer", 1.0f, "explosion");
}
void explosion(string &in asTimer)
{
CreateParticleSystemAtEntity("", "ps_break_cavein.ps", "explosivejar", false);
StartEffectFlash(0.0f, 1.0f, 0.2f);
PlaySoundAtEntity("", "explosion_rock_large.snt", "barrel_1", 0, false);
SetEntityActive("explosivejar", false);
SetEntityActive("pathblock_1", false);
SetEntityActive("explosivetable", false);
SetPlayerActive( true);
}
Any Help It was supposed to be a thing where when you place explosives the player deactivates and walks to a script area, and then the jar explodes. but the Move Script isnt working.
|