Possible to move multiple objects at a time?
#1

Hello!

I am having a small issue, i am going to make a big island, and i don't want that island to be able for others than the owners. And by that, i want to move all the objects which i have mapped, underwater with one single command. Is that possible with not too advanced codes?

Thanks!
Reply
#2

I don't know if its possible with many objects or just some... I don't know if there are any limit..
But you can try:


Id = CreateObject(, X, Y, Z);

And add more with "id " infront of object just.. And define name at the top... Pretty hard to explain xD.. But check the Wiki for more info...
Reply
#3

Maybe it is possible by using Iterator. Add any object to Iterator and use foreach.
Reply
#4

Use AttachObjectToObject. Attach any object to the parent object. Move parent object.
Reply
#5

You may have to use MoveObject (https://sampwiki.blast.hk/wiki/MoveObject) and move every object.

Example use the cmd:

Код:
if (strcmp("/moveobject", cmdtext, true, 10) == 0)
	{
		MoveObject(objectid, x,y,z,object speed);
                MoveObject(objectid, x,y,z,object speed);
                MoveObject(objectid, x,y,z,object speed);
                MoveObject(objectid, x,y,z,object speed);
example>>  MoveObject(18755, 1568.7086,-1691.1489,29.5216,10);
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)