well 1st the ai.
so far i have got this gaurd well currently a box going backuard and forward i made this code with the help of sabberdude but i need it to go in a square.
rem make object (gaurd)
Make Object Box 1,10,50,10
rem Make coridinates for gaurd ro go to (chaeck points)
posx1# = 100
posy1# = 0
posz1# = 0
posx2# = -100
posy2# = 0
posz2# = 0
REM (move gaurd to write position) starting position
Position Object 1,0,0,0
rem turn object (gaurd) when reaches a position
Point Object 1, posx2#,posy2#,posz2#
rem position the camera
Position Camera 0,0,450
rem turn object (gaurd) when reaches a position
Point Camera Object Position X(1),Object Position Y(1),Object Position Z(1)
Do
rem make gaurd walk
Move Object 1,0.1
rem rotates the object (gaurd) when reaches position
If Object Position X(1)=>Posx1#
point object 1,posx2#,posy2#,posz2#
EndIf
text 10,10,"POSX: "+str$(Object position X(1))
text 10,30,"POSZ: "+str$(Object position Z(1))
If Object Position X(1)=<Posx2#
point object 1,posx1#,posy1#,posz1#
EndIf
Loop
2nd how can i make it so when you go near a gurd it plays an animation. i have got this copde and put it in my game but it did not work??
if dist# < 40
position camera X,Y,Z
yrotate camera ENEMY ANGLE
gosub check
endif
check:
if object on screen(Player)
DOSE WHAT YOU WANT HERE
endif
3rd off topic of ai how can i make it so thjat when you fire and a bullet hits a gaurd it plays an animation.