I want to make a trigger(s). Where I can copy a group of units in Location A and then paste that group of units into Location B with the same unit positioning for the group. How could I do that?
This is a bit tricky to explain. Depending on your needs you can save the needed values to custom values or just use variables and instantly move units. You could save the distance and angle to units custom values to calculate the new positioning...
It would be something like this:
variable MainPoint = position A
variable tmpGroup = units group in position A
pick each unit tmpgroup. save distance between position A and position of picked unit to custom value of unit 0. save angle between A and position of picked unit to custom value of unit 1.
move picked unit instantly to position B offset by custom value 0, angle custom value 1.
you can use variables if you move units intantly. No need to save to custom value if you do that....
I want to do it without moving the units... just duplicating them in another location. so the originals are still there. If possible maybe an easy way of doing it..
Well that would be pretty much same...you only need couple of actions and you call it hard to do? Do you think the program will do it itself?
Instead of moving unit. Use create unit action....
I will also provide the general outline what you need to do. The point A is center of the region. You pick the units around that point and check the distance from that point and the angle. You use point with polar offset to create units to point B (point B is center of the point you want units to be created in). You can probly even use create unit (unit type of picked unit) if you want exact same unit to be created to that point.
gl
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I want to make a trigger(s). Where I can copy a group of units in Location A and then paste that group of units into Location B with the same unit positioning for the group. How could I do that?
This is a bit tricky to explain. Depending on your needs you can save the needed values to custom values or just use variables and instantly move units. You could save the distance and angle to units custom values to calculate the new positioning...
It would be something like this:
variable MainPoint = position A
variable tmpGroup = units group in position A
pick each unit tmpgroup. save distance between position A and position of picked unit to custom value of unit 0. save angle between A and position of picked unit to custom value of unit 1.
move picked unit instantly to position B offset by custom value 0, angle custom value 1.
you can use variables if you move units intantly. No need to save to custom value if you do that....
@zenx1: Go
I want to do it without moving the units... just duplicating them in another location. so the originals are still there. If possible maybe an easy way of doing it..
Well that would be pretty much same...you only need couple of actions and you call it hard to do? Do you think the program will do it itself?
Instead of moving unit. Use create unit action....
I will also provide the general outline what you need to do. The point A is center of the region. You pick the units around that point and check the distance from that point and the angle. You use point with polar offset to create units to point B (point B is center of the point you want units to be created in). You can probly even use create unit (unit type of picked unit) if you want exact same unit to be created to that point.
gl