Basic AI
by Univ. of Michigan Dearborn (#001 · in RTS Starter Kit · 04/11/2006 (10:41 pm) · 0 replies
Ok, I'm "new" to Torque and the RTS-SK in general. I've been working with it for a couple months now, and now I'm trying to get a basic AI in my game. At the moment I'm just trying to get my units to do a couple very basic things.
I'm trying to get a unit to attack if an enemy unit comes within a certain radius. Now my question is where can I put this code? Basicly I want my units to be "constantly" looking around within their vision radius, and if they see an enemy unit, attack it. I think I how to have them look around and attack if they see an enemy. But my question is where can I put this code? I basicly need the units to look for an enemy every second or couple of seconds. How can I do this? Any ideas?
Thanks in advance,
-Nick
On a similar note, I really am disapointed on the lack of documentation with the RTS-SK. Even some more code comments would have been nice.
I'm trying to get a unit to attack if an enemy unit comes within a certain radius. Now my question is where can I put this code? Basicly I want my units to be "constantly" looking around within their vision radius, and if they see an enemy unit, attack it. I think I how to have them look around and attack if they see an enemy. But my question is where can I put this code? I basicly need the units to look for an enemy every second or couple of seconds. How can I do this? Any ideas?
Thanks in advance,
-Nick
On a similar note, I really am disapointed on the lack of documentation with the RTS-SK. Even some more code comments would have been nice.
About the author