I think you're dealing with Issue Order here to get Stalkers to blink. The Ability would be Ability with Target and you'd specify Blink as the ability, so that means you're left with calculating the point (or at very least direction) of the blink. To do this you'll need to do a little math. First you'll need to get the direction (angle) of the attacking unit, and then just add 180 to that to get the "opposite" direction to blink in. There are probably several good ways to do this so I'll leave that up to you.
I think you'd have a Trigger with Event "Unit Attacked". You can then get the Triggering Unit (attacked unit) and Attacking Unit inside there.
I personally use angle between points. i have tried it other ways and adding 180 has issues when the angle is already above 181 but that might be that i haven't figured out how to get it to reset to 1 after it hits 360. It caused for me if in the right position they would jump forward or sideways instead of back.
With angle between points as long as you set the first point as the location of the unit attacking and the second as the one you want to have blink that angle will carry through to directly behind your unit.
of course that just gives you the direction you still have to do the rest. Happy mapmaking.
Edit: forgot to mention need the point with offset polar for you to use an angle. just encase you didn't know.
it works equally well in ether. just depends on what you are more comfortable with using. There are some things that can only be done with triggers and some that can only be done in data but just about everything with a situation works in both. though some things are easier in one or the other. personally for this i prefer using trigger but that is just me.
Sounds like you want to use the modulo function. Just take any number and mod it by 360 and you'll get the angle expressed in terms of 0 to 360. I think the engine does this in the background anyway, but it's useful if you don't want to deal with huge numbers when adding large polar offsets.
Ha! checked my editor after reading your post and once i saw the one you were talking about i could easily see how to use it. Thanks for pointing that out. though i don't think it does it already because i had a knockback trigger that depending on where the source stood to the target it would cause him to jump forward or sideways. But I am glad i now have a new tool to use.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
how to make stalkers blink blink properly targetting backward when they are attacked??
@strhsxx: Go
I think you're dealing with Issue Order here to get Stalkers to blink. The Ability would be Ability with Target and you'd specify Blink as the ability, so that means you're left with calculating the point (or at very least direction) of the blink. To do this you'll need to do a little math. First you'll need to get the direction (angle) of the attacking unit, and then just add 180 to that to get the "opposite" direction to blink in. There are probably several good ways to do this so I'll leave that up to you.
I think you'd have a Trigger with Event "Unit Attacked". You can then get the Triggering Unit (attacked unit) and Attacking Unit inside there.
I personally use angle between points. i have tried it other ways and adding 180 has issues when the angle is already above 181 but that might be that i haven't figured out how to get it to reset to 1 after it hits 360. It caused for me if in the right position they would jump forward or sideways instead of back.
With angle between points as long as you set the first point as the location of the unit attacking and the second as the one you want to have blink that angle will carry through to directly behind your unit.
of course that just gives you the direction you still have to do the rest. Happy mapmaking.
Edit: forgot to mention need the point with offset polar for you to use an angle. just encase you didn't know.
it seems better doing in data than trigger.. impossible..
it works equally well in ether. just depends on what you are more comfortable with using. There are some things that can only be done with triggers and some that can only be done in data but just about everything with a situation works in both. though some things are easier in one or the other. personally for this i prefer using trigger but that is just me.
@neverwin1011: Go
Sounds like you want to use the modulo function. Just take any number and mod it by 360 and you'll get the angle expressed in terms of 0 to 360. I think the engine does this in the background anyway, but it's useful if you don't want to deal with huge numbers when adding large polar offsets.
@jcraigk: Go
Ha! checked my editor after reading your post and once i saw the one you were talking about i could easily see how to use it. Thanks for pointing that out. though i don't think it does it already because i had a knockback trigger that depending on where the source stood to the target it would cause him to jump forward or sideways. But I am glad i now have a new tool to use.