hey there hi i think i've met the deadline *really excited* take a look at only 1 hr's dedicated work (all those days were only few minutes of useless work since i was moreover on univ work) here it is
set display mode 320,240,16
set emulation on
set camera view 100,100,200,200
`init all
gosub HandleInit
load object "H-punk-Idle.x",3
scale object 3,1500,1500,1500
yrotate object 3,180 : fix object pivot 3
color object 2,rgb(50,0,0)
sync on : sync rate 0 : do
if guardstat(1)=1
`if guard wait is over
if stillcounter<0
`move to next point and loop walking animation
move object 1,2.5
point object 1,posx(counter+1),0,posz(counter+1)
xrotate object 1,0 : zrotate object 1,0
if animstate(1)=0
animstate(1)=1
stop object 1
set object frame 1,animframe(3)
endif
else
`if guard is still waiting, dec the counter and play idling
dec stillcounter
if animstate(1)=1
animstate(1)=0
stop object 1
set object frame 1,animframe(1)
endif
endif
`if guard is within the next point radius then change the next point coordinates
if object position x(1)<posx(counter+1)+5 and object position x(1)>posx(counter+1)-5
if object position z(1)<posz(counter+1)+5 and object position z(1)>posz(counter+1)-5
inc counter : stillcounter=maxstill
endif
endif
`if counter is at its end, then reset
if counter>5 then counter=1
`handling animation (see the db examples)
if animpause(1)=0
animpause(1)=4
else
animpause(1)=animpause(1)-1
if animpause(1)=0
if animstate(1)=0 then loop object 1,animframe(1),animframe(2)
if animstate(1)=1 then loop object 1,animframe(3),animframe(4)
endif
endif
endif
`update cam and object
position camera 0,200,0
point camera object position x(3),object position y(3),object position z(3)
`handling movement of player
if upkey()=1 then move object 3,5 : if downkey()=1 then move object 3,-5
if rightkey()=1 then yrotate object 3,wrapvalue(object angle y(3)+5.0)
if leftkey()=1 then yrotate object 3,wrapvalue(object angle y(3)-5.0)
`handling position of view object
yrotate object 2,wrapvalue(object angle y(1))
x#=newxvalue(object position x(1),object angle y(1),60)
z#=newzvalue(object position z(1),object angle y(1),60)
position object 2,x#,12.5,z#
`handling chasing
if guardstat(1)<>3 and object collision(2,3)=1 then guardstat(1)=2
if guardstat(1)=2
loop object 1,animframe(3),animframe(4)
point object 1,object position x(3),0,object position z(3)
move object 1,1
a#=(object position x(3)-object position x(1))^2
b#=(object position z(3)-object position z(1))^2
if sqrt(a#+b#)<50.0 then guardstat(1)=3
e#=(object position x(3)-object position x(1))^2
f#=(object position z(3)-object position z(1))^2
if sqrt(e#+f#)>150.0 then guardstat(1)=1
endif
if guardstat(1)=3
loop object 1,animframe(7),animframe(8)
point object 1,object position x(3),0,object position z(3)
c#=(object position x(3)-object position x(1))^2
d#=(object position z(3)-object position z(1))^2
if sqrt(c#+d#)>50.0 then guardstat(1)=4
endif
sync : loop
HandleInit:
load object "H-SWAT-Idle.x",1
append object "H-SWAT-Move.x",1,total object frames(1)+1
append object "H-SWAT-Attack1.x",1,total object frames(1)+1
scale object 1,1500,1500,1500
yrotate object 1,180 : fix object pivot 1
anim=1
set object speed 1,30
set object interpolation 1,25
make object box 2,50,25,100
ghost object on 2
dim posx(6) : dim posz(6)
make matrix 1,2500,2500,15,15
posx(1)=0 : posz(1)=0
posx(2)=50 : posz(2)=25
posx(3)=100 : posz(3)=300
posx(4)=200 : posz(4)=150
posx(5)=50 : posz(5)=25
counter=1
stillcounter=0
dim animpause(1) : dim animstate(1)
dim animframe(10)
animframe(1)=1
animframe(2)=25
animframe(3)=31
animframe(4)=51
animframe(5)=52
animframe(6)=62
animframe(7)=63
animframe(8)=72
animframe(9)=73
animframe(10)=77
maxstill=30
dim guardstat(1)
guardstat(1)=1
return
sorry for lack of rem comments - just ask if you need help - adiose!
also - you might wanna remove the beginning display adjustments
For when they said I couldn't, I did...