09-21-2010, 08:51 PM
So I copied Pandemoneus' script for the player to look left and right when he spawns in the map, replaced the entities to look at to the ones in the room I spawn in, but for some reason, it doesn't work even though I don't encounter any errors?
Any help would be appreciated (especially from Pandemoneus )!
Here's my code for the StartPlayerLookAt:
EDIT: and I created a DoorScript for the player to look at since I'd like to get the slamming door script working too, so that shouldn't be the problem...
Any help would be appreciated (especially from Pandemoneus )!
Here's my code for the StartPlayerLookAt:
Code:
void Intro()
{
AddDebugMessage("Begin Intro", false);
SetPlayerCrouching(true);
SetPlayerActive(false);
FadeOut(0.0f);
FadeIn(6.0f);
FadeImageTrailTo(1.0f, 1.0f);
AddTimer("1", 2, "IntroTimer");
AddTimer("2", 2.5f, "IntroTimer");
AddTimer("3", 3, "IntroTimer");
AddTimer("4", 4, "IntroTimer");
AddTimer("5", 6, "IntroTimer");
}
void IntroTimer(string &in asTimer)
{
if(asTimer == "1"){
PlayGuiSound("player_cough.snt", 0.7f);
}
else if(asTimer == "2"){
SetPlayerCrouching(false);
}
else if(asTimer == "3"){
StartPlayerLookAt("candlestick_tri_1", 2.0f, 1.0f, "");
}
else if(asTimer == "4"){
StopPlayerLookAt();
StartPlayerLookAt("DoorScript", 3.0f, 3.0f, "");
PlayGuiSound("react_breath_slow", 0.7f);
}
else if(asTimer == "5"){
StopPlayerLookAt();
FadeImageTrailTo(0, 1.0f);
PlayGuiSound("react_breath_slow", 0.5f);
SetPlayerActive(true);
SetMessage("Message", "Hint0", 0);
AddDebugMessage("End Intro", false);
}
}
EDIT: and I created a DoorScript for the player to look at since I'd like to get the slamming door script working too, so that shouldn't be the problem...