I'm looking for a trigger where when a unit uses an attack, any attack at all(In my case its when the unit fires a gun via third person shooter.), units nearby will run away.
Help =X
Also if its possible to make units run away from the point that the third person shooter shot at would be cool too.
Event: Any Unit Attacks
Condition: Triggering Unit == "Unit" (the unit that you want this to run for - the "third person" unit)
Action: Pick Any Unit in Unit Group - Unit Group [Units in Region Matching Conditions] - Region [Convert *Circle to Region] X of Triggering Unit, Y of Triggering Unit, **Radius
^ Action: Order [Picked Unit] to [Move] to [Point] - Point [Point with Polar offset] - Position of Picked Unit with Offset towards [Position of Triggering Unit] (range) ***number
- *Or Square if you like
- **Radius is the size of a circle with the unit being it's epicenter, that this will work on.
- ***The range you want them to run away to. Must be a Neg number.
Thats a useful trigger for the map I'm making, but theres a small mistake, or maybe the editors been edited since your post. Heres the way I got it to work:
(...) Action: Order [Picked Unit] to [Move] to [Point] - Point [Point with Polar offset] - Position of Picked Unit Offset by Radius (negative no.) towards (Angle from position of [Position of Triggering Unit] to [Position of Picked Unit].
Use data not triggers! Have the unit have a Buff behavior with a disabling validator of the type enumerate area combined with caster not in combat. That way the behavior will disable if the enemy is not attacking or close enough. Set Combat - Damage Respone - Handled to a Create Persistant effect with the offset somewhere behind the unit and and Issue Order effect set to Move. That means that when the unit is hit and the hitter is within a certain range it will be ordered ro move in the oposite direction (advance backwards aka retreat). You can make this a group response by throwing in a Search Area effect before the persistant able to target self.
Rollback Post to RevisionRollBack
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
I'm looking for a trigger where when a unit uses an attack, any attack at all(In my case its when the unit fires a gun via third person shooter.), units nearby will run away. Help =X Also if its possible to make units run away from the point that the third person shooter shot at would be cool too.
@Noobnoobn1223
By trigger is one way...
Event: Any Unit Attacks
Condition: Triggering Unit == "Unit" (the unit that you want this to run for - the "third person" unit)
Action: Pick Any Unit in Unit Group - Unit Group [Units in Region Matching Conditions] - Region [Convert *Circle to Region] X of Triggering Unit, Y of Triggering Unit, **Radius
^ Action: Order [Picked Unit] to [Move] to [Point] - Point [Point with Polar offset] - Position of Picked Unit with Offset towards [Position of Triggering Unit] (range) ***number
- *Or Square if you like
- **Radius is the size of a circle with the unit being it's epicenter, that this will work on.
- ***The range you want them to run away to. Must be a Neg number.
@FrozenFirebat: Go
Thats a useful trigger for the map I'm making, but theres a small mistake, or maybe the editors been edited since your post. Heres the way I got it to work:
(...) Action: Order [Picked Unit] to [Move] to [Point] - Point [Point with Polar offset] - Position of Picked Unit Offset by Radius (negative no.) towards (Angle from position of [Position of Triggering Unit] to [Position of Picked Unit].
Use data not triggers! Have the unit have a Buff behavior with a disabling validator of the type enumerate area combined with caster not in combat. That way the behavior will disable if the enemy is not attacking or close enough. Set Combat - Damage Respone - Handled to a Create Persistant effect with the offset somewhere behind the unit and and Issue Order effect set to Move. That means that when the unit is hit and the hitter is within a certain range it will be ordered ro move in the oposite direction (advance backwards aka retreat). You can make this a group response by throwing in a Search Area effect before the persistant able to target self.
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
Try
Have it do a search-area effect for nearby allies.
Search area effect should be a Set effect that