It's been such a long time, holidays time just got in the way, but I'm back now and I've got back to work. I've been concentrating on bug fixing, I have fixed the event handler now so that it works 100%, and I havent manage to brake it again yet.
I have also begun to write in the enemy attack routines. Then now home in and attack you when they are close enough. Its a bit amateurish at the moment but I'm gonna tighten it all up and make it work properly. I have to add tghe collision bits and pieces so they take damage off the player, but I'm getting there.
I thought I'd post a real treat today

I'm gonna put the enemy AI code up in its current form for you all to have a look at. If any of you are any good at coding then please have a look 'cos I really need a hand, cos its hard work for me. Any recommendations or ideas are very much appreciated. Here we go:
Function RunEnemies()
remstart
Enemies$(Index,0)=str$(EType)
Enemies$(Index,1)=str$(objnum)
Enemies$(Index,2)=EnemyStats$(Etype,0)
Enemies$(Index,3)=EnemyStats$(Etype, 2+difficulty() )
uEnemies$(Index,4)=AI
remend
looseradius#=2
enemyspeed#=0.05
reactiontime#=500
`if enemycount()=0 then exitfunction
PX#=object position x(1)
PY#=object position z(1)
set cursor 1,100
for I=0 to enemycount()+1
ObjNum=val( Enemies$(I,1) )
if objnum=0 then goto skipperE::
if object exist(ObjNum)=0 then goto skipperE::
`We have an enemy
AI$=Enemies$(I,4)
Etype=val(enemies$(I,0))
if left$(AI$,1)="D"
goto skipperE::
endif
if left$(AI$,1)="H" and object playing(ObjNum)=0
Enemies$(I,4)=""
endif
`AITHought$=""
if Enemies$(I,4)=""
`descision time!
`endif
if ObjectXDistance(1,ObjNum)>looseradius#
`if abs(py#-object position z(ObjNum))<1
`we arent close enough - bugger, lets move here:
if PX#>object position x(ObjNum)
`we are to left of player
DestX#=PX#-(1 + rnd(2) )
endif
if PX#<object position x(ObjNum)
`we are to right of player
DestX#=PX#+(1 + rnd(2) )
endif
`if PY#>object position z(ObjNum)
`we are above player
` DestY#=PY#+(1 + rnd(1) )
`endif
`if PY#<object position z(ObjNum)
`we are below player
` DestY#=PY#
`-(1 + rnd(1) )
`endif
desty#=py# + ( rnd(1) - 0.5 )
if DestY#>20 then DestY#=20
if DestY#<10 then DestY#=10
`destx#=ToDP#( destx# ,1)
`destz#=ToDp#( destz# ,1)
Enemies$(I,4)=( "M:" + str$(DestX#) + ":" + str$(DestY#) + ":" )
else
`if abs(py#-object position z(ObjNum))<1
Enemies$(I,4)="A"
`endif
endif
`move object ObjNum,enemyspeed#
endif
AI$=Enemies$(I,4)
if left$(AI$,1)="M"
`Run movement
StartFrame=val(GetBit$(EnemyStats$(Etype,8), 0,","))
EndFrame =val(GetBit$(EnemyStats$(Etype,8), 1,","))
AnimSpeed =val(GetBit$(EnemyStats$(Etype,8), 2,","))
if object playing(Objnum)=0
loop object ObjNum,StartFrame,EndFrame
set object speed Objnum,AnimSpeed
else
if object frame(Objnum)<StartFrame or Object Frame(Objnum)>EndFrame
loop object ObjNum,StartFrame,EndFrame
set object speed Objnum,AnimSpeed
endif
endif
DestX#=val(GetBit$(AI$,1,":"))
DestY#=val(GetBit$(AI$,2,":"))
Ex#=object position x(ObjNum)
Ey#=object position y(ObjNum)
Ez#=object position z(ObjNum)
if destx#>Ex#
Ex#=Ex#+enemyspeed#
endif
if destx#<Ex#
Ex#=Ex#-enemyspeed#
endif
if DestY#>Ez#
Ez#=Ez#+enemyspeed#
endif
if DestY#<Ez#
Ez#=Ez#-enemyspeed#
endif
position object Objnum,Ex#,Ey#,Ez#
if abs((Ex#)-(DestX#))<1
if abs((Ez#)-(DestY#))<1
AI$="W:" + str$( timer()+reactiontime# ) + ":"
stop object Objnum
set object frame Objnum,1
endif
endif
if I=0
`text 200,200,str$(int(ex#)) + " = " + str$(int(destx#))
`text 200,220,str$(int(ez#)) + " = " + str$(int(desty#))
endif
endif
if AI$="A"
`Run attack
`settext("I want to kill ya!",10,0)
if int(RND(4))=1
play object ObjNum,73,81
set object speed ObjNum,30
AI$="At"
else
AI$="W:" + str$( int( RND(10) ) )
endif
endif
if AI$="At"
`Run attack
if object playing(Objnum)=0
AI$=""
endif
endif
if left$(AI$,1)="W"
`Run waiting
w#=val(GetBit$(AI$,1,":"))
`text 200,200,str$(timer()) + " / " + str$(w#)
if timer()>=w#
AI$=""
endif
endif
if left$(AI$,1)="I"
if ObjectXDistance(1,ObjNum)<10
AI$=""
endif
endif
Enemies$(I,4)=AI$
if object position x(1)>object position x(ObjNum)
YRotate object ObjNum,90
else
Yrotate object ObjNum,270
endif
`turn object left ObjNum,100
`color object ObjNum,RGB(0,255,255)
skipperE::
`Enemies$(I,4)=AI$
`print "EnemyAI: " + Enemies$(I,4)+ " Onum: " + Enemies$(I,1)
next I
`O=val(Enemies$(1,1))
`text 100,100,"EnemyAI: " + Enemies$(0,4)
`text 100,120,"EnemyAI: " + Enemies$(1,4)
`text 100,140,"EnemyAI: " + Enemies$(2,4)
`if O>0
`if object exist(O)=1
`text 100,400,"Enemypos: X: " + str$(object position x(O)) + " Y: " + str$(object position z(O))
`endif
`endif
`text 100,440,GetBit$(AI$,1,":")
`text 100,460,GetBit$(AI$,2,":")
endfunction 0
I haven't even taken out all the obselete code so its a bit messy, I hope you can make some sense out of it. Ask all the questions you want, but please someone give me a few ideas
Also, I was wondering if anyone out there wanted to help me out with the sound effects. What we really need is a kind of catalogue of the effects that are needed, then they all need to be made/recorded out, and put into the game. If anyone is interested in helping with this then I would be over the moon
Also, I still need some help with levels. Even if its just concept drawings / ideas, anything is a big help. Let me know if you want the job.
Well I hope you like the code. I'm going to fix a few more bugs and play around with the AI. I'll also add the sounds I have to make things a little more professional. As soon as I'm happy with it then I'll release Build 10.
Thanks for sticking with me, I know I've neglected this project for too long.