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
Quick Question about level doors.
A Tricky Carnie Offline
Member

Posts: 72
Threads: 15
Joined: Sep 2011
Reputation: 0
#1
Quick Question about level doors.

Hi, I'm working on a Custom Story (Suprise!) and I have a locked Level door and I want to make sure my script is correct, so the door can be unlocked, so here it is:
Quote:////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "key_2", "mansion_1", "KeyOnDoor", true);
AddUseItemCallback("", "key_3", "level_celler_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_2");

}
void SetLevelDoorLocked(string& asName, bool abLocked)
{
SetLevelDoorLocked("level_celler_1", false, true);
PlaySoundAtEntity("", "unlock_door", "level_celler_1", 0, false);
RemoveItem("Key_3");
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

And on a somewhat related note, how do I name a level door, and how do I set text for when any kind of door is locked?

Thanks in advance

09-06-2011, 01:43 AM
Find


Messages In This Thread
Quick Question about level doors. - by A Tricky Carnie - 09-06-2011, 01:43 AM



Users browsing this thread: 1 Guest(s)