Hello!
Please use code boxes... They make it much easier to read your code:
Just highlight your code and hit the "code" button in the message edit box.
Indenting your code will help you a lot too. Your code looks something like this:
load image "moo!.bmp",1
make object box 1,10,10,10
texture object 1,1
make object sphere 2,5
position object 2,3,3,3
for t=3 to 5
make object cylinder t,5
position object t,6,6,6
next t
do
move object 1,5
move object 2,3
for t=3 to 5
move object t,8
next t
if t=5
print "I like chocolate..."
print "mhhhh.... CHOCOLATE!!! "
else
print "blow it out your ass"
endif
sync
loop
I indent it after every if, do, for, while, repeat, open to read, open to write and else. Doesn't it look better this way?
load image "moo!.bmp",1
make object box 1,10,10,10
texture object 1,1
make object sphere 2,5
position object 2,3,3,3
for t=3 to 5
make object cylinder t,5
position object t,6,6,6
next t
do
move object 1,5
move object 2,3
for t=3 to 5
move object t,8
next t
if t=5
print "I like chocolate..."
print "mhhhh.... CHOCOLATE!!! "
else
print "blow it out your ass"
endif
sync
loop
You only need to add comments and then your code will be perfect:
rem load texture and make a player
load image "moo!.bmp",1
make object box 1,10,10,10
texture object 1,1
rem make a planet and position
make object sphere 2,5
position object 2,3,3,3
rem make 3 stars
for t=3 to 5
make object cylinder t,5
position object t,6,6,6
next t
rem main loop
do
rem move player and planet
move object 1,5
move object 2,3
rem move stars
for t=3 to 5
move object t,8
next t
rem print some stuff that makes no sense at all
if t=5
print "I like chocolate..."
print "mhhhh.... CHOCOLATE!!! "
else
print "blow it out your ass"
endif
rem refresh screen
sync
rem end of main loop
loop
Now, to your problem.
I can't quite see why it isn't working, since I haven't approached collision with DBC commands for a long time. However, I suggest to try the following:
texture object 2,2
position object 2,10000,0,0
texture object 3,3
position object 3,2500,0,0
scale object 3,25,25,25
I think that code is causing it. You should set up collision after you set your objects size and position. So scaling object 3 might be disabling the collision or doing something weird to it.
I would also try checking if your ship is really heading towards the planet it should be colliding with.
Also try setting the collision off for object 4, your sky:
set object collision off 4
I hope you find the error and I could help!
TheComet
Make the paths of your enemies easier with WaypointPro!