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
HPS error (level editing)
Equil Offline
Member

Posts: 94
Threads: 8
Joined: Sep 2010
Reputation: 0
#4
RE: HPS error (level editing)

Try having the "UseKeyOnDoor" function outside of OnEnter. Like this:

void OnStart()

{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
SetPlayerLampOil(100.0f);
for(int i = 0;i < 10;i++)
{
GiveItemFromFile("tinderbox", "tinderbox.ent");
}
}
AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlocked_door", "door_1", 0, false);
RemoveItem("key_1");
}
03-17-2012, 01:59 AM
Find


Messages In This Thread
HPS error (level editing) - by mrscoomich - 03-16-2012, 07:36 PM
RE: HPS error (level editing) - by Adny - 03-16-2012, 08:56 PM
RE: HPS error (level editing) - by mrscoomich - 03-16-2012, 11:10 PM
RE: HPS error (level editing) - by Equil - 03-17-2012, 01:59 AM
RE: HPS error (level editing) - by mrscoomich - 03-17-2012, 03:18 AM
RE: HPS error (level editing) - by Equil - 03-17-2012, 05:10 AM
RE: HPS error (level editing) - by mrscoomich - 03-18-2012, 07:04 PM
RE: HPS error (level editing) - by DaAinGame - 03-21-2012, 04:23 AM
RE: HPS error (level editing) - by mrscoomich - 03-21-2012, 10:16 PM
RE: HPS error (level editing) - by DaAinGame - 03-21-2012, 10:20 PM
RE: HPS error (level editing) - by mrscoomich - 03-21-2012, 10:45 PM
RE: HPS error (level editing) - by DaAinGame - 03-21-2012, 11:00 PM
RE: HPS error (level editing) - by mrscoomich - 03-21-2012, 11:06 PM
RE: HPS error (level editing) - by DaAinGame - 03-21-2012, 11:07 PM



Users browsing this thread: 1 Guest(s)