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
Door isn't working right!
Zjurc Offline
Junior Member

Posts: 43
Threads: 8
Joined: Jan 2012
Reputation: 0
#6
RE: Door isn't working right!

Ahh i see what you mean - regular doors and and level doors have a DIFFERENT type of script!
This should help you:

void OnStart()
{
AddUseItemCallback("", "KEYNAME", "LEVELDOOR", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("LEVELDOOR", false);
PlaySoundAtEntity("", "unlock_door", "LEVELDOOR", 0, false);
RemoveItem("KEYNAME");
}

KEYNAME - name of your key, of course. To avoid any problems name your key without any numbers -
'Name' section and "CustomSubItemTypeName" section should also be named the same - can be different but i prefer same (its easier)
LEVELDOOR - obviously name of your door. the door does not need "CustomSubItemTypeName" as far as I know.
02-03-2012, 07:38 PM
Find


Messages In This Thread
Door isn't working right! - by Imevil23 - 02-01-2012, 08:13 PM
RE: Door isn't working right! - by trollox - 02-01-2012, 08:17 PM
RE: Door isn't working right! - by Imevil23 - 02-01-2012, 08:24 PM
RE: Door isn't working right! - by trollox - 02-01-2012, 08:33 PM
RE: Door isn't working right! - by Prelauncher - 02-01-2012, 09:00 PM
RE: Door isn't working right! - by Zjurc - 02-03-2012, 07:38 PM



Users browsing this thread: 1 Guest(s)