Ez is egy megoldás.
#define Masodperc 10
#define Sebesseg 2
#define RandomObj1 0.0000,0.0000,0.0000
#define RandomObj2 10.0000,10.0000,10.0000
#define RandomObj3 20.0000,20.0000,20.0000
#define RandomObj4 30.0000,30.0000,30.0000
new mozgat;
mozgat = SetTimer(\"rand\",1000*Masodperc,true);
forward rand();
public rand()
{
switch(random(4))
{
case 0:MoveObject(Object, RandomObj1, Sebesseg, 0.00000, 0.00000, 0.00000);
case 1:MoveObject(Object, RandomObj2, Sebesseg, 0.00000, 0.00000, 0.00000);
case 2:MoveObject(Object, RandomObj3, Sebesseg, 0.00000, 0.00000, 0.00000);
case 3:MoveObject(Object, RandomObj4, Sebesseg, 0.00000, 0.00000, 0.00000);
}
return 1;
}