OK what your going to have to do is make collision boxes for each object, using the objects size and such. Then you can check for object collision, and then store variables like oldx# and stuff taken right at the point where collision happens. Then position your object at those coords.
A work around for only having to do this once is like this (but kinda slow, cuz its checking for collision every loop)
OK object 0 is your object, and there are 10 other objects (1-10)
FOR x=1 to 10
if object collision(0,x)=1
(store your object variables and do collision)
endif
next x
RPGamer