(04-11-2012, 03:42 PM)Mackiiboy Wrote: (04-11-2012, 03:40 PM)jessehmusic Wrote: still doing it :S
.
Wierd. I tried it out and it works perfectly. Do you change map after death at all?
I you do, can you put up the whole script from your other map?
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "MusicStart", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "MonsterAttack", true, 1);
AddEntityCollideCallback("Player", "door_slam", "DoorSlam", true, 1);
AddEntityCollideCallback("Player", "Light_area", "Lights", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "MonsterAttack_1", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "Lights1", true, 1);
SetEntityPlayerInteractCallback("ptest_cellar_wood01_1", "Bang1", true);
AddUseItemCallback("", "key_4", "ptest_cellar_wood01_3", "keyondoor4", true);
AddUseItemCallback("", "key_laboratory_1", "freedom_door", "keyondoor3", true);
AddUseItemCallback("", "The_gone_key", "Lockeddoor_1", "KeyOnDoor1", true);
CheckPoint ("", "playerstart_1", "Jalla", "Message", "Death");
}
void Jalla(string &in asName, int alCount)
{
ChangeMap("Map3.map", "PlayerStartArea_1", "", "");
}
void MonsterAttack_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Scary_sound.snt", "Player", 0, false);
SetEntityActive("grunt_2", true);
AddEnemyPatrolNode("grunt_2", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("grunt_2", "PathNodeArea_3", 0, "");
SetPropHealth("ptest_cellar_wood01_4", 0);
}
void Lights1(string &in asParent, string &in asChild, int alState)
{
SetLampLit("bridge_torch_2", true, true);
SetLampLit("bridge_torch_3", true, true);
PlaySoundAtEntity("", "Scary_sound.snt", "Player", 0, false);
}
void Lights(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch_static01_3", true, true);
SetLampLit("torch_static01_4", true, true);
}
void DoorSlam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door2", true, true);
PlaySoundAtEntity("", "05_event_door_bang.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
CreateParticleSystemAtEntity("", "ps_hit_wood.ps", "door2", true);
GiveSanityDamage(15.0f, true);
}
void keyondoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("freedom_door", false, true);
PlaySoundAtEntity("", "unlock_door", "freedom_door", 0, false);
RemoveItem("key_laboratory_1");
}
void MonsterAttack(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("grunt", 5.0f, 2.0f, "");
SetEntityActive("grunt", true);
ShowEnemyPlayerPosition("grunt");
AddTimer("", 4.0f, "stoplookenemy1");
GivePlayerDamage(99.0f, "", true, false);
SetPlayerActive(false);
}
void stoplookatenemy1(string &in asTimer)
{
StopPlayerLookAt();
SetPlayerActive(true);
}
void keyondoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("ptest_cellar_wood01_3", false, true);
PlaySoundAtEntity("", "unlock_door", "ptest_cellar_wood01_3", 0, false);
RemoveItem("key_4");
}
void KeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Lockeddoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Lockeddoor_1", 0, false);
RemoveItem("The_gone_key");
}
void Bang1(string &in asEntity)
{
}
void MusicStart(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Ominous Noises - The Tortured Soul Scary Sound Effects.ogg", true, 0.8f, 1, 0, true);
}