Quote: "yes i know there are parameters"
im srry i thot i said it butim making an intro 4 my tank game. also ive made part of my tank game but i cant get it to work.
sync on
sync rate 100
make object sphere 1,50
make matrix 2,800,800,10,10
position object 1,0,matrix position y(2)+10,0
dim enmy(10)
for e=3 to enmy
make object sphere e,10
color object E,RGB(255,100,50)
make object sphere e+10,1
position object e, rnd(100),0,rnd(100)
next e
pointer=999
make object box pointer,10,10,50
dim state(enmy)
do
sync
xx=object position x(1)
yy=object position y(1)
zz=object position z(1)
if object exist(500000)
xxx=object position x(500000)
yyy=object position y(500000)
zzz=object position z(500000)
posefg=sqrt((xxx-xx)^2+(yyy-yy)^2+(zzz-zz)^2)
endif
rotate camera object angle x(1),object angle y(1),object angle z(1)
position camera object position x(1),object position y(1)+10,object position z(1)
position object pointer,object position x(1),object position y(1),object position z(1)
if upkey()=1 then move object 1,2
if downkey()=1 then move object 1,-2
if rightkey()=1 then turn object right 1,2
if leftkey()=1 then turn object left 1,2
if keystate(17)=1
if object exist(500000)=0
make object sphere 500000,20
rotate object 500000,object angle x(pointer),object angle y(pointer),object angle z(pointer)
position object 500000,xx,yy,zz
endif
endif
if object exist(500000)
move object 500000,3
if posefg>400
delete object 500000
endif
endif
if keystate(30)=1 then turn object left pointer,2
if keystate(32)=1 then turn object right pointer,2
if object angle y(pointer)>10
rotate object pointer,object angle x(pointer),10,object angle z(pointer)
endif
if object angle y(pointer)<-10
rotate object pointer,object angle x(pointer),10,object angle z(pointer)
endif
for e=3 to enmy
x=object position x(e)
y=object position y(e)
z=object position z(e)
pos=sqrt((x-xx)^2+(y-yy)^2+(z-zz)^2)
if object exist(500000)
pos2=sqrt((x-xxx)^2+(y-yyy)^2+(z-zzz)^2)
endif
if pos2<50
delete object e
delete object 500000
endif
position object e+10,x,y,z
point object e+10, xx-rnd(2)+rnd(2),yy,zz-rnd(2)+rnd(2)
if pos<300
state(e)=1
else
state(e)=2
endif
if state(e)=1
make object sphere e+20, 20
rotate object e+20,object angle x(e+10),object angle y(e+10),object angle z(e+10)
move object e+20,20
wait 10
endif
next e
sync
loop
i cant get the cannon shot to delete when it is within 50 distance of an enemy, and the enemy "ai" doesnt work. also im really a noob 2 these forums and what do u mean by tut downloads section? neway the models i want 2 make rnt 2 complex, just a box, with a sphere in the middle and a cylindar coming out of the sphere
_\^_
[___]
best comp drawing i could do, btw ^ is the part that the cylindar comes out of. Except i dont know how to do that.
to move your guy up and down on the terrain do you just position the y at total terrain height???
the offset limb command- does it move the limb x y z or does it rotate it from the attatched point?
parrot