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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Door script error
masken94 Offline
Junior Member

Posts: 5
Threads: 1
Joined: May 2011
Reputation: 0
#1
Door script error

I have made ​​a key that works for a door. But when I try to make a key to another another door, I get error. I do not know what I'm doing wrong.Huh
This is the script

////////////////////////////
/ / Run first time starting map
void onStart ()
{
AddUseItemCallback ("", "the_key", "the_door", "KeyOnDoor", true);
}

void KeyOnDoor (string & in asItem, string & in asEntity)
{
SetSwingDoorLocked ("the_door", false, true);
PlaySoundAtEntity ("", "unlock_door", "the_door", 0, true);
RemoveItem ("the_key");
}

////////////////////////////
/ / Run first time starting map
void onStart ()
{
AddUseItemCallback ("", "key_2", "derect", "usedkeyondoor", true);
}

void usedkeyondoor (string & in asItem, string & in asEntity)
{
SetSwingDoorLocked ("derect", false, true);
PlaySoundAtEntity ("", "unlock_door", "derect", 0, true);
RemoveItem ("key_2");
}
05-08-2011, 07:31 PM
Find


Messages In This Thread
Door script error - by masken94 - 05-08-2011, 07:31 PM
RE: Door script error - by Simpanra - 05-08-2011, 07:34 PM
RE: Door script error - by masken94 - 05-08-2011, 07:59 PM
RE: Door script error - by Simpanra - 05-08-2011, 08:07 PM
RE: Door script error - by masken94 - 05-09-2011, 09:02 AM



Users browsing this thread: 2 Guest(s)