Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / mulitpile A.I attacking multiple A.I

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 14th Sep 2004 20:54 Edited at: 14th Sep 2004 20:54
I have got the concept of a single a.i charector attacking the player or even another a.i charector but how would I get lots of a.i to attack other a.i?

foer example , say your in a typical 3D 1st person space game and the enemy spacefighters and your squadron are nearing each other for battle and you press a command on your keyboard for your A.I pilots to "Break and and Attack" ? how exactly is that done?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 14th Sep 2004 22:36
Vampyre,
It should be done exatly the same way that it is for the player object.

Let's say you use a simple distance check between enemy and player to see if the enemy should attack or not, and if you're close enough, it may even become more accurate etc.

Well, what you then do, is extend that so that the enemy checks to see who is closer regardless if it is enemy or player. Then, they attack that object.

If you want more intelligent attacks, simply develop the more advanced stuff for the player first, then expand it to encompass a check for all enemies and player alike

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 15th Sep 2004 08:26 Edited at: 16th Sep 2004 01:38
Yeah so do I use objectid ? I am just trying to work this out as I have most of it worked out and I am trying to get everything I need, all my vehicle code and player code is done but it's just I am having a few doubts I suppose, a lack of confidence as it is only me at the moment doing everything as I have done all the models (execpt the planets) for my game.

Login to post a reply

Server time is: 2025-05-25 16:51:57
Your offset time is: 2025-05-25 16:51:57