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 / Straffing A.I

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 9th Dec 2003 20:23
Is it possible to make A.I. straffe and is it also possible to have friendly A.I as well as enemy A.I. what I wish to do is to break down my code in bits so that the A.I and the player would be separate , the thing is, is it possible to usean "include " command?
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 9th Dec 2003 21:53
yup, '#include "filename.dba"' is the include command
all of what you've said is possible all though quite complicated


GO TO THE ETERNAL DESTINY FORUMS!!! http://forums.eternaldestinyonline.com
Do it now!!!
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 10th Dec 2003 02:52
Yes, it's rather easy to have different types of AI...

Once you have worked out your AI script, if it's coded correctly, you should be able to just set up a single variable and create new functinos for the friendly etc AI's...

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 10th Dec 2003 22:46
I see thank's guy's still is there any way to make the enemy A.I., change to friendly A.I midway through a level?
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 11th Dec 2003 12:00
Yeah, as I said, you should be able to set up a variable that controls exactly what the AI does, such as:

ai_type(1) = #
when # is 1, it's friendly
when # is 2, it's enemy
when # is 3, it's neutral/wandering

Then, when you want to change a friendly AI to an enemy AI, use somethign like:

If condition
If ai_type(1) = 1 Then ai_type(1) = 2
EndIf

That should be all you need to do...

Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-22 00:58:40
Your offset time is: 2025-05-22 00:58:40