hmm.. if you code look as :
...
oldx# = objec position x()
oldz# = object position z()
move object, turn object, .......
x# = objec position x()
z# = object position z()
if ... then oldx#=x# and oldz#=z#
...
it won't work because it just replace the variables.. try it :
if ... then position object ?,oldx#,object position y(?),oldz#
and a small code for sphere collision :
the object A is a sphere, its size is 10
the object B is another sphere, its size is 5
the object C is a third object, hided
if sqrt((object position x(a)-object position x(b))^2 + (object position y(a)-object position y(b))^2 + (object position z(a)-object position z(b))^2) < 15
position object c,object position x(a),object position y(a),object position z(b)
point object c,object position x(b),object position y(b),object position z(b)
move object c,15
position object b,object position x(c),object position y(c),object position z(c)
endif
with this code, the object b cannot go into the object a ; the object b is pushed ; try it, it could help you ^^
I'm following John, but I'm not john.
Lol, it is funnier in french