Mission API - Move/Rotate Unit Actions - #8541
Conversation
- Added RotateUnit action Provide it with point on the map towards which the unit should be rotated - Added MoveUnit action Provide it with point on the map towards which the unit should be teleported Allows to provide randomised radius Also allows rotating within the same action - Test Mission included. Tested, Works 100%.
|
I'm not sure we want any randomness in actions, mission authors should be able to rely on the outcome of an action being deterministic. |
Noted |
Well, that's why this is optional and down to the mission author to decide. |
|
Still, randomness was going to be my next set of notes. It is just a bigger design question so safe to save for last. Randomly placing units will overlap them. Buildings especially will trap units. |
Thats why you make the radius only cover empty space, duh. |
|
Why not place them in a custom formation? Why not in a square, a donut, a circle, a sunflower, a triangle, a straight line, a hollow rectangle, an clustered-noise distribution with archipelagic extinction, anything at all? |
|
To be clear that is a great |
So you're telling me simple random radius is too much for the idiot-proof system, but advanced formations are not... okay. |
|
I am saying that it will fuck up, yes |
| { name = 'unitName', required = true, type = ParameterTypes.UnitName }, | ||
| { name = 'position', required = true, type = ParameterTypes.Position }, | ||
| { name = 'direction', required = false, type = ParameterTypes.Position }, -- Point on the map towards which the unit rotates | ||
| { name = 'randomRadius', required = false, type = ParameterTypes.Number }, -- Spread teleported units around in radius this big. |
There was a problem hiding this comment.
This is not a radius. It is a half-length of a side of a map-aligned box.
There was a problem hiding this comment.
/remindme 7d 01b70b39a3909f35799b246f434f9e61
Added RotateUnit action
Provide it with point on the map towards which the unit should be rotated
Added MoveUnit action
Provide it with point on the map towards which the unit should be teleported
Allows to provide randomised radius for teleportation
Also allows rotating within the same action
Test Mission included. Tested, Works 100%.