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
Key help
wagiwombledog Offline
Junior Member

Posts: 8
Threads: 4
Joined: Mar 2012
Reputation: 0
#1
Key help

I'm having a problem getting a key to open a door, can you please help?
waterworks_door=Door
waterworks_key=Key
Here is the script:

void OnStart()
{
AddUseItemCallback("", "waterworks_key", "waterworks_door", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("waterworks_door", false, true);
PlaySoundAtEntity("", "unlock_door", "waterworks_door", 0, false);
RemoveItem("waterworks_key");
}

note: I have more script than this but it is working fine.

Thanks Smile
09-26-2012, 08:24 PM
Find


Messages In This Thread
Key help - by wagiwombledog - 09-26-2012, 08:24 PM
RE: Key help - by Robby - 09-26-2012, 08:25 PM
RE: Key help - by wagiwombledog - 09-27-2012, 05:13 AM
RE: Key help - by Mine Turtle - 09-27-2012, 07:51 AM



Users browsing this thread: 1 Guest(s)