Hi, I have searched solution for following problem for a while without much success so here it is:
What I want: when I put an unit on the field I want that unit to change other units pathing.
Imagine a passage from the point A to the point B with width of 12 marines. Then I add 10 marines in a line to this path so there's only 2 marine gap between these points A and B. Next I spawn an enemy unit to the point A and give it an order to move to the point B.
If I use normal collision conditions for marines and the enemy unit, the enemy unit will run straight to the marine "wall" and randomly walk along it and maybe finally find the gap and go through. This I don't want, finding the gap takes way too long and its just stupid.
If I use footprints for marines, the enemy unit will see the change in pathing and run straight for the gap in the wall and go through. This I want.
However! If I give footprints for marines I can't move them and they are not shooting as they should either.
Is there a way to give a footprint for an unit that does affect only other player's (AI's) units? Other ways to make units alter map pathing?
I'm open to any suggestions and thanks for all replies already :)
Thanks for Khalanil1 for idea, heres my "solution":
I have two phases in my map, build and defend. When build phase is activated there's no need for dummies and units can move freely. In defend phase enemy units start approaching and player unit movement is forbidden by a trigger. After that dummies can be spawned without altering player units placements.
If unit movement is not forbidden (Movable state off) units can move and shoot, but their movement is really groovy :D it's like Brownian motion of small particles, if someone needs that kind of "random" movement this might be a way to do it.
You could try using an invisible dummy unit with the footprints. If you're wanting the marines to move, you could have the dummy units spawned with a quick frequency at each marine's position and give the dummy unit an equally short timed life.
When I spawn an invisible dummy to the location of the marine it pokes marine to random direction, usually forward. This seems to be caused by the footprint of the dummy unit. So this kinda works but it will alter unit formations so making lanes etc. will be impossible. I tried with the option ignore placement also without any success.
If the dummy killing frequency is high I can avoid that poking effect, but I think that will cause game to lag. Let say if 4 players all bring in 200 marines and each marine needs that dummy...
I'm trying to figure out if there's a way to alter pathing directly with triggers or something since footprints feels kinda limited.
Well it truly seems that there's no pretty solution for this since the path finding algorithm in SC does not regocnize units like terrain and buildings.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, I have searched solution for following problem for a while without much success so here it is:
What I want: when I put an unit on the field I want that unit to change other units pathing.
Imagine a passage from the point A to the point B with width of 12 marines. Then I add 10 marines in a line to this path so there's only 2 marine gap between these points A and B. Next I spawn an enemy unit to the point A and give it an order to move to the point B.
If I use normal collision conditions for marines and the enemy unit, the enemy unit will run straight to the marine "wall" and randomly walk along it and maybe finally find the gap and go through. This I don't want, finding the gap takes way too long and its just stupid.
If I use footprints for marines, the enemy unit will see the change in pathing and run straight for the gap in the wall and go through. This I want.
However! If I give footprints for marines I can't move them and they are not shooting as they should either.
Is there a way to give a footprint for an unit that does affect only other player's (AI's) units? Other ways to make units alter map pathing? I'm open to any suggestions and thanks for all replies already :)
Thanks for Khalanil1 for idea, heres my "solution": I have two phases in my map, build and defend. When build phase is activated there's no need for dummies and units can move freely. In defend phase enemy units start approaching and player unit movement is forbidden by a trigger. After that dummies can be spawned without altering player units placements.
If unit movement is not forbidden (Movable state off) units can move and shoot, but their movement is really groovy :D it's like Brownian motion of small particles, if someone needs that kind of "random" movement this might be a way to do it.
@dynei: Go
You could try using an invisible dummy unit with the footprints. If you're wanting the marines to move, you could have the dummy units spawned with a quick frequency at each marine's position and give the dummy unit an equally short timed life.
@Khalanil1: Go
When I spawn an invisible dummy to the location of the marine it pokes marine to random direction, usually forward. This seems to be caused by the footprint of the dummy unit. So this kinda works but it will alter unit formations so making lanes etc. will be impossible. I tried with the option ignore placement also without any success.
If the dummy killing frequency is high I can avoid that poking effect, but I think that will cause game to lag. Let say if 4 players all bring in 200 marines and each marine needs that dummy...
I'm trying to figure out if there's a way to alter pathing directly with triggers or something since footprints feels kinda limited.
Well it truly seems that there's no pretty solution for this since the path finding algorithm in SC does not regocnize units like terrain and buildings.