Here is how i would do it to track the closest target. Code assumes you use a non arcane qcc.
.entity my_targ; // Keep track of last-best target.
float target_system(float range)
{
entity targ; // Chain of ents in range
entity best_target; // Closest valid target
float dist; // Distance to ...
Search found 2 matches
- Sat Dec 24, 2011 4:37 pm
- Forum: QuakeC Programming
- Topic: Help modifying code. Targeting System.
- Replies: 3
- Views: 1791
- Tue Jun 21, 2011 9:12 pm
- Forum: Artificial Intelligence
- Topic: I want to test swarm-like behaviour in Quake some day ...
- Replies: 3
- Views: 14750