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
Amnesia Scripting help?
onv Offline
Member

Posts: 51
Threads: 12
Joined: Feb 2012
Reputation: 2
#3
RE: Amnesia Scripting help?

There is a mistake in your .hps file , you're using the CustomSubItemTypeName instead of the key's name in your script , try this :



////////////////////////////

// Run when the map starts
void OnStart()

{
AddUseItemCallback("", "Key_1", "LockedDoor1", "UsedKeyOnDoor", true);
}

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

////////////////////////////

// Run when entering map

void OnEnter()
{

}

////////////////////////////

// Run when leaving map

void OnLeave()
{

}

I would really appreciate +rep if it worked Big Grin
(This post was last modified: 08-18-2012, 06:23 PM by onv.)
08-18-2012, 06:20 PM
Find


Messages In This Thread
Amnesia Scripting help? - by taylor122002 - 08-17-2012, 01:50 AM
RE: Amnesia Scripting help? - by Adny - 08-17-2012, 04:08 AM
RE: Amnesia Scripting help? - by onv - 08-18-2012, 06:20 PM
RE: Amnesia Scripting help? - by taylor122002 - 08-20-2012, 10:06 PM
RE: Amnesia Scripting help? - by onv - 08-19-2012, 11:17 AM
RE: Amnesia Scripting help? - by onv - 08-20-2012, 03:17 PM



Users browsing this thread: 2 Guest(s)