[Solved]Adding an additional effect to an on-hit ability
Hey there~
Big Edit: I Solved the problems with your help and some thinking/testing of my little own. I also changed what the ability does, so dont be surprised ^^"
The ability I created(Petrifying Arrows) slows the enemy on hit and reduces their damage dealt.
The initial base-ability I used was cold arrows, but that did not work,b ecause it had no order string and adding new order strings was, for some reason, not accepted. So I just coded the slowing part per trigger into searing arrows, which is the new base ability - and that one works.
Things to Note:
- It is important(as it seems) to use an ability which already has an order string.
- I used, in the "Petrifying Arrows Unit Group"-Trigger the unit-type check, so it would not conflict with the normal Searing Arrows ability.
- I used multiple or-conditions in the "Petrifying Arrows Unit Group", because my unit has another on-hit ability, and setting that one to autocast also need to remove her from the unit group.
- Using the damage engine event(DamageEvent becomes equal to 1, I believe it was) has caused several bugs with my unit(For example: Triggering my triggers with other abilities that deal damage), so I'd refrain from using it.
Anyway, here is the trigger:
Hey there~
Big Edit: I Solved the problems with your help and some thinking/testing of my little own. I also changed what the ability does, so dont be surprised ^^"
The ability I created(Petrifying Arrows) slows the enemy on hit and reduces their damage dealt.
The initial base-ability I used was cold arrows, but that did not work,b ecause it had no order string and adding new order strings was, for some reason, not accepted. So I just coded the slowing part per trigger into searing arrows, which is the new base ability - and that one works.
Things to Note:
- It is important(as it seems) to use an ability which already has an order string.
- I used, in the "Petrifying Arrows Unit Group"-Trigger the unit-type check, so it would not conflict with the normal Searing Arrows ability.
- I used multiple or-conditions in the "Petrifying Arrows Unit Group", because my unit has another on-hit ability, and setting that one to autocast also need to remove her from the unit group.
- Using the damage engine event(DamageEvent becomes equal to 1, I believe it was) has caused several bugs with my unit(For example: Triggering my triggers with other abilities that deal damage), so I'd refrain from using it.
Anyway, here is the trigger:
-
Petrifying Arrows Setup
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Set PA_Ability = Petrifying Arrows
-
-
-
Petrifying Arrows Unit Group
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Medusa
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Issued order) Equal to (Order(flamingarrows))
-
-
Then - Actions
-
Unit Group - Add (Triggering unit) to PA_Group
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Issued order) Equal to (Order(unpoisonarrows))
-
(Issued order) Equal to (Order(poisonarrows))
-
(Issued order) Equal to (Order(poisonarrowstarg))
-
(Issued order) Equal to (Order(unflamingarrows))
-
-
-
-
Then - Actions
-
Unit Group - Remove (Triggering unit) from PA_Group
-
-
Else - Actions
-
-
-
-
-
-
Added Effects Autocast
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Unit-type of (Attacking unit)) Equal to Medusa
-
((Attacking unit) is in PA_Group) Equal to True
-
-
Actions
-
Unit - Create 1 Petrifying Arrows Dummy for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing degrees
-
Unit - Set Level of Petrifying Arrows Damage Decrease for (Last created unit) to (Level of PA_Ability for (Attacking unit))
-
Unit - Order (Last created unit) to Human Priest - Inner Fire (Attacked unit)
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Unit - Create 1 Petrifying Arrows Dummy II for (Owner of (Attacking unit)) at (Position of (Attacked unit)) facing Default building facing degrees
-
Unit - Set Level of Petrifying Arrows Slow for (Last created unit) to (Level of PA_Ability for (Attacking unit))
-
Unit - Order (Last created unit) to Human Sorceress - Slow (Attacked unit)
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
-
-
Added Effects Manual Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to PA_Ability
-
-
Actions
-
Unit - Create 1 Petrifying Arrows Dummy for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
-
Unit - Set Level of Petrifying Arrows Damage Decrease for (Last created unit) to (Level of PA_Ability for (Triggering unit))
-
Unit - Order (Last created unit) to Human Priest - Inner Fire (Target unit of ability being cast)
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Unit - Create 1 Petrifying Arrows Dummy II for (Owner of (Triggering unit)) at (Position of (Target unit of ability being cast)) facing Default building facing degrees
-
Unit - Set Level of Petrifying Arrows Slow for (Last created unit) to (Level of PA_Ability for (Triggering unit))
-
Unit - Order (Last created unit) to Human Sorceress - Slow (Target unit of ability being cast)
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
-
Last edited: