ok....... i am making a cloud type game...... where ur the cube.. and u jump from cloud to cloud ((( rite now the clouds are cubes....))) but how do i make it so that when the cube jumps on a cloud... the cloud bounces down and then slowly back up.... it is hard to explain what i want.... but i tried... here is my code just in case u need it... ((( srry about not indenting.... i'm not used to it yet... lol )))
`the start...
autocam off
sync on
sync rate 120
`make a player object
gosub _speler
`make a simple level
gosub _level1
rem Main loop
do
`movement
if upkey()=1 then move object 1,0.8
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-2.5)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+2.5)
if spacekey()=1 and playergrav#=0.0 then playergrav#=2.0
rem Use camera tracker to follow player object
`change these parameters for other camera positions
angle#=object angle y(1)
camdist#=25.0 : camhigh#=posy#+8.0 : camfade#=3.5
set camera to follow posx#,posy#,posz#,angle#,camdist#,camhigh#,camfade#,1
`player position
posx#=object position x(1)
posy#=object position y(1)
posz#=object position z(1)
`camera position
cposx#=camera position x()
cposy#=camera position y()
cposz#=camera position z()
position object 2,cposx#,cposy#,cposz#
rem Handle a touch of gravity
playergrav#=playergrav#-0.1
posy#=posy#+playergrav#
rem Handle sliding collision for player object with other objects
position object 1,posx#,posy#,posz#
if object collision(1,0)>0
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
if get object collision y()<0 then playergrav#=0.0
endif
rem camera collision
if object collision(2,0)>0
dec cposx#,get object collision x()
dec cposy#,get object collision y()
dec cposz#,get object collision z()
endif
position object 2,cposx#,cposy#,cposz#
position camera cposx#,cposy#,cposz#
ghost object on 1
backdrop on
color backdrop rgb(0,0,255)
rem Update with new object position
position object 1,posx#,posy#,posz#
rem Tilt camera down a little
xrotate camera 15
rem Update screen
sync
rem End loop
loop
`maak de speler
_speler:
make object box 1,10,10,10
color object 1,rgb(0,255,0)
position object 1,0,0,0
make object collision box 1,-5,-5,-5,5,5,5,0
`en het object voor de camera
make object cube 2,1
make object collision box 2,-0.5,-0.5,-0.5,0.5,0.5,0.5,0
hide object 2
return
`LEVEL 1
_level1:
make object box 500,20,5,20
position object 500,0,-20,0
color object 500,rgb((255),(255),(255))
make object collision box 500,-10,-2.5,-10,10,2.5,10,0
make object box 501,20,5,20
position object 501,0,-20,35
color object 501,rgb((255),(255),(255))
make object collision box 501,-10,-2.5,-10,10,2.5,10,0
return
THANKS FOR STOPING AT A RED LIGHT... AND LETTING ME CRASH INTO YOU AT 80 MILES AN HOUR!!!