////////////////////////////
// Run when starting game
void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);
for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
}
SetSanityDrainDisabled(true);
SetPlayerCrouching(true);
SetPlayerActive(false);
FadeOut(0);
AddTimer("Intro", 2.0f, "Intro");
}
void Intro(string &in asTimer)
{
string sEvent = asTimer;
AddLocalVarInt(sEvent, 1);
bool bPauseAtStep = false;
float fEventSpeed = 1.0f;
switch(GetLocalVarInt(sEvent))
{
case 1:
PlayGuiSound("", 1.0f);
FadeIn(4.0f);
StartPlayerLookAt("AreaIntroLook_2", 1.0f, 1.0f, "");
FadePlayerRollTo(-45, 0.8, 8);
fEventSpeed = 2.0f;
break;
case 2:
StartPlayerLookAt("AreaIntroLook_4", 1.0f, 1.0f, "");
fEventSpeed = 2.0f;
break;
case 3:
StartPlayerLookAt("AreaIntroLook_3", 1.0f, 1.0f, "");
PlayGuiSound("", 0.7f);
FadeOut(3.0f);
break;
case 4:
FadeIn(6.0f);
SetPlayerLookSpeedMul(0.06f);
StartPlayerLookAt("AreaIntroLook_1", 1.0f, 1.0f, "");
break;
case 5:
StartPlayerLookAt("AreaIntroLook_2", 1.0f, 1.0f, "");
FadeOut(8.0f);
PlayGuiSound("", 0.8f);
fEventSpeed = 4.0f;
break;
}
}
void monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("engineer_1", true);
AddEnemyPatrolNode("engineer_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("engineer_1", "PathNodeArea_2", 0.001, "");
AddEnemyPatrolNode("engineer_1", "PathNodeArea_3", 0, "");
}
void OnBruteCollide_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("engineer_1", false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}