JoeBradleyUK
Member
Posts: 115
Threads: 20
Joined: Jul 2011
Reputation:
0
|
RE: My game crashes....
(10-18-2011, 06:54 PM)Darion97 Wrote: try this:
void OnStart()
{
AddEntityCollideCallback("Player", "ScareOne", "ScareOneCallback", true, 1);
AddEntityCollideCallback("Player", "ScareTwoArea", "ScareTwoCallback", true, 1);
AddUseItemCallback("", "KeyDownstairs", "DownstairsDoor", "DownStairsKey", true);
SetEntityPlayerLookAtCallback("SignDrLyons", "SignDrLyons", false);
}
void DownStairsKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("DownstairsDoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "DownstairsDoor", 4.0f, false);
RemoveItem("KeyDownstairs);
}
void SignDrLyons(string &in asEntity, int alState)
{
SetMessage("Messages", "SignDrLyons", 2.0f);
}
void ScareOneCallback(string &in asParent, string &in asChild, int alState)
{
SetLampLit("ScareOneLight", true, true);
SetLampLit("ScareOneLightTwo", true, true);
SetEntityActive("ScareOneMonster", true);
ShowEnemyPlayerPosition("ScareOneMonster");
PlaySoundAtEntity("", "react_scare3.snt", "Player", 20.0f, true);
PlayMusic("LevelOneMusic.ogg", true, 10.0f, 2.0f, 2.0f, true);
SetSwingDoorLocked("ScareOneDoor", true, true);
GiveSanityDamage(20.0f, true);
SetPlayerLampOil(0.0f);
}
void ScareTwoCallback(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScareTwoMonster", true);
AddEntityCollideCallback("ScareTwoMonster", "ScareTwoMonsterDisappear", "ScareTwoMonsterVanish", true, 1);
AddEnemyPatrolNode("ScareTwoMonster", "ScareTwoNodeOne", 0.0f, "");
AddEnemyPatrolNode("ScareTwoMonster", "ScareTwoNodeTwo", 0.0f, "");
AddEnemyPatrolNode("ScareTwoMonster", "ScareTwoNodeThree", 30.0f, "");
StartPlayerLookAt("deskpad_1", 5.0f, 6.0f, "");
AddTimer("ScareTwo", 8.0f, "ScareTimerTwo");
GiveSanityDamage(20.0f, true);
}
void ScareTwoMonsterVanish(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScareTwoMonster", false);
}
void ScareTimerTwo(string &in asTimer)
{
StopPlayerLookAt();
}
void OnEnter()
{
}
void OnLeave()
{
} What did you change ?
:Work In Progress:
Insanity
|
|