Search found 2 matches
- Sat Dec 24, 2011 4:37 pm
- Forum: QuakeC Programming
- Topic: Help modifying code. Targeting System.
- Replies: 3
- Views: 1276
Re: Help modifying code. Targeting System.
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 target ev...
- 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: 8121
Basically what you do push/pull for every member in the group/swarm/flock. I wrote some code for this in nexuiz, heres the relevant part: vector steerlib_repell(vector point,float maximal_distance) { float distance; vector direction; distance = bound(0.001,vlen(self.origin - point),maximal_distance)...