How to get offset positions for AttachObjectToObject function?
#1

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

bUmP
Reply
#3

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

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

use object editors like texture studio and export the objects
Reply
#6

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

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

anyone can help me with this function please? I give reputation...
Reply
#9

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
Reply
#10

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)