Game Development Community

Searching an area around a unit constantly?

by Julian Ridley · in Torque Game Engine · 01/17/2005 (6:14 pm) · 3 replies

I was wondering, can I search an area around a unit constantly? IE when someone is within 10 feet of the unit it attacks? Any help would be appreciated.

#1
01/17/2005 (6:39 pm)
I think you are looking for triggers, if I understand you correctly.


http://www.garagegames.com/docs/torque/general/ch06s02.php

How's this?
#2
01/17/2005 (6:44 pm)
Not quite. for example, in an RTS game, most of the time if an enemy unit comes within so many feet of your unit, your unit will auto attack. I am looking to make constant checks like that.
#3
01/17/2005 (10:37 pm)
Julian, there are resources about the topic you ask. In fact, Mark Holcomb has written some AI scripts which do that. Search for resources by Mark Holcomb, and about half of them will have what you are looking for.