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 / Artificial Intelligence Tutorials

Author
Message
Specters
19
Years of Service
User Offline
Joined: 30th Sep 2005
Location: idaho
Posted: 27th Oct 2005 00:29
Before you read, I did not write all of these, they are just code all over the place and thought it would be nice for anyone who just wants to look in one place. Here they are.

Enemy Check Points
By, TDK



Object Hit returns the number of the waypoint you bump into and you can use this number to calculate the number of the next waypoint - and thus the element of the array to get that waypoint\'s X and Z location to point the cube at.

The waypoints are objects 2, 3, 4 and 5, so if Object Hit returns a 3 then we know that the next waypoint is object 4.

The cube is object 1, so if any value greater than 1 is returned then we have reached a waypoint. If the \'NextFlag\' is 6 then it doesn\'t exist so we set it to the first waypoint which is object 2.

If you remove the Rem on line 16, the waypoints are invisible, but until you know it works, it\'s useful to be able to see them.

TDK_Man

********************************************************************

Enemy
By, Lucas W



********************************************************************

So far that is all there is now. Please post your own AI tutorials, remember if I wrote these, my name would be under the title. I will be updating this thread.

Drew G

Free Ipod
http://ipods.freepay.com/?r=24268699
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Oct 2005 01:20
I made one for DBpro, but this is DBC chat


Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 27th Oct 2005 19:48
Wandering cows
Sven B


Originally created for my friend Xenoschythe.

Immunity and Annihalation makes Immunihalation...
Anto
19
Years of Service
User Offline
Joined: 30th Oct 2005
Location: Brisbane, AUS
Posted: 31st Oct 2005 06:50
Drew

Hi, i've tried to run your A.I. Code under DBC 1.13 It won't run, got problems on this line

_State$(x) = \"idle\"

"Unrecognised Parameters"

Anto
Specters
19
Years of Service
User Offline
Joined: 30th Sep 2005
Location: idaho
Posted: 2nd Nov 2005 20:35
Oh Anto lol, make it like this, _State$(x) = "idle", it should then work. take off the \

Hope I helped, I will edit it up there...

My New Website : sealgames.tk
Anto
19
Years of Service
User Offline
Joined: 30th Oct 2005
Location: Brisbane, AUS
Posted: 10th Nov 2005 04:34
Yes it worked no problem...

Very useful Artificial Intelligence Tutorial!
why you put \"idle\" like that at first place?

Thanks mate

Anto

Login to post a reply

Server time is: 2025-05-22 17:08:40
Your offset time is: 2025-05-22 17:08:40