Is it possible?
#1

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.
Reply
#2

Use the function MoveObject.
Reply
#3

I know that, but it moves the object in a straight line. I would like it to move the object in a set path, like forward, right, forward, left, back etc...
Reply
#4

Use callback OnObjectMoved and use var. Example:

pawn Код:
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;
}
}
Reply
#5

Okay, I'll use timers then. I got it working and all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)