SA-MP Forums Archive
Moving few objects with AttachDynamicObjectToObject - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Moving few objects with AttachDynamicObjectToObject (/showthread.php?tid=638210)



Moving few objects with AttachDynamicObjectToObject - arad55 - 28.07.2017

Hello, I'm trying to attach a few objects to one main object, and then move the main object (so all other objects move together). I'm using streamer (and YSF), but it seems that eventually it moves only the main object, and the attached objects remain at their initial position.
AttachDynamicObjectToObject returns 1 on all attaches, and I am unable to move the attached objects either.

Example code:
pawn Код:
AttachDynamicObjectToObject(obj1, mainobj, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
MoveDynamicObject(mainobj, x, y, z+100, speed, rx, ry, rz);
With that code, only mainobj moves..


Re: Moving few objects with AttachDynamicObjectToObject - Xeon™ - 28.07.2017

Quote:
Originally Posted by arad55
Посмотреть сообщение
Hello, I'm trying to attach a few objects to one main object, and then move the main object (so all other objects move together). I'm using streamer (and YSF), but it seems that eventually it moves only the main object, and the attached objects remain at their initial position.
AttachDynamicObjectToObject returns 1 on all attaches, and I am unable to move the attached objects either.

Example code:
pawn Код:
AttachDynamicObjectToObject(obj1, mainobj, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
MoveDynamicObject(mainobj, x, y, z+100, speed, rx, ry, rz);
With that code, only mainobj moves..
well, there many issues that caused by using YSF and streamer in same server.
do a test:
create a blank script and 4 objects, attach the 3 to one those object and try to move them
wihout YSF plugin and again try with YSF


Re: Moving few objects with AttachDynamicObjectToObject - arad55 - 28.07.2017

Quote:
Originally Posted by XeonMaster
Посмотреть сообщение
well, there many issues that caused by using YSF and streamer in same server.
do a test:
create a blank script and 4 objects, attach the 3 to one those object and try to move them
wihout YSF plugin and again try with YSF
The problem is that YSF is required to use AttachDynamicObjectToObject..

Quote:

AttachDynamicObjectToObject(objectid, attachtoid, Floatffsetx, Floatffsety, Floatffsetz, Float:rx, Float:ry, Float:rz, syncrotation = 1)
This attaches a dynamic object to another dynamic object.
This requires kurta999's YSF plugin to be loaded.




Re: Moving few objects with AttachDynamicObjectToObject - Xeon™ - 28.07.2017

Quote:
Originally Posted by arad55
Посмотреть сообщение
The problem is that YSF is required to use AttachDynamicObjectToObject..
are you sure that YSF fully loaded? i've been searching for that bug in github, i found some comments that YSF not fully loaded can cause this.


Re: Moving few objects with AttachDynamicObjectToObject - arad55 - 28.07.2017

Well what is there to load but include and plugin?


Re: Moving few objects with AttachDynamicObjectToObject - Xeon™ - 28.07.2017

https://github.com/samp-incognito/sa...ugin/issues/46

https://github.com/samp-incognito/sa...gin/issues/202