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
HPL Script Problem!
Brothersvv09 Offline
Member

Posts: 57
Threads: 29
Joined: Aug 2012
Reputation: 0
#1
HPL Script Problem!

I wanted to make two keys unlock two different doors (Key_1, Door_1, Key_2, Door_2) and i only found scripts to make only one key fit one door... I tried to make the script but it kept saying "ERR Error" and I dont know what to fix, it always says "} Detected 1,13" and something like that, I correct it but it keeps getting errors. Heres my script:
void OnStart()
{
AddUseItemCallback("", "Key_1", "LockedDoor1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor1", false, true);
RemoveItem("Key_1");
}

{
AddUseItemCallback("", "Key_2", "LockedDoor2", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("LockedDoor2", false, true);
RemoveItem("Key_2");
}

What do I take out?
08-03-2012, 10:21 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#2
RE: HPL Script Problem!

you cant use "UsedKeyOnDoor twice, you have to call one of them something else like UsedKeyOnDoor2 or something like that

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 08-03-2012, 10:23 PM by Lizard.)
08-03-2012, 10:23 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#3
RE: HPL Script Problem!

Why do you post every issue of yours several times? Once is enough.

Actually, consider this a warning.

Tutorials: From Noob to Pro
(This post was last modified: 08-03-2012, 10:31 PM by Your Computer.)
08-03-2012, 10:29 PM
Website Find




Users browsing this thread: 1 Guest(s)