Attach Object To Vehicle ( I can pay for help : PM me )
#5

Quote:
Originally Posted by Mikeydoo
Посмотреть сообщение
Thanks for the answer ! I didn't know that those functions couldn't be used together but still: I am convinced that it can be made this way : Spawn the object at the player's position then get the player/vehicle position and then use the EditAttachedObject function to move it around. Also, when it's finished use the AttachObjectToVehicle on the coordinates returned by EditAttachedObject

I'll explain it again in other words so we don't get misunderstood : Lets say the player creates an object ; then this object positions are saved on a file ( so float x , y , z , rx, ry, and rz ( no sizes ) ) and that editplayerobject also read and save those files.

Then , lets say that when the object is done editing , it creates an object ( like you said with the good function ) and then reads from previously saved positions .

I dont know if im mistaken or if you understand what i mean.

Thanks a lot by the way
If I'm understanding this correctly you want to use EditAttachedObject just for calculations of the right pos.
Yes it's possible, but you need to do a little math, and thats pretty much bane of scripting, people are too lazy to do the math, EditAttachedObject returns offsets of item to player, you need offset to the vehicle, therefore you should get player's offset to vehicle, and calculate veh to object from those 2 numbers you have, then destroy the player object, createobject n attach it to veh.
PS: I just noticed that Robo mentioned bones, yes the offset is relative to bone, but I think the spine bone's offset is 0,0,0 might be wrong tho.
Reply


Messages In This Thread
Attach Object To Vehicle ( I can pay for help : PM me ) - by Mikeydoo - 11.01.2016, 07:13
Re: Attach Object To Vehicle ( I can pay for help : PM me ) - by RoboN1X - 11.01.2016, 08:36
Re: Attach Object To Vehicle ( I can pay for help : PM me ) - by Mikeydoo - 11.01.2016, 14:32
Re: Attach Object To Vehicle ( I can pay for help : PM me ) - by RoboN1X - 12.01.2016, 02:39
Re: Attach Object To Vehicle ( I can pay for help : PM me ) - by PrO.GameR - 12.01.2016, 08:48

Forum Jump:


Users browsing this thread: 2 Guest(s)