Haha, I can't believe I missed both of those
I'm trying to get collision working, so if my player (object 1) touches another object his position will be reset, but it's just showing a black screen with the new while loop, why?
sync on
sync rate 60
autocam off
backdrop on
make camera 1
color backdrop 1,RGB(0,0,255)
make object cube 1, 20
make object cube 2, 20
make object cube 3, 20
make object cube 4, 20
make object cube 5, 20
position object 2,0,0,40
position object 3,60,0,0
position object 4,20,0,40
position object 5,-60,0,20
ObjectAmount = 5
do
x1 = 2
x = object position x (1)
y = object position y (1)
z = object position z (1)
position camera 1, x, y + 120, z
point camera 1,x,y,z
if (keystate(200) = 1)
z = z + 1
endif
if (keystate(208) = 1)
z = z - 1
endif
if (keystate(203) = 1)
x = x - 1
endif
if (keystate(205) = 1)
x = x + 1
endif
while x1 <= ObjectAmount
if object collision (1, x1)
x = x
y = y
z = z
endif
endwhile
if (object collision (1, 2))
text 5,5,"COLLIDED"
endif
position object 1,x,y,z
sync
loop
Always program as if the person maintaining your program is a psychopath that knows where you live