Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use key to unlock door script, but the script crashes my level?
Austums Offline
Member

Posts: 60
Threads: 11
Joined: Mar 2011
Reputation: 0
#3
RE: Use key to unlock door script, but the script crashes my level?

Updated my original post with the error.
Still getting an error :/

ERR: No matching signatures to 'SetLevelDoorLocked(string@&, const bool, const bool)'

I'll post my entire script. Everything works fine when I take out this new door script, btw. Also thank you for your help!

void OnEnter()
{
AddTimer("FadeIntro", 0, "FadeIntro");
}

void FadeIntro(string &in asTimer)
{
FadeOut(0);
FadeIn(6);
PlaySoundAtEntity("Startle_1", "react_scare.snt", "Startle_1", 0, false);
}

void OnLeave()
{
}

void OnStart()
{
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_25",3.0f, "");
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_17",3.0f, "");
AddEntityCollideCallback("Player", "Scream_1", "Scream_1", true, 1);
AddEntityCollideCallback("Player", "Monster_1", "MonsterFunc1", true, 1);
AddUseItemCallback("KeyOnDoor", "key_study_1", "level_wood_1", "KeyOnDoor", true);

}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetLevelDoorLocked("level_wood_1", false, true);
    PlaySoundAtEntity("", "unlock_door.snt", "level_wood_1", 0.0f, true);
}

void MonsterFunc1(string &in asParent, string &in asChild, int alState)
{
  SetEntityActive("servant_grunt_1", true);
}
void Scream_1(string &in asParent, string &in asChild, int alStates)
{
   AddTimer("Somenamedoesntreallymatter", 3.0f, "Scream_Trigger");
}

void Scream_Trigger(string &in asTimer)
{
   PlaySoundAtEntity("Scream_1", "12_girl_scream.snt", "Scream_1", 0, false);
   PlaySoundAtEntity("Scream_1", "react_scare.snt", "Scream_1", 0, false);
   StartPlayerLookAt("LookArea_1", 2, 2, "");
   AddTimer("Somenamedoesntreallymatter", 2.0f, "LookArea_Trigger");
}
void LookArea_Trigger(string &in asTimer)
{
   StopPlayerLookAt();
}
(This post was last modified: 03-23-2011, 06:29 PM by Austums.)
03-23-2011, 06:23 PM
Find


Messages In This Thread
RE: Use key to unlock door script, but the script crashes my level? - by Austums - 03-23-2011, 06:23 PM



Users browsing this thread: 1 Guest(s)