I had lots of cubes in my rpg that I am making and I had a code for collision with them so that I could kill them if the player collided with them. Now with some different code to load models in better with the command instance object, the code doesn't work and there is no collision now.
Is it the command?
This is the code fo the loading
load object "cyborg.x",100
scale object 100,2400,2400,2400
position object 100,rnd(50000),0,rnd(50000)
for o=101 to 301
instance object o,100
position object o,rnd(50000),0,rnd(50000)
scale object o,2400,2400,2400
next o
load object "alien.x",302
scale object 302,2400,2400,2400
position object 302,rnd(50000),0,rnd(50000)
for o=303 to 353
instance object o,302
position object o,rnd(50000),0,rnd(50000)
scale object o,2400,2400,2400
next o
Here is the code for collision
for collene=100 to 301
if object collision(1,collene) = 1
enestr#=rnd(10)+1
enemon#=rnd(100)+20
if enestr#<str# then position object collene,0,1000000,0 : money#=money#+enemon# : kills#=kills#+1
if str#<enestr# then position object 1,object position x(1)+20, object position y(1),object position z(1) : damage#=10-def# : health#=health#-damage#
endif
next collene
for collhardene=302 to 353
if object collision(1,collhardene) = 1
hardenestr#=rnd(12)+5
hardenemon#=rnd(1000)+200
if hardenestr#<str# then position object collhardene,0,1000000,0 : money#=money#+enemon# : kills#=kills#+4
if str#<hardenestr# then position object 1,object position x(1)+20, object position y(1),object position z(1) : damage#=15-def# : health#=health#-damage#
endif
next collhardene
Any help would be nice