RE: Crashing
From which map?
This is from the map in the video:
void BigDoorFunc(string &in Entity)
{
PlaySoundAtEntity("locked_door", "locked_door.snt", "BigDoor", 0, true);
SetMessage("Messages", "MainHallDoor", 1);
}
void UnlockDoor(string &in asItem, string &in asEntity)
{
SetEntityActive("BigDoor", false);
PlaySoundAtEntity("", "unlock_door.snt", "BigDoor", 0, false);
AddTimer("monsterhit", 0, "MonsterHitT");
}
void MonsterHitT(string &in Timer)
{
StartPlayerLookAt("LookAt", 1, 1, "");
AddTimer("monsterhit2", 1, "MonsterHit2T");
}
void MonsterHit2T(string &in Timer)
{
//PlaySoundAtEntity("enabled", "enabled.snt", "Player", 0, true);
AddTimer("startterrormusic", 0, "StartTerrorT");
//PlaySoundAtEntity("amb_idle02", "amb_idle02.ogg", "Player", 0, true);
}
void StartTerrorT(string &in Timer)
{
AddTimer("teleport", 3.5f, "TeleportPlayer1");
SetDeathHint("DeathHint", "End");
SetPlayerHealth(50);
StopPlayerLookAt();
StartPlayerLookAt("servant_brute_1", 10, 7, "");
SetEntityActive("servant_brute_1", true);
ShowEnemyPlayerPosition("servant_brute_1");
//PlaySoundAtEntity("ui_terror_meter", "ui_terror_meter.snt", "Player", 1, true);
/*AddTimer("sound1", 0.5f, "MonsterEvent");
AddTimer("sound2", 1.0f, "MonsterEvent");
AddTimer("sound3", 1.5f, "MonsterEvent");
AddTimer("sound4", 2.0f, "MonsterEvent");
AddTimer("sound5", 2.5f, "MonsterEvent");
AddTimer("sound6", 3.0f, "MonsterEvent");*/
}
void TeleportPlayer1(string &in Timer)
{
ChangeMap("06_end_room.map", "PlayerStartArea_1", "", "");
}
void OnStart()
{
//EDITOR
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i< 10;i++) GiveItemFromFile("potion_sanity_"+i, "potion_sanity.ent");
//End of EDITOR
AddUseItemCallback("", "BigDoorKey", "BigDoor", "UnlockDoor", false);
}
void OnEnter()
{
}
void OnLeave()
{
}
And this is from the map that you are supposed to be teleported to:
void OnStart()
{
StopPlayerLookAt();
GiveSanityDamage(99, false);
SetPlayerActive(false);
SetPlayerCrouching(true);
FadeImageTrailTo(2, 2);
FadePlayerRollTo(50, 220, 220);
FadeOut(0);
FadeIn(3);
AddTimer("StartMusic", 8, "Intro");
AddTimer("T1", 11, "Intro");
AddTimer("T2", 14, "Intro");
AddTimer("T3", 17, "Intro");
AddTimer("T4", 20, "Intro");
AddTimer("T5", 23, "Intro");
AddTimer("T6", 26, "Intro");
AddTimer("T7", 29, "Intro");
AddTimer("RollCredits", 36, "Intro");
}
void Intro(string &in asTimer)
{
string x = asTimer;
if (x == "StartMusic")
{
PlayMusic("ending_alexander.ogg", true, 10, 2, 1, true);
}
else if (x == "T1")
{
FadeOut(3);
}
else if (x == "T2")
{
FadeIn(3);
PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
StartPlayerLookAt("ScriptArea_1", 2, 2, "");
}
else if (x == "T3")
{
StopPlayerLookAt();
StartPlayerLookAt("ScriptArea_2", 2, 2, "");
}
else if (x == "T4")
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StopPlayerLookAt();
}
else if (x == "T5")
{
SetPlayerCrouching(false);
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeImageTrailTo(0, 1);
}
else if (x == "T6")
{
SetMessage("Messages", "EndMessage1", 4);
}
else if (x == "T7")
{
SetMessage("Messages", "EndMessage2", 4);
}
else if (x == "RollCredits")
{
StopMusic();
StartCredits("ending_agrippa.ogg", false, "Ending", "MainCredits", 0);
}
}
void OnEnter()
{
}
void OnLeave()
{
}
Current projects:
The Dark Prison 85 % (Stopped working on this one)
Unnamed Project 7 %
(This post was last modified: 03-09-2012, 06:02 PM by GoranGaming.)
|