10.01.2012, 12:41
Is it possible to move an object on a set path, without the use of timers? I mean, like going in circle etc. Is there a code snippet somewhere around here? Thanks.
new object, move;
object = CreateObject(...);
move = 0;
// Into script
MoveObject(object, ...);
move = 1;
// Into callback OnObjectMoved
if(objectid == object)
{
switch(move)
{
case 1:
{
MoveObject(...) // Insert new coordinates
move = 2;
}
case 2:
{
MoveObject(...) // Other coordinates
move = 3;
}
case 3:
{
MoveObject(...) // Other coordinates
move = 4;
}
case 4:
{
MoveObject(...) // Other coordinates
move = 0;
}
}