Hi,
iv got an question:
how can i teleport units that they are reflected at an Point.
In the Picture you can see an Point in middle. That is the Point to reflect units.
the Unit on poit A and B is an reflected Unit.
There is a "reflected point" trigger function, or something similar. Just search for Reflect. Although I dont think that one would fit your picture, because your picture isn't a reflected point but an opposite point. You'd probably want Point with Polar Offset for that and then just add the angle between unit and center point + 180
1. Put a region above the area.
2. Calc x and y offsets towards the middle, then subtract these offsets from the middle point and you got the new position for your unit. Move it there, ignore placement.
So this:
offsetXtoMiddle = XofUnitPosition - XofCenterOfRegion
newX = XofCenterOfRegion - offsetXtoMiddle
20 = 120 - 100
80 = 100 - 20
> xBefore = 120; xAfter = 80
3. Set the facing of each unit to current facing + 180.
Hi, iv got an question: how can i teleport units that they are reflected at an Point. In the Picture you can see an Point in middle. That is the Point to reflect units. the Unit on poit A and B is an reflected Unit.
@windowssiebenfan: Go
There is a "reflected point" trigger function, or something similar. Just search for Reflect. Although I dont think that one would fit your picture, because your picture isn't a reflected point but an opposite point. You'd probably want Point with Polar Offset for that and then just add the angle between unit and center point + 180
1. Put a region above the area.
2. Calc x and y offsets towards the middle, then subtract these offsets from the middle point and you got the new position for your unit. Move it there, ignore placement.
So this:
offsetXtoMiddle = XofUnitPosition - XofCenterOfRegion
newX = XofCenterOfRegion - offsetXtoMiddle
20 = 120 - 100
80 = 100 - 20
> xBefore = 120; xAfter = 80
3. Set the facing of each unit to current facing + 180.
This?
Thank's for the quick answer. This solved my problem