Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Amnesia editor - Help with scripting // Keys??
Racingcreed Offline
Junior Member

Posts: 39
Threads: 12
Joined: Dec 2012
Reputation: 3
#7
RE: Amnesia editor - Help with scripting // Keys??

Can I ask, is this correct?

In this example:

////////////////////////////
// Run when entering map
void OnEnter()

{
AddUseItemCallback("", "Key01", "Door01", "FUNCTION", true);
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door01", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem("Key01");
}

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

}

The adduseitemcallback is the list where you add the functions of a key. So for example, if I wanted to add additional key usages, I would add an additional line with different key names & doors?

The void FUNCTION line determines what the word "FUNCTION" does if used in the line with adduseitemcallback? And if I wanted a different result, I would add an addition set of scripts below with links to a different word to give the items a different set of coding meaning?

Is that right?

I have no idea what the bottom half means :/

Every artist dips his brush in his own soul, and paints his own nature into his pictures. - H.W.B

12-05-2012, 09:55 PM
Find


Messages In This Thread
RE: Amnesia editor - Help with scripting // Keys?? - by Racingcreed - 12-05-2012, 09:55 PM



Users browsing this thread: 2 Guest(s)