I know this has had to been asked before, but I looked and couldnt find help with exacally what i need.
I cant get the ball to bounce correctly, can anyone look and see if they can come up with a quick way to do it?
if not I can always start over.
it's driving me crazy!
autocam off : position camera 0, 0, -100 : point camera 0, 0, 0
make object box 1, 5, 20, 5
make object box 2, 5, 20, 5
make object sphere 3, 5 : yrotate object 3,180 : fix object pivot 3
make object box 4, 105, 5, 5
position object 4, 0, 45, 0
make object box 5, 105, 5, 5
position object 5, 0, -45, 0
stage=0
set object collision to boxes 1
sync on
do
oldy#=y#
oldb#=b#
if stage=0 then position object 3, 0, 0, 0 : a#=rnd(360) : stage=1
if stage=1 then v#=newxvalue(v#, a#, 2.0) : c#=newyvalue(c#, a#, 2.0)
if upkey()=1 then y#=y#+3
if downkey()=1 then y#=y#-3
if spacekey()=1 then stage=0
if joystick up()=1 then b#=b#+3
if joystick down()=1 then b#=b#-3
if a#=>0 then d#=0-a#
if a#=<0 then d#=0+a#
position object 3, v#, c#, 0
position object 1, -50, y#, 0
position object 2, 50, b#, 0
if object collision(1, 0)>0
y#=oldy#
else
endif
if object collision(2, 0)>0
b#=oldb#
else
endif
if object collision(3, 0)>0 <---this is where it is messed up. Im
if a#=>360 then a#=0 trying to get it to bounce off of
a#=a#+a# walls, but what shud i use? I kno
else what i have now is completely wrong.
endif
sync
loop