Okay, I understand. In that case you'll just need to use a global variable. Let's call it picked_angle.

Code:

var picked_angle;

starter choose_way()
{
randomize();
picked_angle = random(160) + 10;
}

action X
{
while(picked_angle == 0) { wait(1); } // wait until choose_way has run
my.pan = picked_angle;
while(1)
{
temp.x = 5*time_step; // change 5 to whatever speed you want
temp.y = 0;
temp.z = 0;
c_move(me,temp,nullvector,null);
wait(1);
}
}



Now, all entities with action X attached will travel in the same (but random) direction.

Better?

EDIT: changed choose_way to a starter, and added WHILE at the beginning of X

Last edited by LogantheHogan; 08/10/07 22:07.