Here is my basic library of functions. I made most of these cause I was tired of copying and pasting the same code, or typing object position x(), object position y()+1, object position z() just to move the object up 1.
The list is:
1. xposobject(OBJECT NUMBER, COORDINATE VALUE#)-Positions an object on a specific x value, keeping the other coordinates the same
2. yposobject(SAME)-same but only moves on the y axis
3. zposobject(SAME)-guess
4. campos(OBJECT NUMBER)-positions the camera at an object position
5. point_camera_at_object(OBJECT NUMBER,Y AXIS DIFFERENCE VALUE#)-rather self explanatory
6. control_object_with_keys(OBJECT NUMBER, STEP SIZE, ANGLE OF TURNING)-basic controls for an object
7. cam_move_with_keys(STEP SIZE, ANGLE OF TURNING)-allows the camera to be controlled with the keys
8. point_object_at_camera(OBJECT NUMBER,Y AXIS DIFFERENCE#, SINGLE AXIS ROTATION FLAG)
9,10, and 11. xposcam, yposcam, and zposcam(POSITION#)-just like the posobject commands.
`FUNCTIONS
Function xposobject(objnum,pos#)
position object objnum,pos#,object position y(objnum),object position z(objnum)
endfunction
Function yposobject(objnum,pos#)
position object objnum,object position x(objnum),pos#,object position z(objnum)
endfunction
Function zposobject(objnum,pos#)
position object objnum,object position x(objnum),object position y(objnum),pos#
endfunction
Function campos(objnum)
position camera object position x(objnum),object position y(objnum),object position z(objnum)
endfunction
Function point_camera_at_object(objnum,ydiff#)
point camera object position x(objnum),object position y(objnum)+ydiff#,object position z(objnum)
endfunction
Function control_object_with_keys(objnum,stepsize,turnangle)
`if object collision(objnum,0)>0
if upkey()=1 then move object objnum,stepsize
if downkey()=1 then move object objnum,(-1)*stepsize
if rightkey()=1 then turn object right objnum,turnangle
if leftkey()=1 then turn object left objnum,turnangle
`endif
endfunction
Function cam_move_with_keys(stepvalue,turnvalue)
if upkey()=1 then move camera stepvalue
if downkey()=1 then move camera (-1)*stepvalue
if rightkey()=1 then turn camera right turnvalue
if leftkey()=1 then turn camera left turnvalue
endfunction
Function point_object_at_camera(objnum,ydiff#,xz_rot_flag)
`If the flag is 0, the object only rotates about its y axis, so that it doesn't tilt up/down
if xz_rot_flag>0
point object objnum,camera position x(),camera position y()+ydiff#,camera position z()
else
point object objnum,camera position x(),object position y(objnum),camera position z()
endif
endfunction
Function xposcam(pos#)
position camera pos#,camera position y(),camera position z()
endfunction
Function yposcam(pos#)
position camera camera position x(),pos#,camera position z()
endfunction
Function zposcam(pos#)
position camera camera position x(),camera position y(),pos#
endfunction