In the trigger editor, there is a function called Unit Attachment Point. You put in Unit (Unit) and Attachment (String), and get a Point in return.
No matter what I write as the attachment string, I get an error instead of a point. I've tried many different attachment points written in many different ways. Some examples are Origin, Ref_Origin, e_AttachOrigin, 0, 1, etc.
Does anyone have any information about this function? There seem to be little talk about it when I search the net. And all the talk there is ask the same question I do; how do we write the attachment point string?
There is a function called "Convert preset to string". However, I tried using it with this function and it gave me an error message. Why do you need this function anyway?
Convert preset to string just gives the same error as any other input I try. No point error.
Why I need the function? For many things. The most pressing being getting the point of a rotating Turret attachment point, so I can use the turret's direction in my triggers.
The turret angle can be different from the facing angle of the unit. That's why I need the attachment point of the turret. Unfortunately I doubt I can use any other way than the Unit Attachment Point function (except a workaround I'd rather not resort to*). Which is why I'd rather like to get it working.
*Workaround involves keeping track of the unit's turret starting angle, rotation speed, attack target, whether it is spinning, holding or resetting on movement, etc. I'm sure it could be made accurate, but all that work for something that should be doable with a single function call doesn't seem worth it.
In the trigger editor, there is a function called Unit Attachment Point. You put in Unit (Unit) and Attachment (String), and get a Point in return.
No matter what I write as the attachment string, I get an error instead of a point. I've tried many different attachment points written in many different ways. Some examples are Origin, Ref_Origin, e_AttachOrigin, 0, 1, etc.
Does anyone have any information about this function? There seem to be little talk about it when I search the net. And all the talk there is ask the same question I do; how do we write the attachment point string?
@Builder_Bob: Go
There is a function called "Convert preset to string". However, I tried using it with this function and it gave me an error message. Why do you need this function anyway?
Convert preset to string just gives the same error as any other input I try. No point error.
Why I need the function? For many things. The most pressing being getting the point of a rotating Turret attachment point, so I can use the turret's direction in my triggers.
@Builder_Bob: Go
Well, the best I can think of is using location with polar offset
@tFighterPilot: Go
I need the rotation, so I need the actual attachment point.
@Builder_Bob: Go
You can get the facing angle of the unit.
@tFighterPilot: Go
The turret angle can be different from the facing angle of the unit. That's why I need the attachment point of the turret. Unfortunately I doubt I can use any other way than the Unit Attachment Point function (except a workaround I'd rather not resort to*). Which is why I'd rather like to get it working.
*Workaround involves keeping track of the unit's turret starting angle, rotation speed, attack target, whether it is spinning, holding or resetting on movement, etc. I'm sure it could be made accurate, but all that work for something that should be doable with a single function call doesn't seem worth it.
Bump. Someone has to have successfully used this function
@Builder_Bob: Go
I've gotten SetAttachRotation to work.