Yes, for example, if you wanted to make a player move in a circle along the x-y plane:
function Player::circle(%player, %radius, %degrees_per_second) {
if( %radius $= "" ) %radius = 1;
if( %degrees_per_second $= "" ) %degrees_per_second = 120;
%pos = %player.getPosition();
%x = firstWord(%pos);
%y = getWord(%pos, 1);
%z = getWord(%pos, 2);
for(%i = 1; %i <= 360; %i++) {
%rad = %i * 0.01745329251994; // Pi / 180
%new_x = (%x * mCos(%rad)) - (%y * mSin(%rad));
%new_y = (%y * mCos(%rad)) + (%x * mSin(%rad));
%new_z = %z;
%new_pos = (%new_x) SPC (%new_y) SPC (%new_z);
%player.schedule(%i * 1000 / %degrees_per_second, "setTransform", %new_pos);
}
}
Variables are for size of circle and speed.