Nearest entity...

Blitz3D Forums/Blitz3D Programming/Nearest entity...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

That's similar to what I'm already doing. Each turret has a 4 second timer which, when it expires, triggers the turret to scan for a new target. As the level is loaded, each turret's timer is set to a random offset between zero and four seconds.

But your way's actually better, since it sets a maximum number of turrets to process, and doesn't allow it to be exceeded, whereas my way is prone to "clumping" of timers expiring.