[Not resolved yet] How to get offset positions for AttachObjectToObject function? -
StRaphael - 05.11.2018
Hello, I want to make a ship and I am wonder how to get offsets position of objects that I created already to attach each object to one parent object.
For example this:
Код:
obj[1] = CreateDynamicObject(...)
obj[2] = CreateDynamicObject(...)
obj[3] = CreateDynamicObject(...)
....
obj[n] = CreateDynamicObject(...)
for(new i;i < sizeof(obj); i++)
{
GetObjectOffsets(obj[i], obj[1] (the object that I wanto to attach to), x, y, z, xr(rotation), yr, zr);
AttachDynamicObjectToObject(obj[i], obj[1], x, y, z, xr, yr, zr);
}
Does anyone know how to make a function like that(GetObjectOffsets)?
Thanks alot.
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 06.11.2018
bUmP
Re: How to get offset positions for AttachObjectToObject function? -
TheToretto - 06.11.2018
pawn Код:
new Float:xr, Float:yr, Float:zr; // in the loop, at the top
printf("%f, %f, %f", xr, yr, zr); // after getobjectoffsets
If I understood you want to get the Offsets that's all? After doing this check the console and you'll have them ready to go.
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 06.11.2018
Quote:
Originally Posted by TheToretto
pawn Код:
new Float:xr, Float:yr, Float:zr; // in the loop, at the top printf("%f, %f, %f", xr, yr, zr); // after getobjectoffsets
If I understood you want to get the Offsets that's all? After doing this check the console and you'll have them ready to go.
|
No, I mean I want to create a function that get the offset positions of parent object. I don't have GetObjectOffset function yet, and I don't know how to create one. My question is how to create that function.
Re: How to get offset positions for AttachObjectToObject function? -
m4karow - 06.11.2018
use object editors like texture studio and export the objects
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 06.11.2018
Quote:
Originally Posted by m4karow
use object editors like texture studio and export the objects
|
Unfortunately Texture Studio doesn't have an option to attach objects to other objects.
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 06.11.2018
i need a function like that:
https://sampforum.blast.hk/showthread.php?tid=541980 ( first function presented to the top of the topic). Sadly the download link to this include is dead.
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 06.11.2018
anyone can help me with this function please? I give reputation...
Re: How to get offset positions for AttachObjectToObject function? -
Pottus - 08.11.2018
Quote:
Originally Posted by StRaphael
Unfortunately Texture Studio doesn't have an option to attach objects to other objects.
|
What do you mean?
https://github.com/Pottus/Texture-St...dio/groups.pwn
Line 1654
Re: How to get offset positions for AttachObjectToObject function? -
StRaphael - 08.11.2018
Quote:
Originally Posted by Pottus
|
Man, you are the light of my life!Thank you!
Now I have a problem with this comand:
[17:38:36] ______________________________________________
[17:38:36] Map has been exported to |
[17:41:17] For some reason this file isn't being created.
[17:41:17] Trying to highjack the existing blank.txt instead (temporary solution).
What can it be?