Ok, something like this should work when you're rotating around the y-axis:
`Work out distance away from rotation point on x and z axis
xdistance# = object position x(objectnumber) - rotate.pos.x
zdistance# = object position z(objectnumber) - rotate.pos.z
`Work out distance from rotation point
TotalDistance# = sqrt(xdistance#^2+zdistance^2)
`Work out angle of object from rotation point
angle# = atanfull(xdistance#,zdistance#)
`Work out angle of new position from rotation point
newangle# = wrapvalue(angle# + AmountToRotateBy#)
`Work out new x and z positions for object
newxpos# = rotate.pos.x + sin(newangle#)*TotalDistance#
newzpos# = rotate.pos.z + cos(newangle#)*TotalDistance#
`Position the object
Position object objectnumber,newxpos#,object position y(objectnumber),newzpos#
`Rotate the object
yrotate object objectnumber,wrapvalue(object angle y(objectnumber)+AmountToRotateBy#)
None of that's tested, I just wrote it out here, but it should work.
Hope it helps.
Insiiiiiiiiiiiiiiiiiiiiiiiide!