Object moving help
#1

Anyone can help me to move 10 object with 1 cmds?

I can only move 1 object in 1 time. Anyone can help?
Reply
#2

Use a loop.

Store all the objectids you want move in an array, then use a for loop to move each object but at the same position.

A loop does the same thing an indiquated number of times.
Reply
#3

Create an array. I'll give you a fast example:
pawn Код:
new Objects[10];

Objects[1] = CreateObject(..);
Objects[2] =  CreateObject(..); // An so on create the other objects.

CMD:moveallobjects(playerid, params[])
{
    for(new i=0; i < 11; i++) MoveObject(Objects[i],x,y,z,speed,rotx,roty,rotz); //Loop instead of moving every array alone.
    return 1;
}
EDIT: Ops, sorry S4t3K.
Reply
#4

No problem, you give an example whereas I don't give any.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)