Posted: 31st Oct 2004 10:11
Edited at: 31st Oct 2004 10:31
found it in the 2D section.. was wondering if anyoen could explain this script cause this is what i need.. also.. can DarkBasic Pro read DarkBasic script (DB regular i mean...)
BTW explaining this would really help me alot cause its how i think and work.. like when i used flash MX i didnt understand anything till someoen explained one of their game scripts..
` This code was downloaded from The Game Creators
` It is reproduced here with full permission
` http://www.thegamecreators.com
` 2D GTA
` Created By Ryan & Alex
sync on
sync
px=50
py=25
dx=px+1
do
cls
` boundaries
if x <10
x=150
endif
if y <10
y=150
endif
if x >625
x=625
endif
if px >625
px=625
endif
if y >450
y=450
endif
if py >450
py=450
endif
if py=y
print "your dead"
wait 1500
end
endif
` end of boundaries
` have pedestrian follow you
if px+1 >x+1
px=x
endif
if px-2 >x-2
px=x
endif
if py-1 >y+1
py=y-11
endif
if py+1 >y-0
py=y-1
endif
if py+0 >y+11
py=y
endif
if py=y
py=y-24
endif
if py=y
py=y-0
endif
` end have pedestrian follow you
if upkey()=1 then y=y-3
if downkey()=1 then y=y+3
if leftkey()=1 then x=x-3
if rightkey()=1 then x=x+3
if spacekey()=1
ink rgb(254,0,0),1
circle x,y,5
circle x,y,4.5
circle x,y,4
circle x,y,3.5
circle x,y,3
circle x,y,2.5
circle x,y,2
circle x,y,1.5
dot x,y
ink rgb(254,0,0),1
line x+9.5,y-5,x+4,y+5
endif
` guy
ink rgb(254,0,0),1
circle x,y,3
circle x,y,2.5
circle x,y,2
circle x,y,1.5
circle x,y,1
` eyes
dot x,y
ink rgb(0,0,0),2
dot x+1,y-2
dot x-1,y-2
` end eyes
` arm
ink rgb(254,0,0),1
line x+7.5,y-3,x+3,y+3
` end arm
` sheild
ink rgb(0,511,0),3
line x-13,y-4,x-3,y-4
` end shield
ink rgb(254,0,0),1
line x-7.5,y-3,x+4,y+3
ink rgb(254,0,0),1
line x-2,y+7,x+0,y+3
` pitch fork
ink rgb(254,254,254),2
line x+7,y-10,x+7,y
line x+2,y-10,x+7,y-10
line x+12,y-10,x+8,y-10
line x+12,y-17,x+12,y-10
line x+2,y-17,x+2,y-10
line x+7,y-20,x+7,y-10
if x=pxy
x=pxy
endif
` end pitch fork
` end guy
` pedestrian
ink rgb(0,254,0),2
circle px,py,3
circle px,py,2.5
circle px,py,2
circle px,py,1.5
circle px,py,1
circle px,py,0.5
circle px,py,0
ink rgb(0,0,0),2
dot px+2,py+1
dot px+2,py-1
` end pedestrian
` pedestrian gun
ink rgb(254,254,254),1
line px+7.5,py--3,px+3,py--3
px=px+1
py=py+1
` end pedestrian gun
sync
return
loop