Okay, I know this sounds like bizarre thing to ask, but it there a way to make units walk the the middle of a path? Like in the context of a TD where you have spawned units moving along a curving road, they will just line up toward the closest edge and just take the shortest path. It's kinda hard to explain so I've attached images.
NB: Red highlights are No Pathing.
This is the path they take:
This is the path I would like them to take:
I'd like to avoid using triggers and regions at multiple place on the curves if at all possible. Is this possible?
How about custom pathing blockers? Å blocker that blocks some units but not others.
I usually duplicate a pathing blocker on units tab.
At this new blocker I set Movement: Mover to None
Last, at Movement: Collide I set that stat to Unused (Land 10) while I remove all others
Then at all units who need to be blocked you add this stat
"Unused (Land 10)" at "(Basic) Movement: Collide"
Now, this does mean you have to paint the area between the red and the center with pathing blockers and that might not be what you wanted.
But with this you can make player units move places enemy waves cannot.
(I have not tried this with enemy units. I've only used this method to block player units and allow enemy units to pass. I hope it works but as with all pathing blockers there might be some path hiccups)
The simplest way to do it is to just queue up multiple move orders, so the units walk through the center each time there is a corner. No need for regions or active triggers, just a couple of points.
I guess this wouldn't be acceptable if you want to avoid people making mazes which exploit the specific waypoint structure.
Well I'm trying to make the enemy units move in the same way that the mobs do in Kingdom Rush, so mazing isn't an issue. I could just use triggers, but since I'm learning the editor, might as well check if there isn't another way of doing it.
If I use points, won't the units have to walk through it to receive their new move orders? I've never really tried using points before.
It will work just like queueing move orders works in game, ie when you hold down shift. You just make one trigger which orders the unit to walk through like 15 or so points in order, just by issuing the 15 move orders with the 'after existing orders' option. There is a maximum number of orders that can be queued(something like 15, I dunno) so if your path is ridiculously twisted you may need to do this in stages.
Well there's the thing: all my units are spawned one at a time and given a move order. Wouldn't that technically make each of them pass through the point before moving on to the next? Or will that work more or less the same way as if I told a group to go to that point?
So when you have a group selected and you order it to move to a place then the units tend to march in a loose formation. I think this is done by just figuring out where each units relative point to the center of the unit group is, and offsetting the target of the command for each unit by this. I would think that you can do this with a trigger just by using the Issue Order To Unit Group command(possibly making use of the relative points option), instead of iterating through Issue Order commands one by one for each unit.
If you do it one at a time there is no way to figure out where each units place is in the formation, since there is no sense of a formation.
It doesn't matter if they spawn one by one, but it does matter if they are ordered one by one.
Well I looked through the triggers and I don't really understand how I can string multiple points for a unit to follow through. I did find the relative points trigger although I'm a bit confused as to what it does. Does it make a unit target a pre-placed point nearby or does it make the unit target someplace near the point relative to where it's currently standing? Kinda confused.
One way I'm thinking of doing this is by have a location variable for that I used for each unit (maybe as an array - which begs the question: is there an inbuilt indexing system in sc2?) and using this variable to store a unit's location in relation to the center of the region it spawned in. Then maybe apply that same offset and angle to each point it passes to retain it's distance from the flanks of the road. It does sound overly complicated though. I can't think in simple ways >.<
Units have a queue of orders. Whenever you issue a new order in triggers you decide where in that queue it goes. So if you simply make 5 move orders and tell it to place each (After Existing Orders) then they will be strung together one after the other. Easy as that.
Now if you do this by using the Issue Order to Unit Group action, and select that you want an Order Using Relative Points, and issue a move order then you should get it to order the group to move in formation. Unless I am horribly wrong.
Okay, I know this sounds like bizarre thing to ask, but it there a way to make units walk the the middle of a path? Like in the context of a TD where you have spawned units moving along a curving road, they will just line up toward the closest edge and just take the shortest path. It's kinda hard to explain so I've attached images.
NB: Red highlights are No Pathing.
This is the path they take:
This is the path I would like them to take:
I'd like to avoid using triggers and regions at multiple place on the curves if at all possible. Is this possible?
Tried increasing their collision inner radius?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Increasing the inner radius doesn't seem to do anything :(
@Spellbound7: Go
I believe that inner radius is ignored if it is larger than normal radius.
Basically units seem to use the smaller of inner radius and normal radius to determine their radius for colliding with buildings.
I don't think this walking in the center pathing issue can be solved with data.
@Spellbound7: Go
How about custom pathing blockers? Å blocker that blocks some units but not others.
I usually duplicate a pathing blocker on units tab.
At this new blocker I set Movement: Mover to None
Last, at Movement: Collide I set that stat to Unused (Land 10) while I remove all others
Then at all units who need to be blocked you add this stat
"Unused (Land 10)" at "(Basic) Movement: Collide"
Now, this does mean you have to paint the area between the red and the center with pathing blockers and that might not be what you wanted. But with this you can make player units move places enemy waves cannot.
(I have not tried this with enemy units. I've only used this method to block player units and allow enemy units to pass. I hope it works but as with all pathing blockers there might be some path hiccups)
On a second thought, this might block melee units from reaching enemies on the side. Is it possible to add or remove Collide stats?
The simplest way to do it is to just queue up multiple move orders, so the units walk through the center each time there is a corner. No need for regions or active triggers, just a couple of points.
I guess this wouldn't be acceptable if you want to avoid people making mazes which exploit the specific waypoint structure.
@njordys: Go
Note xactly what I need, but that could actually help later, I'll keep that in mind :)
@intanjir: Go
Well I'm trying to make the enemy units move in the same way that the mobs do in Kingdom Rush, so mazing isn't an issue. I could just use triggers, but since I'm learning the editor, might as well check if there isn't another way of doing it.
If I use points, won't the units have to walk through it to receive their new move orders? I've never really tried using points before.
@Spellbound7: Go
It will work just like queueing move orders works in game, ie when you hold down shift. You just make one trigger which orders the unit to walk through like 15 or so points in order, just by issuing the 15 move orders with the 'after existing orders' option. There is a maximum number of orders that can be queued(something like 15, I dunno) so if your path is ridiculously twisted you may need to do this in stages.
@intanjir: Go
Well there's the thing: all my units are spawned one at a time and given a move order. Wouldn't that technically make each of them pass through the point before moving on to the next? Or will that work more or less the same way as if I told a group to go to that point?
@Spellbound7: Go
Hmmm....
So when you have a group selected and you order it to move to a place then the units tend to march in a loose formation. I think this is done by just figuring out where each units relative point to the center of the unit group is, and offsetting the target of the command for each unit by this. I would think that you can do this with a trigger just by using the Issue Order To Unit Group command(possibly making use of the relative points option), instead of iterating through Issue Order commands one by one for each unit. If you do it one at a time there is no way to figure out where each units place is in the formation, since there is no sense of a formation.
It doesn't matter if they spawn one by one, but it does matter if they are ordered one by one.
Well I looked through the triggers and I don't really understand how I can string multiple points for a unit to follow through. I did find the relative points trigger although I'm a bit confused as to what it does. Does it make a unit target a pre-placed point nearby or does it make the unit target someplace near the point relative to where it's currently standing? Kinda confused.
One way I'm thinking of doing this is by have a location variable for that I used for each unit (maybe as an array - which begs the question: is there an inbuilt indexing system in sc2?) and using this variable to store a unit's location in relation to the center of the region it spawned in. Then maybe apply that same offset and angle to each point it passes to retain it's distance from the flanks of the road. It does sound overly complicated though. I can't think in simple ways >.<
@Spellbound7: Go
Ok, I will try to explain it a bit clearer.
Units have a queue of orders. Whenever you issue a new order in triggers you decide where in that queue it goes. So if you simply make 5 move orders and tell it to place each (After Existing Orders) then they will be strung together one after the other. Easy as that.
Now if you do this by using the Issue Order to Unit Group action, and select that you want an Order Using Relative Points, and issue a move order then you should get it to order the group to move in formation. Unless I am horribly wrong.
@intanjir: Go
Oh, well look at that, it works! Thanks for your help :)