I am trying to detect collision between a cube and a soldier object just a basic example I was trying to setup for my game. But when the solider collides with the cube, it doesn't detect it at all. I have tried all of the things I can think of, but I have never used Sparky's before. So, what is wrong with my code and how to I get it to work?
Rem Project: Dark Basic Pro Project
Rem Created: Tuesday, December 14, 2010
Rem ***** Main Source File *****
sync on
sync rate 60
make object cube 1,5
color object 1,rgb(0,255,0)
position object 1,-5,0,0
sc_SetupComplexObject 1,1,2
SC_UpdateObject 1
load object "H-GI-Static.x",2
position object 2,5,0,0
scale object 2,200,200,200
sc_SetupComplexObject 2,1,2
SC_UpdateObject 2
autocam off
position camera 0,0,-30
do
set cursor 0,0
print collide
collide = sc_ObjectCollision(2,0)
if collide > 0
color object 1,rgb(255,255,0)
else
color object 1,rgb(0,255,0)
endif
if leftkey() = 1 then move object left 2,1
if rightkey() = 1 then move object right 2,1
SC_updateObject 2
sync
loop
end
Thanks!

Zeus