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 with Amnesia Level Editor
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#25
RE: Help with Amnesia Level Editor

Collide is when, well, two entities collide. =p "Activate" is a loose term.

I think what you mean is "callback."

When a lever is pulled (a "state change"), it will call(back) whichever function you specified, thus executing your script. You can set a callback for collides, interactions, on pickup etc etc, as well. The basic formula will apply.

Anyway, use this to call a function when you pull a lever:

PHP Code: (Select All)
void SetEntityConnectionStateChangeCallback(stringasNamestringasCallback);

//Callback syntax is:

void Func(string &in asEntityint alState

//State can either be 1, 0, or -1
//I'm not quite sure this works with doors 

To answer your second question, use this for interactions with doors:

PHP Code: (Select All)
void SetEntityPlayerInteractCallback(stringasNamestringasCallbackbool abRemoveOnInteraction);

//Callback syntax

void MyFunc(string &in asEntity

Now, you want something to happen if the player interacts with a locked door, correct?

Do something like this:

PHP Code: (Select All)
void CallbackForPlayerInteract(string &in asEntity)
{
     if(
GetSwingDoorLocked("doorname"))
      {
         
//Do something if locked
      
}
    
      else
      {
         
//Do something if unlocked, or omit this if you don't want anything to happen
      
}



Play around with it a bit. =p If you need any more help, lemme know.

RAISE YOUR DONGERS ヽ༼ຈل͜ຈ༽ノ
04-27-2013, 11:02 PM
Find


Messages In This Thread
Help with Amnesia Level Editor - by Natsu - 04-26-2013, 02:05 PM
RE: Help with Amnesia Level Editor - by Romulator - 04-26-2013, 02:22 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-26-2013, 02:41 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-26-2013, 02:49 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 02:31 AM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 05:07 AM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 05:34 AM
RE: Help with Amnesia Level Editor - by Daemian - 04-27-2013, 05:26 AM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 05:31 AM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 05:39 AM
RE: Help with Amnesia Level Editor - by Daemian - 04-27-2013, 07:07 AM
RE: Help with Amnesia Level Editor - by Daemian - 04-27-2013, 10:40 AM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 02:59 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 05:01 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 09:06 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 10:14 PM
RE: Help with Amnesia Level Editor - by Tomato Cat - 04-27-2013, 11:02 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-27-2013, 11:44 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-28-2013, 06:46 PM
RE: Help with Amnesia Level Editor - by Natsu - 04-28-2013, 08:14 PM
RE: Help with Amnesia Level Editor - by Natsu - 12-30-2013, 01:25 PM



Users browsing this thread: 1 Guest(s)