The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Brute won't stop attacking door
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Brute won't stop attacking door

I'm trying to make a script where a brute is approaching the player, and if the player chooses to close an unbreakable door on it, it will pound on the door for about ten seconds, and then give up and walk away. However, even though I've tried to disable all its triggers and clear its patrol route, it will never stop attacking the door. Here's the script:

PHP Code: (Select All)
void CheckDoor(string &in asParentstring &in asChildint alState)  //called by an area around the door
{
    if(
GetLocalVarInt("InTerror")==&& GetSwingDoorClosed("prison_2"))  //makes sure the player is inside the room with the door closed
    
{
        
SetEnemyDisableTriggers("servant_brute_1"true);
        
SetSwingDoorLocked("prison_2"truetrue);
        
SetEntityPlayerInteractCallback("prison_2""DoorJam"true);
        
AddTimer(""10"RerouteMongrel");
    }
}

void RerouteMongrel(string &in asTimer)
{
    
ClearEnemyPatrolNodes("servant_brute_1"); //clears the node inside the room
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_2"0.001f"");  //adds the nodes leading down an adjacent hallway
    
AddEnemyPatrolNode("servant_brute_1""PathNodeArea_3"0.001f"");


The door locks and adds the callback so I know the function itself is working, but the brute still refuses to leave the door alone.

(This post was last modified: 06-14-2012, 09:54 AM by Damascus.)
06-14-2012, 08:37 AM
Find


Messages In This Thread
Brute won't stop attacking door - by Damascus - 06-14-2012, 08:37 AM
RE: Brute won't stop attacking door - by Adny - 06-14-2012, 08:49 AM
RE: Brute won't stop attacking door - by Damascus - 06-14-2012, 08:54 AM
RE: Brute won't stop attacking door - by Adny - 06-14-2012, 09:06 AM
RE: Brute won't stop attacking door - by Damascus - 06-14-2012, 09:54 AM
RE: Brute won't stop attacking door - by Adny - 06-14-2012, 10:14 AM
RE: Brute won't stop attacking door - by Datguy5 - 06-14-2012, 02:53 PM
RE: Brute won't stop attacking door - by Dutton - 06-14-2012, 09:32 AM
RE: Brute won't stop attacking door - by Damascus - 06-14-2012, 07:24 PM



Users browsing this thread: 1 Guest(s)