I'm looking for a way to give a unit an "unstuck" ability that players can use if they build themselves into a corner with buildings. However, the unstuck ability must not be able to move up or down cliff levels, because that would break the game. I tried using blink and changing the teleport effect, but the "Test Cliff" and "Test Zone" flags don't appear to do anything.
Make a 'Location Compare Cliff Level' validator which checks if the cliff level of blink's target point is less than or equal to the caster point. Use this validator to see if blink can be used.
I'm not sure whether it'd be best to use the validator for the ability itself or the effect. Try both and see which you like.
You might also want to add a Location Range validator with pathing enabled so you can't blink past cliffs.
That gives me something very, very close to what I need!
However, there are a couple of problems:
-If I use Location Range validator with pathing, I can't blink outside of a wall of buildings, which is the point of the ability - the validator sees that I can't path to the target point, but that's the whole reason I'm using the ability; because I'm stuck!
-If I don't use that validator, then I can blink over rivers and over chasms, which is a big no-no. It's the same as blinking up cliffs, it can't be allowed.
-Even with the Location Compare Cliff Level validator, I can still blink up cliffs - if I click to blink to a point that's on the same level as me, but there's a cliff in between me and the point and the point is out of the blink range, then the blink skill will move to the maximum distance and up the cliff.
If we could find ways to fix these, that would be perfect!
I actually tried making a unit that collides only with terrain but not with buildings - and no matter what combination of movers and collision flags I used, I can't seem to get that to work.
Oh, I see. buildings are counted when calculating pathing distance. I was unaware.
I did some testing to see if it was possible to make a validator to not count buildings, but was unsuccessful at that. However, using triggers I managed to create the right conditions to check terrain pathing distance ignoring buildings. In addition, on the teleport effect, setting placement range to 0 will ensure the unit will only teleport directly to where you aim the ability.
You may remove the range test in the trigger if you only want to be unable to blink to locations where it cannot possibly get to, which is indicated by pathing cost -1
I'm a little worried about the "temporarily change ownership of unit" thing, since it could have some unforeseen consequences, but I think I'll use this!
Hey there,
I'm looking for a way to give a unit an "unstuck" ability that players can use if they build themselves into a corner with buildings. However, the unstuck ability must not be able to move up or down cliff levels, because that would break the game. I tried using blink and changing the teleport effect, but the "Test Cliff" and "Test Zone" flags don't appear to do anything.
Ideas?
Make a 'Location Compare Cliff Level' validator which checks if the cliff level of blink's target point is less than or equal to the caster point. Use this validator to see if blink can be used.
I'm not sure whether it'd be best to use the validator for the ability itself or the effect. Try both and see which you like.
You might also want to add a Location Range validator with pathing enabled so you can't blink past cliffs.
That gives me something very, very close to what I need!
However, there are a couple of problems:
-If I use Location Range validator with pathing, I can't blink outside of a wall of buildings, which is the point of the ability - the validator sees that I can't path to the target point, but that's the whole reason I'm using the ability; because I'm stuck!
-If I don't use that validator, then I can blink over rivers and over chasms, which is a big no-no. It's the same as blinking up cliffs, it can't be allowed.
-Even with the Location Compare Cliff Level validator, I can still blink up cliffs - if I click to blink to a point that's on the same level as me, but there's a cliff in between me and the point and the point is out of the blink range, then the blink skill will move to the maximum distance and up the cliff.
If we could find ways to fix these, that would be perfect!
Thanks!
Thoughts?
A morph that temporarily removes collision of the unit?
Or some jump based ability which has to select the building to jump over?
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
@DrSuperEvil: Go
I actually tried making a unit that collides only with terrain but not with buildings - and no matter what combination of movers and collision flags I used, I can't seem to get that to work.
Is it actually possible to make a unit that doesn't collide with buildings but collides with terrains?
Oh, I see. buildings are counted when calculating pathing distance. I was unaware.
I did some testing to see if it was possible to make a validator to not count buildings, but was unsuccessful at that. However, using triggers I managed to create the right conditions to check terrain pathing distance ignoring buildings. In addition, on the teleport effect, setting placement range to 0 will ensure the unit will only teleport directly to where you aim the ability.
You may remove the range test in the trigger if you only want to be unable to blink to locations where it cannot possibly get to, which is indicated by pathing cost -1
@Builder_Bob: Go
That is pretty much perfect! Thank you!
I'm a little worried about the "temporarily change ownership of unit" thing, since it could have some unforeseen consequences, but I think I'll use this!
Big thanks!
I've implemented this in my map, it's working pretty well! thanks!