I can't seem to get my formula right. I want to make an action definition that takes X unit and makes them move in a circle with a radius of Y around point Z. I need a function that you can easily plug in variables to that allows adjustable coordinates and an adjustable radius.
Take the unit, move it to the center of the circle. Make it face straight up, then move it in X spaces (radius) forward from its facing. Move it back to the center, change the facing a little to the side, and repeat.
Thing is, can you make a unit move forward relative to its facing?
You can make a unit move by creating an action of type Issue Order. Make it target-point ability and chose move. Then under point select Point With Polar Offset. For point use Position of Unit and for offset use 1.0 or however far you want to unit to go and finally for angle use Facing Angle Of unit.
With this, it will order the unit to move to a point that is always in front of the unit.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I can't seem to get my formula right. I want to make an action definition that takes X unit and makes them move in a circle with a radius of Y around point Z. I need a function that you can easily plug in variables to that allows adjustable coordinates and an adjustable radius.
Thought of an easier way.
Take the unit, move it to the center of the circle. Make it face straight up, then move it in X spaces (radius) forward from its facing. Move it back to the center, change the facing a little to the side, and repeat.
Thing is, can you make a unit move forward relative to its facing?
Do you want to have a unit move using its own movement or have it slide using triggers?
You can make a unit move by creating an action of type Issue Order. Make it target-point ability and chose move. Then under point select Point With Polar Offset. For point use Position of Unit and for offset use 1.0 or however far you want to unit to go and finally for angle use Facing Angle Of unit. With this, it will order the unit to move to a point that is always in front of the unit.