Alright thanx for that, I get this part but what if I want to increase the number of boxes and want them to be positioned random in the x and y axes and not in the same place
one more thing how do I make them for example thicker and then smaller I mean I changed my code to this
REM Project: game test
REM Created: 2009-02-09 18:45:52
REM
REM ***** Main Source File *****
REm
`Init
sync on
sync rate 60
hide mouse
autocam off
backdrop on
color backdrop 0
set camera range 0.5,10000000
`The player
make object cube 1,40
color object 1,rgb(0,255,0)
position object 1,0,250,-500
sc_setupcomplexobject 1,0,2
make object box 111,10000,20,500
color object 111,rgb(0,0,255)
position object 111,0,0,-500
sc_setupobject 111,1,0
`The ground
obj=2
for bx=0 to 50
make object box obj,200,20,500
position object obj,bx*200,bx*200,0
sc_setupobject obj,1,2
obj=obj+1
next bx
`The main loop
do
`Setting the camera to follow the player
set camera to follow object position x(1),object position y(1),object position z(1),object angle y(1),280.0,80.0,10.0,1
`Some collision varables
ox#=object position x(1)
oy#=object position y(1)
oz#=object position z(1)
`Movments
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+4)
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-4)
if upkey()=1 then move object 1,8
if downkey()=1 then move object 1,-8
if spacekey()=1 and jump=0
jump=1
force#=15.0
endif
y#=y#+force#
force#=force#-0.5
if force#<-8.0 then force#=-8.0
position object 1,object position x(1),y#,object position z(1)
x#=object position x(1)
y#=object position y(1)
z#=object position z(1)
`The collision system
c = sc_sphereslidegroup(1,ox#,oy#,oz#,x#,y#,z#,20,0)
if c > 0
x#=sc_getcollisionslidex()
y#=sc_getcollisionslidey()
z#=sc_getcollisionslidez()
jump=0
endif
py#=object position y(1)
if py#<-800.0
goto die
endif
position object 1,x#,y#,z#
sc_updateobject 1
print py#
remstart
here is the problem
It prints that the object collision with the other object is 1
try it yurself
remend
sync
loop
die:
cls
sync
do
ink rgb(255,0,0),0
set text to bold
set text size 60
set text font "Verenda"
center text screen width()/2-80,screen height()/2-20,"GAME"
center text screen width()/2+80,screen height()/2+20,"OVER"
ink rgb(0,255,0),0
sync
loop
wait 5000
end
I made stairs instead of boxes I want them to be smaller in the top
try the game and you'll understand what I mean
beceause I want he stairs to be 200,20,500 and start changing to 100,20,50
I think you understand now thankx