Code:
action actFloating
{
var vPos;
my.z = 1000;
while(!mouse_left)
{
/* add your "follow the mouse" function here */
c_trace(my.x, vector(my.x, my.x, my.z - 2000), ignore_me | ignore_passable);
vec_set(vPos, target); /* not sure about this. i think "target" does only exist in it's current frame, so i just save it in a temp vector */
wait(1);
}
vec_set(my.x, vPos.x); /* set my position to the hitted spot */
return;
}
just some fast code oO if i missed what you need, just tell me