The player doesnt move forward.
The bolded part doesnt seem to work.Hes supposed to walk forward till he hits the script area which activates something else.Problem is he doesnt walk.Please help me.
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "looktrigger", "Voicetrigger2", true, 1);
AddEntityCollideCallback("Player", "looktrigger2", "Voicetrigger3", true, 1);
AddEntityCollideCallback("Player", "kill", "Voicetrigger4", true, 1);
AddEntityCollideCallback("Player", "monstertrigger", "monsterthingy", true, 1);
AddEntityCollideCallback("Player", "talkandkill", "yeah", true, 1);
AddEntityCollideCallback("Player", "kill2", "yeah2", true, 1);
AddUseItemCallback("", "ceremony_knife_1", "mansion_1", "KeyOnDoor3", true);
AddUseItemCallback("", "key_study_1", "mansion_3", "KeyOnDoor4", true);
StartPlayerLookAt("lookstart", 2, 5, "");
AddEntityCollideCallback("Player", "pick", "unlock", true, 1);
AddEntityCollideCallback("Player", "what", "dude", true, 1);
SetEntityCallbackFunc("ceremony_knife_1", "BoneSawItem");
}
void BoneSawItem(string &in asEntity, string &in type)
{
StopPlayerLookAt();
}
void knife(string &in asTimer)
{
StopPlayerLookAt();
}
void dude(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "grabknife.snt", "Player", 8, false);
AddTimer("Timer_3", 8, "awakeningdude");
}
void awakeningdude(string &in asTimer)
{
SetEntityActive("pick", true);
}
void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
}
void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("key_study_1");
}
void unlock(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "dagger.snt", "Player", 3, false);
}
void Voicetrigger2(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("look2", 2, 5, "");
AddTimer("Timer_3", 1, "awakening3");
SetPlayerMoveSpeedMul(0);
SetPlayerCrouching(true);
}
void awakening3(string &in asTimer)
{
PlaySoundAtEntity("", "candle.snt", "Player", 1, false);
SetEntityActive("candle", false);
SetEntityActive("candle2", true);
AddTimer("Timer_3", 1, "awakening4");
}
void awakening4(string &in asTimer)
{
StartPlayerLookAt("look1", 2, 5, "");
PlaySoundAtEntity("", "lure.snt", "Player", 20, false);
AddTimer("Timer_3", 15, "awakening5");
}
void awakening5(string &in asTimer)
{
StopPlayerLookAt();
SetEntityActive("looktrigger2", true);
SetPlayerMoveSpeedMul(1);
}
void Voicetrigger3(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("look4", 2, 5, "");
AddTimer("Timer_3", 5, "awakening6");
SetPlayerMoveSpeedMul(0);
PlaySoundAtEntity("", "huh.snt", "Player", 2, false);
}
void awakening6(string &in asTimer)
{
FadeOut(0.5);
TeleportPlayer("drop");
AddTimer("Timer_3", 3, "awakening0");
}
void awakening0(string &in asTimer)
{
StartPlayerLookAt("look5", 2, 5, "");
SetEntityActive("vase1", false);
SetEntityActive("vase2", true);
FadeIn(0.5);
AddTimer("Timer_3", 1, "awakening1");
PlaySoundAtEntity("", "vase.snt", "Player", 1, false);
}
void awakening1(string &in asTimer)
{
StartPlayerLookAt("look2", 2, 5, "");
AddTimer("Timer_3", 5, "awakeningcloset");
PlaySoundAtEntity("", "whosthere.snt", "Player", 7, false);
}
void awakeningcloset(string &in asTimer)
{
StartPlayerLookAt("lookcloset", 2, 5, "");
AddTimer("Timer_3", 3, "awakeningtele");
FadeOut(1);
}
void awakeningtele(string &in asTimer)
{
StartPlayerLookAt("look3", 2, 5, "");
FadeIn(1);
TeleportPlayer("closet");
PlaySoundAtEntity("", "brokenvase.snt", "Player", 7, false);
SetSwingDoorClosed("closet1", true, true);
SetEntityActive("block2", true);
SetEntityActive("merc2", true);
SetEntityActive("axe2", true);
SetEntityActive("kill", true);
SetEntityActive("merc", false);
SetEntityActive("axe", false);
SetPlayerMoveSpeedMul(0);
AddTimer("Timer_3", 12, "awakeningkill");
}
void awakeningkill(string &in asTimer)
{
SetPlayerMoveSpeedMul(1);
}
void awakening7(string &in asTimer)
{
StartPlayerLookAt("look6", 2, 5, "");
SetEntityActive("looktrigger2", true);
}
void Voicetrigger4(string &in asParent, string &in asChild, int alState)
{
AddTimer("Timer_3", 2, "awakeningdead");
FadeOut(0.1);
PlaySoundAtEntity("", "stab.snt", "Player", 1, false);
}
void awakeningdead(string &in asTimer)
{
FadeIn(6);
PlaySoundAtEntity("", "fall.snt", "Player", 3, false);
PlaySoundAtEntity("", "sorry.snt", "Player", 3, false);
SetEntityActive("deadmerc", true);
SetEntityActive("leg1", true);
SetEntityActive("leg2", true);
SetEntityActive("axe3", true);
SetEntityActive("merc2", false);
SetEntityActive("axe2", false);
StopPlayerLookAt();
SetEntityActive("block", false);
SetEntityActive("block2", false);
SetEntityActive("key_study_1", true);
SetEntityActive("blood", true);
SetEntityActive("blood2", true);
SetEntityActive("blood3", true);
SetEntityActive("blood4", true);
}
void monsterthingy(string &in asParent, string &in asChild, int alState)
{
AddEnemyPatrolNode("thomas", "go", 10, "");
StartPlayerLookAt("lookthomas", 2, 5, "");
MovePlayerForward(15.0f);
AddTimer("Timer_2", 1, "run");
SetPlayerActive(false);
}
void run(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_1", 0, "run");
}
void yeah(string &in asParent, string &in asChild, int alState)
{
MovePlayerForward(0.0f);
SetPlayerMoveSpeedMul(0);
SetPlayerRunSpeedMul(0);
RemoveTimer("Timer_1");
RemoveTimer("Timer_2");
AddTimer("Timer_3", 5, "stop");
AddTimer("Timer_3", 10, "yeah3");
}
void stop(string &in asParent, string &in asChild, int alState)
{
SetEnemyDisabled("thomas", false);
}
void yeah3(string &in asParent, string &in asChild, int alState)
{
MovePlayerForward(15.0f);
SetPlayerMoveSpeedMul(1);
SetPlayerRunSpeedMul(1);
AddTimer("Timer_3", 1, "run2");
}
void run2(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_3", 0, "run3");
}
void run3(string &in asTimer)
{
MovePlayerForward(15.0f);
AddTimer("Timer_3", 0, "run2");
}
void yeah2(string &in asParent, string &in asChild, int alState)
{
FadeOut(0.1);
PlaySoundAtEntity("", "stab.snt", "Player", 1, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic(".ogg", true, 1.0f, 1.0f, 1, false);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 03-28-2012, 12:56 PM by kartanonperuna.)
|