Quote: "Please comment code ».«"
Hi guys. I have this piece of code that do the same.
autocam off
sync on
Dim health(10) as float
make object box 100,100,0,100
color object 100,rgb(0,255,0)
set object collision off 100
`Enemies
for i= 1 to 10
make object box i,3,8,1
position object i,-20+i*6,0,0
offset limb i,0,0,5,0
next i
`player
make object sphere 15,5
position object 15,-15,3,-20
position camera 20,50,-80
point camera 20,0,0
do
`Player movements
if upkey() then move object 15,0.1
if downkey() then move object 15,-0.1
if leftkey() then move object left 15,0.1
if rightkey() then move object right 15,0.1
`taking away enemies health
for i= 1 to 10
if object collision(i,15) then dec health(i),0.2
xrotate object i,-health(i)
if health(i)<-90 then health(i)=-90
if object angle x(i)>89 then color object i,rgb(255,0,0)
next i
sync
loop
Cheers.
I'm not a grumpy grandpa
