visual-based tracking enitities

Avatar
Fracture
797 Posts
Posted Jul 11, 2013
I noticed the func_tank has outputs for finding and losing targets. I was wondering how it may be possible to implement these elements so as to create an NPC enemy that attacks on sight, much like how the turret functions.

And if the func_tank cannot be used, is there anything else i can use?

Advertisement
Registered users don’t see ads! Register now!
Avatar
FelixGriffin
2,680 Posts
Posted Jul 11, 2013
Replied 8 hours later
You're looking for the npc_enemyfinder.
Avatar
Fracture
797 Posts
Posted Jul 12, 2013
Replied 2 hours later
I tried using that agaisnt the player and nothing happened
Avatar
josepezdj
2,386 Posts
Posted Jul 12, 2013
Replied 7 minutes later

FelixGriffin wrote:
You're looking for the npc_enemyfinder.

Haha, another great entity I know by you, Felix :biggrin: I think this could be great for optimisation purposes instead of a lot of triggers or portal detectors for example :wink:

Avatar
Fracture
797 Posts
Posted Jul 12, 2013
Replied 28 minutes later
im doing something wrong cause I have both a filter and AI_relationship telling the enemyfinder that the player is a target so it can activate a disabled turret. But it is doing nothing

EDIT nevermind, I accidentally put the number for max search distance into min search distance

Avatar
FelixGriffin
2,680 Posts
Posted Jul 12, 2013
Replied 7 hours later

josepezdj wrote:
FelixGriffin wrote:

You're looking for the npc_enemyfinder.

Haha, another great entity I know by you, Felix :biggrin: I think this could be great for optimisation purposes instead of a lot of triggers or portal detectors for example :wink:

I found this one in an old rocket turret instance, someone had used it with a tracking point_spotlight to rebuild the entity from scratch in Portal 2.

Avatar
Fracture
797 Posts
Posted Jul 19, 2013
Replied 6 days later
Okay this thing is actually being a real pain. The last 4 keyvalues minus the last one have me confounded. Do they seriously have to word it like this because i have no idea what they mean here.

also does blocklos effect this entity?

Avatar
FelixGriffin
2,680 Posts
Posted Jul 19, 2013
Replied 6 hours later
Those keyvalues should be fine left default.

And yes, it does.

Avatar
Fracture
797 Posts
Posted Jul 19, 2013
Replied 13 hours later
well i tested it and it did nothing.
Avatar
FelixGriffin
2,680 Posts
Posted Jul 20, 2013
Replied 17 hours later
There's a sample rocket turret map somewhere, the one I found the entity in. Look at that one.

Here's the video I downloaded it from: http://www.youtube.com/watch?v=bu-FQq2xk40

Advertisement
Registered users don’t see ads! Register now!
Avatar
boctroy
51 Posts
Posted Jul 27, 2013
Replied 6 days later
i put 2 of these npc_enemyfinders on either side of a func_movelinear, so if it detects the player on one side it will open, and on the other side it will close. i set the field of view to 0.0 so it detects on -+ 90*, set the player to hated in the ai_relationship. It does not seem to detect the player, if there is somthing i missed, or if i am doing this wrong please let me know.

oh and everything is ON, active, enabled ect

thanks for any help.

Edit
i was walking around in the map and it randomly started moving, I am not sure why but it is telling me that it is detecting the player, just not in the right spot. The npc_enemyfinders are facing the right directions.