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
Callback when enemy changes to inactive
Reminiscity Offline
Member

Posts: 81
Threads: 16
Joined: Jan 2013
Reputation: 2
#3
RE: Callback when enemy changes to inactive

(11-17-2017, 06:38 PM)Mudbill Wrote: GetEntityExists() might do what you need. If not, perhaps you can just create your own boolean and manually flip it whenever you enable/disable the enemy.

The problem is that it seems like the enemy exists while being inactive. The boolean thing can't work because I have no way to manually flip it when the enemy despawns automatically(when the enemy is out of pathnodes and the player is not looking at it)

(11-17-2017, 07:25 PM)Reminiscity Wrote:
(11-17-2017, 06:38 PM)Mudbill Wrote: GetEntityExists() might do what you need. If not, perhaps you can just create your own boolean and manually flip it whenever you enable/disable the enemy.

The problem is that it seems like the enemy exists while being inactive. The boolean thing can't work because I have no way to manually flip it when the enemy despawns automatically(when the enemy is out of pathnodes and the player is not looking at it)

GOTTEM!!

void checkExist(string &in asTimer){

if(GetEnemyStateName("enemy") != "Hunt" && GetEnemyStateName("enemy") != "Search" && GetEnemyStateName("enemy") != "Patrol"
&& GetEnemyStateName("enemy") != "Wait" && GetEnemyStateName("enemy") != "Alert" && GetEnemyStateName("enemy") != "Investigate"
&& GetEnemyStateName("enemy") != "Track" && GetEnemyStateName("enemy") != "BreakDoor"){

//Do stuff

}

AddTimer("timer_checkExist", 2, "checkExist");

}

My mod Amadeus
(This post was last modified: 11-17-2017, 07:45 PM by Reminiscity.)
11-17-2017, 07:25 PM
Find


Messages In This Thread
RE: Callback when enemy changes to inactive - by Reminiscity - 11-17-2017, 07:25 PM



Users browsing this thread: 1 Guest(s)