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
Pulling lever to trigger door unlock & monster
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#2
RE: Pulling lever to trigger door unlock & monster

void OnStart()
{
SetEntityConnectionStateChangeCallback("ENTER_LEVER_NAME", "ENTER_FUNCTION_NAME");
}

void ENTER_FUNCTION_NAME(string &in asEntity, int alState)
{
if(alState == 1 || alState == -1) //Pull lever up or down to open the door
{
    SetSwingDoorLocked("ENTER_DOOR_NAME", false, false);  //unlocks the door
    SetEntityActive("ENTER_MONSTERNAME", true);
    AddEnemyPatrolNode("ENTER_MONSTERNAME", "ENTER_PATHNODE_NAME", 0.1f, ""); //Copy this to add more pathnodes
}
else
{
//Nothing, what happens if the lever is in the middle
}
}
There you go Wink
He will disappear after finishing the pathnodes and reaching a specific distance.

[Image: 18694.png]
(This post was last modified: 07-20-2012, 02:13 AM by Ongka.)
07-20-2012, 02:12 AM
Find


Messages In This Thread
RE: Pulling lever to trigger door unlock & monster - by Ongka - 07-20-2012, 02:12 AM



Users browsing this thread: 1 Guest(s)