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
01.hps FATAL ERROR Help!! [FIXED]
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: 01.hps FATAL ERROR Help!!

You didn't declare (which means put into quotations) "DoorKey_1", and the name of the function UsedKeyOnDoor didn't match MyFunc. I also put the callbacks under OnStart instead of OnEnter. Here's the revision:

////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "DoorKey_1", "EXAMPLE_DOOR", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("EXAMPLE_DOOR", false, true);
PlaySoundAtEntity("", "unlock_door", "EXAMPLE_DOOR", 0, false);
RemoveItem("DoorKey_1");
}

///on enter
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

I rate it 3 memes.
(This post was last modified: 07-25-2012, 10:25 PM by Adny.)
07-25-2012, 10:24 PM
Find


Messages In This Thread
01.hps FATAL ERROR Help!! [FIXED] - by theveeus - 07-25-2012, 10:18 PM
RE: 01.hps FATAL ERROR Help!! - by SilentStriker - 07-25-2012, 10:22 PM
RE: 01.hps FATAL ERROR Help!! - by Adny - 07-25-2012, 10:24 PM
RE: 01.hps FATAL ERROR Help!! - by theveeus - 07-25-2012, 11:18 PM



Users browsing this thread: 1 Guest(s)