i recently made a function for my game to move my doors. my doors slide open rather then open on hinges. what i did was made a box hid it from the camera, and dected collisions between it and your character. when a collision takes place i have it slide the doors till their position is above a threshold.
function hut()
door=object collision(100,1004)
`if there is no collision then close the door
if door=0
if object position z (1002)>1
move object 1002,-2
move object 1003,2
endif
endif
`if there is a collision open the door
if door=1
if object position z (1002)<600
move object 1002,2
move object 1003,-2
endif
endif
print door
print object position z (1002)
endfunction
i made the house in cshop and exported it as 3 objects the house and then two doors
Aku Soku Zan
Wicked Immedate Slay
Slay Evil Immedately