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
Entity Activate/Deactivate?
Bonehead Offline
Member

Posts: 50
Threads: 12
Joined: Apr 2013
Reputation: 1
#11
RE: Entity Activate/Deactivate?

Here's my entire script.

void OnStart()
{
SetEntityPlayerInteractCallback("key_tower_1", "ActivateMonster", true);
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
SetEntityCallbackFunc("chemical_container_full_1", "OnPickup");
}


void OnEnter()
{

}

void OnLeave()
{
}

void ActivateMonster(string &in item)
{
SetEntityActive("servant_brute_1", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_2", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("armour_nice_complete_8", true);
SetEntityActive("armour_nice_complete_7", true);
SetEntityActive("armour_nice_complete_6", false);
SetEntityActive("armour_nice_complete_5", false);
}
05-19-2013, 05:56 PM
Find


Messages In This Thread
Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 08:05 AM
RE: Entity Activate/Deactivate? - by Kullin - 05-19-2013, 08:32 AM
RE: Entity Activate/Deactivate? - by Romulator - 05-19-2013, 08:39 AM
RE: Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 04:09 PM
RE: Entity Activate/Deactivate? - by 7heDubz - 05-19-2013, 04:12 PM
RE: Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 04:29 PM
RE: Entity Activate/Deactivate? - by Kullin - 05-19-2013, 04:57 PM
RE: Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 05:07 PM
RE: Entity Activate/Deactivate? - by Kullin - 05-19-2013, 05:53 PM
RE: Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 05:56 PM
RE: Entity Activate/Deactivate? - by Kullin - 05-19-2013, 06:56 PM
RE: Entity Activate/Deactivate? - by Bonehead - 05-19-2013, 07:36 PM



Users browsing this thread: 2 Guest(s)