My map features a unit walking to a point, but i dont know how to set the trigger up so if the unit is blocked by other units it will attack them and then continue walking. I dont want the unit to attack everything in its way but attack when its path is blocked.
Is this like a TD, where it's supposed to stop and attack when there is no possible route to the destination, or do you want the unit to try to move straight (birds path) towards the destination and stop to attack when something blocks him?
I'm making a remake of "can you stop one unit" so there is a path down the center of the map that the unit walks down. My version of the map allow mele units in the path but im having trouble because when i test the unit trys to walk around them. and if i make the melee units hold position, he'll jusk walk back and forth. The path is a cliff level below the surrounding area.
P.S. Actually instead of attack i'm thinking adding blink to the units abilities so he'll just teleport past them but i wouldnt know how to set up where to put the point for the unit to teleport to...
You could modify the collision properties of the units so that they could walk through each other. This would fix the pathing issue that the units want to walk around rather than into each other. Now you can use the "Unit Enters/Leaves Range Of Unit" event in a trigger, as suggested by Bump, and order the units to do what you want.
Edit:
As for the blink command, it should look something like this:
(The unit triggering the event will blink 5 range in the direction it's currently facing. Assuming of course that the unit has the Blink ability and it's not on cooldown.)
I Think I'll change there collision size to 0 so they walk right through each other, thanks for that idea it would of taken me forever to think of that.@Berrala: Go
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
My map features a unit walking to a point, but i dont know how to set the trigger up so if the unit is blocked by other units it will attack them and then continue walking. I dont want the unit to attack everything in its way but attack when its path is blocked.
Might not be the best solution, but try reducing the acquisition range so it wouldn't attack unless it was right in front of them.
A nice trigger based on event for 'unit enters range of 'x' unit' might be appropriate here.
Is this like a TD, where it's supposed to stop and attack when there is no possible route to the destination, or do you want the unit to try to move straight (birds path) towards the destination and stop to attack when something blocks him?
I'm making a remake of "can you stop one unit" so there is a path down the center of the map that the unit walks down. My version of the map allow mele units in the path but im having trouble because when i test the unit trys to walk around them. and if i make the melee units hold position, he'll jusk walk back and forth. The path is a cliff level below the surrounding area. P.S. Actually instead of attack i'm thinking adding blink to the units abilities so he'll just teleport past them but i wouldnt know how to set up where to put the point for the unit to teleport to...
You could modify the collision properties of the units so that they could walk through each other. This would fix the pathing issue that the units want to walk around rather than into each other. Now you can use the "Unit Enters/Leaves Range Of Unit" event in a trigger, as suggested by Bump, and order the units to do what you want.
Edit:
As for the blink command, it should look something like this:
(The unit triggering the event will blink 5 range in the direction it's currently facing. Assuming of course that the unit has the Blink ability and it's not on cooldown.)
I Think I'll change there collision size to 0 so they walk right through each other, thanks for that idea it would of taken me forever to think of that.@Berrala: Go