The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
#1
Use key to unlock door script, but the script crashes my level?

Hi guys. I just added this to my hps

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("", "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);
}

The AddUseItemCallback is where the key stuff starts, obviously.

I don't see what the problem is. I named everything correctly.


Oh, here's the error I get

main (28,5) : ERR: No matching signatures to 'SetLevelDoorLocked(string@&, const bool, const bool)'
(This post was last modified: 03-23-2011, 06:22 PM by Austums.)
03-23-2011, 06:19 PM
Find


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



Users browsing this thread: 1 Guest(s)