Talk:SetElementAttachedOffsets: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: Maybe it would be better that optional arguments were increments instead of new offsets So if you want to rotate an object around its Z axis you could do SetElementAttachedOffsets(theObje...)
 
No edit summary
 
Line 1: Line 1:
Maybe it would be better that optional arguments were increments instead of new offsets
Maybe it would be better that optional arguments were increments instead of new offsets.
So if you want to rotate an object around its Z axis you could do
So if you want to rotate an object around its Z axis you could do


SetElementAttachedOffsets(theObject,0,0,0,0,0,10)
SetElementAttachedOffsets(theObject,0,0,0,0,0,10) --where Zero values mean keep old value


Maybe im wrong but actually to change the last value you must provide all previous
Maybe im wrong but actually to change the last value you must provide all previous.
If you dont provide them they will be set to default(=0) what would mess the offsets
If you dont provide them they will be set to default(=0) what would mess the offsets
where Zero values mean keep old value


Well not sure cos if you want to set an absolute value you would need to get old value and compute diff.
Well not sure cos if you want to set an absolute value you would need to get old value and compute diff.

Latest revision as of 23:16, 23 May 2009

Maybe it would be better that optional arguments were increments instead of new offsets. So if you want to rotate an object around its Z axis you could do

SetElementAttachedOffsets(theObject,0,0,0,0,0,10) --where Zero values mean keep old value

Maybe im wrong but actually to change the last value you must provide all previous. If you dont provide them they will be set to default(=0) what would mess the offsets

Well not sure cos if you want to set an absolute value you would need to get old value and compute diff.

You could always use:

AttachElements(theObject, getElementAttachedTo(theObject), ....) to set absoulute values

Maybe some function float,float,float,float,float,float getElementAttachedOffsets(theObject)