Use case : When a Unit attacks and successfully damage its target, the targeted Unit slows down.
Existing example : The Terran Marauder attack when upgraded with "Punisher Grenades".
I won't explain the example but I will detail how I usually do that.
To achieve this, we need 2 behaviors and 1 effect :
- A Behavior of type "Bonus" (called [1]) which will reduce the Unit's movement speed.
- A Behavior of type "Bonus" (called [2]) which will apply [1].
- An Effect of type "Apply Behavior" (called [3]) which will apply [1].
[1] : Change the field "Modification", then select "Movement" tab and set values to :
- "MoveSpeedMultiplier" (Ex : 0.5 will reduce half the Unit m.speed).
- "Duration". The Behavior must expire because you may need to apply it again. Ex : The unit slows down for 2 seconds.
[2] : Change the field "Damage Response", then select "Combat" tab and set values to :
- "Chance" from "0" to "1". The response HAS TO BE executed.
- "Handled" with the applied effect [3].
- "Duration". The Behavior must expire because you may need to apply it again. Ex : "0.00" to never expire, this unit is always sensitive to attacks.
Last thing to do is to add the Behavior [2] to units sensitive to the slow attack.
What will happen ?
To be honest, any unit owning behavior [2] will be slowed from any effect, thus from any attack dealing effect of type "Damage", and that might be not the expected work. That feels not correct.
You have understood how works "Damage Response". That may open some possibilities to you.
We know that the slow effect is functional thank to that.
You may need (and that is the general case) to only deal the slow effect from that specific attack.
The effect [3] must be added to your Effect of type "Set" [4] if already existing in your attack schema (might be a Weapon, might be an Ability).
- If [4] does not exist, create one.
- Replace the effect from your attack schema with [4].
- Add [3] to [4].
Optional : You can delete [2].
That's all. That attack always slow damaged units.
Advanced tip :
- Use validators to filter units.
Have a nice day.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi guys, first post here and a newbie to SC2 editor
Does anyone know how to slow a unit when taking damage?
I've tried and Actor Event (UnitDamaged event) and Set Speed Maximum to 0 or Stop but it just doesn't seem to work
Appreciate the help in advance
Hello,
I'll try to make easy for you.
Use case : When a Unit attacks and successfully damage its target, the targeted Unit slows down.
Existing example : The Terran Marauder attack when upgraded with "Punisher Grenades".
I won't explain the example but I will detail how I usually do that.
To achieve this, we need 2 behaviors and 1 effect :
- A Behavior of type "Bonus" (called [1]) which will reduce the Unit's movement speed.
- A Behavior of type "Bonus" (called [2]) which will apply [1].
- An Effect of type "Apply Behavior" (called [3]) which will apply [1].
[1] : Change the field "Modification", then select "Movement" tab and set values to :
- "MoveSpeedMultiplier" (Ex : 0.5 will reduce half the Unit m.speed).
- "Duration". The Behavior must expire because you may need to apply it again. Ex : The unit slows down for 2 seconds.
[2] : Change the field "Damage Response", then select "Combat" tab and set values to :
- "Chance" from "0" to "1". The response HAS TO BE executed.
- "Handled" with the applied effect [3].
- "Duration". The Behavior must expire because you may need to apply it again. Ex : "0.00" to never expire, this unit is always sensitive to attacks.
Last thing to do is to add the Behavior [2] to units sensitive to the slow attack.
What will happen ?
To be honest, any unit owning behavior [2] will be slowed from any effect, thus from any attack dealing effect of type "Damage", and that might be not the expected work. That feels not correct.
You have understood how works "Damage Response". That may open some possibilities to you.
We know that the slow effect is functional thank to that.
You may need (and that is the general case) to only deal the slow effect from that specific attack.
The effect [3] must be added to your Effect of type "Set" [4] if already existing in your attack schema (might be a Weapon, might be an Ability).
- If [4] does not exist, create one.
- Replace the effect from your attack schema with [4].
- Add [3] to [4].
Optional : You can delete [2].
That's all. That attack always slow damaged units.
Advanced tip :
- Use validators to filter units.
Have a nice day.