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
Help needed with .hps scripting
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#3
RE: Help needed with .hps scripting

Is that everything in the script file? If it is, then you missed adding in two routines. Also, you missed an "A" on AddUseItemCallback. Try the following:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "doorkey_1", "keydoor_1", "UsedKeyOnDoor", true);
}

//You missed these:
void OnEnter() {}
void OnLeave() {}

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

Hope that helps Smile
(This post was last modified: 06-06-2011, 01:08 AM by Apjjm.)
06-05-2011, 08:28 PM
Find


Messages In This Thread
Help needed with .hps scripting - by planetbomb - 06-05-2011, 08:17 PM
RE: Help needed with .hps scripting - by Apjjm - 06-05-2011, 08:28 PM
RE: Help needed with .hps scripting - by Apjjm - 06-06-2011, 12:52 AM



Users browsing this thread: 1 Guest(s)