Does anyone actually know how to use the ODE physics commands in the 5.9 upgrade. Or is there a list of commands to use, because I'm stuck for restarting a level/making a new level, that both contain ODE physics commands. The objects will behave normally as expected in the first ODE case and then when the level is restarted, some of the objects cant be moved, some become extra specially bouncey and others don't register their collisions with other objects.
Do you require my source to see what I am doing wrong? (This won't work in 6.2, I've tried it.)
sync on : sync rate 30
`load image "Images\Tex1.bmp",1
`load image "Images\John tex.bmp",2
`load image "Images\Box.bmp",3
`load music "Music\Rock dance.mp3",1
RESTART:
make camera 1
position camera 1,-250,250,-250
point camera 1,0,0,0
set ambient light 25
color backdrop 1,0
ode start : ode set world gravity 0,-5,0 : ode set world step 0.05
ode set world erp (0.2)*2.5 : ode set world cfm (10^-5)*2.5
make object box 1,5000,1,5000
position object 1,0,-5,0
` texture object 1,1
ode create static box 1
make object sphere 2,15
position object 2,-70,50,0
` texture object 2,2
ode create dynamic sphere 2
ode set contact fdir1 2,250
ode set body mass 2,10
ode set contact bounce 2,1000
set shadow shading on 2,-1,400,1
make object box 3,50,25,50
position object 3,-50,12.5,0
` texture object 3,1
ode create dynamic box 3
ode set contact fdir1 3,100000
ode set body mass 3,100000
set shadow shading on 3,-1,400,1
make object box 4,50,25,50
position object 4,50,12.5,0
` texture object 4,1
ode create dynamic box 4
ode set contact fdir1 4,100000
ode set body mass 4,100000
set shadow shading on 4,-1,400,1
make object box 5,25,45,25
position object 5,-40,100,0
` texture object 5,3
ode create dynamic box 5
ode set contact fdir1 5,500
ode set body mass 5,100
set shadow shading on 5,-1,400,1
make object cone 6,5
position object 6,50,30,0
ghost object on 6
make object sphere 7,2
position object 7,-100,5,0
ghost object on 7
set shadow position 0,-150,400,-200
set point light 0,-150,400,-200
wait 100
do
` play music 1
` loop music 1
X#=object position x (2) : Y#=object position y (2) : Z#=object position z (2)
position camera 1,0,100,-250
point camera 1,0,0,0
position object 5,0,50,0
if rightkey()=1 then ode set linear velocity 2,5,-5,0
if leftkey()=1 then ode set linear velocity 2,-5,-5,0
if downkey()=1 then ode set linear velocity 2,0,-5,-5
if upkey()=1 then ode set linear velocity 2,0,-5,5
if downkey()=1 and rightkey()=1 then ode set linear velocity 2,5,-5,-5
if downkey()=1 and leftkey()=1 then ode set linear velocity 2,-5,-5,-5
if upkey()=1 and rightkey()=1 then ode set linear velocity 2,5,-5,5
if upkey()=1 and leftkey()=1 then ode set linear velocity 2,-5,-5,5
if spacekey()=1 and object collision (2,0) and SE=>50 then SE=0 : ode set linear velocity 2,0,25,0
inc SE
if escapekey()=1 then gosub QUIT
if object collision (2,6) then gosub QUIT
if object collision (2,7) then ode set linear velocity 2,0,50,0
if inkey$()="1" then gosub DELETE : gosub RESTART
for odesteps=1 to 4 : ode update : next odesteps
sync
loop
DELETE:
if object exist (1) then delete object 1
if object exist (2) then delete object 2
if object exist (3) then delete object 3
if object exist (4) then delete object 4
if object exist (5) then delete object 5
if object exist (6) then delete object 6
if object exist (7) then delete object 7
if object exist (8) then delete object 8
if object exist (9) then delete object 9
if object exist (10) then delete object 10
if object exist (11) then delete object 11
if object exist (12) then delete object 12
if object exist (13) then delete object 13
if object exist (14) then delete object 14
if object exist (15) then delete object 15
if object exist (16) then delete object 16
if object exist (17) then delete object 17
if object exist (18) then delete object 18
if object exist (19) then delete object 19
if object exist (20) then delete object 20
delete camera 1
return
QUIT:
end
Use the arrowkeys to move the sphere around, the original idea was to push the exceedinly heavy box into the gap between the 2 platforms and walk across it to get to the end of the level. (The cone at the far right.) If you fall off you can use the boost sphere (The sphere at the far left.) to get back up.
Space to do a sort of laim jump that I can't program propperly.
Please say someone out there still uses 5.9 ODE commands and knows what to do.