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
Scripting problem
Hauken Offline
Member

Posts: 62
Threads: 19
Joined: Jul 2012
Reputation: 1
#1
Question  Scripting problem

Hello folks!

Finally got myself registered, so Im having trouble with the over used Key VS Door script, im in the process of learning the HPL editor scripting functions.

I am intrested in learning this, I've been searching this forum, been watching vids over again.. And i cant get whats wrong..

So heres my progress:

I can pick up the key, and i can use it to unlock the door specefied, HOWEVER, the key does not have a name, and the door does not have a name either.

I suspect it's my HPS file, i've double checked the Lang file dozens of times..

As you can see i've added a note in my map aswell, which shows up blank ingame.

LANG FILE TEMPLATE:








test1



Awesome note
Just a test ey



Bedroom Key
"Key to bedroomdoor"





HPS FILE TEMPLATE


////////////////////////////
// Run when entering map
void OnStart()
{
AddUseItemCallback("", "Key_1", "door1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door1", 0, false);
RemoveItem("Key_1");
}



I've double checked that the keyname and subname is correct in the editor so I got that covered.

I bet most of you see the problem already. Cool


EXTRA HELP
http://i50.tinypic.com/28wfbq9.jpg
(This post was last modified: 07-16-2012, 10:59 AM by Hauken.)
07-16-2012, 05:44 AM
Find


Messages In This Thread
Scripting problem - by Hauken - 07-16-2012, 05:44 AM
RE: Scripting problem - by Adny - 07-16-2012, 05:50 AM
RE: Scripting problem - by Hauken - 07-16-2012, 06:05 AM
RE: Scripting problem - by Adny - 07-16-2012, 06:48 AM
RE: Scripting problem - by Hauken - 07-16-2012, 07:33 AM
RE: Scripting problem - by Your Computer - 07-16-2012, 08:08 AM
RE: Scripting problem - by Hauken - 07-16-2012, 10:59 AM



Users browsing this thread: 2 Guest(s)