Game Development Community

Ai that attack

by CSUMB (#0032) · in Torque Game Engine · 02/19/2005 (7:15 pm) · 2 replies

Hi all,

I'm sure this has been discussed before, I'm having trouble finding it when search the forums. Are there any tutorials (or example code/discussions) on how to use the Torque Script to create an "attacking AiPlayer"?

I followed the tutorial on "codesampler" that gets an AiPlayer to follow a path, and I can deteremine when he collides with the player, but I'd be interested in seeing how people use the script to attack a player.

[ I'm interested in a brain-dead approach, where the Aiplayers just try to go straight to the player and attack.]

I thought about doing this using the scheduler to constantly update the aiPlayers target as the "real" player. Just wonder if that is the best way.

Any pointers, suggestions, are greatly appreciated.

-Michael

#1
02/19/2005 (7:49 pm)
You can just make a script look that does a containerradiussearch around the bot to look for players every 500ms or so.

This resource: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3782
covers this method pretty well
#2
02/19/2005 (8:34 pm)
Eric:

Your pointer is great, exactly what I'm looking for. I'll try to port it to the
"tutorial.base", i can tell this script is for the "fps.starter".

Many many thanks -- this forum is great, someone always answers my questions in a matter of hours!