Alright, thanks to those that provided advice for making the ball bigger. I've modified the program, and I'd like to know two things, if possible:
One - Did I go about making this the right way? Is there anything else I could have done to make the code easier, smaller, etc?
Two - Is it the debugger, or something with the program, that causes "Could not close nest at line 122", or something like that?
Thanks
Jarred
*Edit* Putting the code might help ^_^'
Rem Initialize everything.
sync on:sync rate 100
gosub _initialize_game
gosub _place_cubes
Do
gosub _move_ball
gosub _enlarge_ball
Loop
_initialize_game:
make matrix 1,5000,5000,150,150
update matrix 1
make object sphere 1,0.5
hide mouse
autocam off
position object 1,2500,10,2500
orig_sphere_size# = .5
new_sphere_size# = .5
angleup#=2
return
_place_cubes:
cubx1#=Rnd(3500)
cubz1#=Rnd(3500)
cubx2#=Rnd(3500)
cubz2#=Rnd(3500)
cubx3#=Rnd(3500)
cubz3#=Rnd(4500)
cubx4#=Rnd(3500)
cubz4#=Rnd(4500)
cubx5#=Rnd(3500)
cubz5#=Rnd(4500)
cubx6#=Rnd(3500)
cubz6#=Rnd(4500)
cubx7#=Rnd(3500)
cubz7#=Rnd(4500)
cubx8#=Rnd(3500)
cubz8#=Rnd(4500)
cubx9#=Rnd(3500)
cubz9#=Rnd(4500)
cubx10#=Rnd(3500)
cubz10#=Rnd(4500)
cubx11#=Rnd(3500)
cubz11#=Rnd(4500)
cubx12#=Rnd(3500)
cubz12#=Rnd(4500)
cubx13#=Rnd(3500)
cubz13#=Rnd(4500)
cubx14#=Rnd(3500)
cubz14#=Rnd(4500)
cubx15#=Rnd(3500)
cubz15#=Rnd(4500)
make object cube 3,3
position object 3,cubx2#,10,cubz2#
make object cube 4,3
position object 3,cubx3#,10,cubz3#
make object cube 5,3
position object 3,cubx4#,10,cubz4#
make object cube 6,3
position object 3,cubx5#,10,cubz5#
make object cube 7,3
position object 3,cubx6#,10,cubz6#
make object cube 8,3
position object 3,cubx7#,10,cubz7#
make object cube 9,3
position object 3,cubx8#,10,cubz8#
make object cube 10,3
position object 3,cubx9#,10,cubz9#
make object cube 11,3
position object 3,cubx10#,10,cubz10#
make object cube 12,3
position object 3,cubx11#,10,cubz11#
make object cube 13,3
position object 3,cubx12#,10,cubz12#
make object cube 14,3
position object 3,cubx13#,10,cubz13#
make object cube 15,3
position object 3,cubx14#,10,cubz14#
make object cube 16,3
position object 3,cubx15#,10,cubz15#
return
_move_ball:
Rem Sets variables so they're easier to use
px1#=object position x(1)
py1#=object position y(1)
pz1#=object position z(1)
ay1#=object angle y(1)
Rem Makes the camera follow the ball
set camera to follow px1#,py1#+angleup#,pz1#-(new_scale#/100),ay1#,5,5,1,1
point camera object position x(1),object position y(1),object position z(1)
Rem Move the ball
if upkey()=1 then move object 1,0.5
if downkey()=1 then move object 1,-0.5
if leftkey()=1 then rotate object 1,0,(ay1#)-1,0
if rightkey()=1 then rotate object 1,0,(ay1#)+1,0
sync
return
_enlarge_ball:
For cub = 2 To 16
if object collision(1,cub) = 1
if scaled = 0
scaled = 1
`make the sphere's size variable double in size
new_sphere_size# = new_sphere_size# * 1.2
`calculate what scale is needed to make the sphere be this size
`formula is size_wanted#*(100.0/object_original_Size#)
new_scale# = new_sphere_size#*(100.0/orig_sphere_size#)
scale object 1, new_scale#, new_scale#, new_scale#
angleup#=angleup#+1
hide object cub
endif
else
scaled = 0
Endif
return
P4 3.4ghz, 512mb DDR2 533mhz RAM, GeForce 6800 GTO 256mb Graphics Card, Sound Blaster Audigy 2. Win.