I've not ran this, but test it out...
cls
sync on
sync rate 60
backdrop on
color backdrop rgb (0,0,0)
sync
`Load AX O,X,Y
load object "Media Packs\xaxis.3ds",4,1,0
hide object 4
cbe = 1
Global OldPress = 0
Global NewPress = 0
do
`Status FPS
text 10,5,"" + str$(screen fps())
`Text for mode information
center text 300,50,"OBJ MODE"
sync
`Functions
`camerasetup() : Function not included in this snippit
`camstat() : Function not included in this snippit
OldPress = NewPress : NewPress = keystate(2)
`When input is detected place cube
if NewPress = 0 ANd OldPress = 1 :` We only want one cube per keypress, this sorts it out.
inc cbe
make object cube cbe,25
`set object 25,1,4,1,0,1
show object 4
endif
if object exist(cbe) = 1
`Functions inside object exist
objectposition( cbe )
`Attach Axe O,X,Y,Z
x#=object position x(cbe)
z#=object position z(cbe) + 100
position object 4,x# -6, -5, z# - 46
move object left 4,1
set object to object orientation 4, cbe, 1
endif
x# = x# + 0.5
if cbe > 0 and object exist(cbe) = 1
`Delete cube
if keystate(211) = 1
delete object cbe
hide object 4
endif
`Move cube
if mouseclick() = 1
position object cbe,x#,0,0
else
endif
endif
`Exit Object Mode
if escapekey() = 1
hide object 4
exit
endif
`Confirm Modifications
if keystate(28) = 1
make object cube 2,25
delete object 2
ENDIF
sync
LOOP
END
function objectposition( cbe )
x# = object position x(cbe)
y# = object position y(cbe)
z# = object position z(cbe)
text 10,50, "X: " + str$(x#)
text 10,70, "Y: " + str$(y#)
text 10,90, "Z: " + str$(z#)
ENDFUNCTION