(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");
}