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
Questions
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#30
RE: Unlocking door Error...

...Assuming that this is the only error in your code:
Quote:void UsedKeyOnDoor(string &in asItem, string &in asEntry)
(
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntry("", "unlock_door.snt", "door1", 0, false);
RemoveItem("badkey");
You have to use braces ( {} ) and not brackets ( () ) to open and close a void.
Also, there is no script for asEntry or PlaySoundAtEntry. It is asEntity and PlaySoundAtEntity respectively.

PHP Code: (Select All)
void UsedKeyOnDoor (string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("door1"falsetrue);
PlaySoundAtEntity("""unlock_door.snt""door1"0false);
RemoveItem("badkey");


You can find all the scripts on the wiki at this page: https://wiki.frictionalgames.com/doku.ph..._functions
And you can find a tutorial all about unlocking doors here: https://wiki.frictionalgames.com/hpl2/tu...cks_a_door

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 06-07-2014, 11:48 AM by Romulator.)
06-07-2014, 11:46 AM
Find


Messages In This Thread
UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 02:44 PM
RE: UNEXPECTED ERROR - by DnALANGE - 06-06-2014, 03:02 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 03:29 PM
RE: UNEXPECTED ERROR - by Neelke - 06-06-2014, 04:01 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 04:16 PM
RE: UNEXPECTED ERROR - by Mudbill - 06-06-2014, 04:08 PM
RE: UNEXPECTED ERROR - by PutraenusAlivius - 06-06-2014, 04:17 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 04:23 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 04:43 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 04:56 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 05:11 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 05:13 PM
RE: UNEXPECTED ERROR - by Mudbill - 06-06-2014, 05:12 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 05:16 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 05:22 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 05:24 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 05:26 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 05:31 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 05:37 PM
RE: UNEXPECTED ERROR - by Neelke - 06-06-2014, 05:42 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 05:44 PM
RE: UNEXPECTED ERROR - by Romulator - 06-06-2014, 05:44 PM
RE: UNEXPECTED ERROR - by Mudbill - 06-06-2014, 06:07 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 06:13 PM
RE: UNEXPECTED ERROR - by Mudbill - 06-06-2014, 06:14 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 06:18 PM
RE: UNEXPECTED ERROR - by Mudbill - 06-06-2014, 06:20 PM
RE: UNEXPECTED ERROR - by Amnesiaplayer - 06-06-2014, 06:24 PM
RE: Questions - by plutomaniac - 06-07-2014, 10:31 PM
Unlocking door Error... - by Amnesiaplayer - 06-07-2014, 11:33 AM
RE: Unlocking door Error... - by Romulator - 06-07-2014, 11:46 AM
RE: Unlocking door Error... - by Amnesiaplayer - 06-07-2014, 11:49 AM
(picking key) *steve comes* - by Amnesiaplayer - 06-07-2014, 12:32 PM
RE: (picking key) *steve comes* - by DnALANGE - 06-07-2014, 12:37 PM
RE: (picking key) *steve comes* - by Romulator - 06-07-2014, 12:44 PM
RE: Unlocking door Error... - by DnALANGE - 06-07-2014, 12:45 PM
RE: (picking key) *steve comes* - by DnALANGE - 06-07-2014, 12:48 PM
RE: Unlocking door Error... - by Amnesiaplayer - 06-07-2014, 01:21 PM
Where ?! - by Amnesiaplayer - 06-07-2014, 02:59 PM
OnLeave() where to locate - by Amnesiaplayer - 06-07-2014, 03:45 PM
RE: OnLeave() where to locate - by Romulator - 06-07-2014, 03:48 PM
RE: OnLeave() where to locate - by Amnesiaplayer - 06-07-2014, 03:54 PM
RE: OnLeave() where to locate - by Romulator - 06-07-2014, 03:59 PM
RE: OnLeave() where to locate - by Amnesiaplayer - 06-07-2014, 04:07 PM
RE: (picking key) *steve comes* - by DnALANGE - 06-07-2014, 04:12 PM
RE: Where ?! - by PutraenusAlivius - 06-07-2014, 05:11 PM
RE: Where ?! - by Straxedix - 06-07-2014, 09:13 PM
RE: OnLeave() where to locate - by Straxedix - 06-07-2014, 09:36 PM



Users browsing this thread: 4 Guest(s)