I bought Dark Ai yesterday and I've managed to setup obstacles an enemy, and a player. The enemy is able to find the player based on if he is in the Ai system and if he can fire then gets the player x,z position and then have the enmey go to that position
sync on
sync rate 60
AI Start
AI Set Radius 5
autocam off
position camera 0,100,0
xrotate camera 90
rem make floor
make object box 1,100,5,100
color object 1,28
rem enemy
make object sphere 2,10
position object 2,20,10,0
AI Add Enemy 2
AI Set Entity Speed 2,10.0
AI Set Entity Aggressive 2
AI Entity Strafe Target 2
color object 2,rgb(76,12,3)
rem player
make object cone 3,10
position object 3,5,10,5
xrotate object 3,90
AI add player 3
Fix Object Pivot 3
color object 3,rgb(15,87,32)
set object 3,1,1,0
rem make obstacle
make object cube 4,10
position object 4,10,10,20
AI add static obstacle 4
make object cube 5,10
position object 5,-10,10,-20
AI add static obstacle 5
make object cube 6,10
position object 6,-20,10,5
AI add static obstacle 6
make object cube 7,10
position object 7,10,10,-20
AI add static obstacle 7
make object cube 8,10
position object 8,30,10,-20
AI add static obstacle 8
AI complete obstacles
do
if upkey()=1
move object 3,0.25
endif
if downkey()=1
move object 3,-0.25
endif
if leftkey()=1
turn object left 3,5
endif
if rightkey()=1
turn object right 3,5
endif
if Ai entity exist(2)=1
if ai get entity can fire(2)=1
x# = Ai get player x()
z# = Ai get player z()
AI Entity Go To Position 2, x#, z#
endif
endif
AI Debug Show paths 10
AI update
sync
loop
AMD Athlon 64 x2 Dual Core Processor 3800+,MMX 3DNOW (2CPUs)
1024 MB RAM
GeForce 7300 GT 512 MB