Hey all,
I'm having some sort of a collision problem, wich I hope you can help me with.
I'm making some sort of a bomeberman clone, so I made some sort of a maze an saved it as level1.x But now my problem is that my player isn't able to walk inside level1 (inside the maze). I hope you understand my problem here is my code:
sync on:sync rate 60
rem load level1
load object "level1.x",1
SET OBJECT COLLISION TO polygons 1
position object 1,0,1,0
make object sphere 2,2
set object collision to spheres 2
SCALE OBJECT 1, 1000, 1000, 1250
POSITION CAMERA 0, 25, -20
pitch camera down 50
z#=0
x#=10
SET OBJECT COLLISION ON 1
SET OBJECT COLLISION ON 2
do
position object 2,x#,1,z#
set cursor 0,0
print "FPS" : print screen fps()
print "Polygons" : print statistic(1)
rem controls
if upkey() then z# = z#+0.25
if downkey() then z#=z#-0.25
if leftkey() then x# = x#-0.25
if rightkey() then x#=x#+0.25
rem Collision check
If Object collision(2,0)>0 then position object 2,terugvalx#,1,terugvalZ#
terugvalx# = Object position x(2)
terugvalZ# = Object position z(2)
sync
loop