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
planetbomb Offline
Junior Member

Posts: 5
Threads: 1
Joined: Nov 2010
Reputation: 0
#4
RE: Help needed with .hps scripting

(06-05-2011, 08:28 PM)Apjjm Wrote: 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

Well I got rid of those as they were having the same problem, didn't know you needed them.

EDIT: Put them back in and it still won't work.
(This post was last modified: 06-05-2011, 08:34 PM by planetbomb.)
06-05-2011, 08:30 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 planetbomb - 06-05-2011, 08:30 PM
RE: Help needed with .hps scripting - by Apjjm - 06-06-2011, 12:52 AM



Users browsing this thread: 1 Guest(s)