- Joined
- Jul 12, 2008
- Messages
- 3,137
I needed a way to trigger for offensive passive abilities. There are some here and there, but I figured I'd post a Tutorial of how to create the one I produced. I made this in only a few minutes and so it is possible that it may have an unwanted side-effect, but I doubt it.
The Skeleton of the Trigger
Step 1: Creating the ability and buff. First, the passive ability should be given a buff. As the buff will not actually stay on the target, it will be best to make a custom buff with the name of your ability. Make sure to give your ability a duration time, so that the buff will last on the target for triggering's sake.
Step 2: Triggering for the Event. There are many damage detection systems, but this is a simple way to trigger for the Event. As the passive is offensive, it would be activated when a unit is attacked.
Next, you would need to make the trigger check the attacked unit to see if it has the buff. This would ensure that your ability has been activated upon the target, even if it is a % chance ability.
How to make an ability deal damage based on statistics:
To do this, you must simply make a trigger action to make the attacking unit deal a specific amount of damage to the attacked unit. Since you now know how to create the events and conditions, you would only have to change what action you have the trigger perform. You can also customize the damage type, and whether or not to deal damage based on the base stats, or to include additions from abilities and items.
For more effects, simply check out other threads about triggering active abilities and use the triggering in this section to have your passive ability be triggered.
The Skeleton of the Trigger
Step 1: Creating the ability and buff. First, the passive ability should be given a buff. As the buff will not actually stay on the target, it will be best to make a custom buff with the name of your ability. Make sure to give your ability a duration time, so that the buff will last on the target for triggering's sake.
Step 2: Triggering for the Event. There are many damage detection systems, but this is a simple way to trigger for the Event. As the passive is offensive, it would be activated when a unit is attacked.
-
Events
-
Unit - A unit Is attacked
-
Next, you would need to make the trigger check the attacked unit to see if it has the buff. This would ensure that your ability has been activated upon the target, even if it is a % chance ability.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(((Attacked unit) has buff Bash ) Equal to True)
-
-
-
If - Conditions
-
((Attacked unit) has buff Bash ) Equal to True
-
-
Then - Actions
-
-------- Desired Effect --------
-
Unit - Remove Bash buff from (Attacked unit)
-
-
Else - Actions
-
Bash
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
Actions
-
Set AttackedUnit = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Attacked unit) has buff Bash ) Equal to True
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Bash Effect for (Triggering unit)) Equal to 0
-
-
Then - Actions
-
Unit - Add Bash Effect to AttackedUnit
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
(Level of Bash Effect for AttackedUnit) Greater than or equal to 1
-
(Level of Bash Effect for AttackedUnit) Less than 10
-
-
-
-
Then - Actions
-
Unit - Increase level of Bash Effect for AttackedUnit
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Unit - Remove Bash buff from AttackedUnit
-
Wait 2.00 game-time seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Bash Effect for AttackedUnit) Greater than 1
-
-
Then - Actions
-
Unit - Decrease level of Bash Effect for AttackedUnit
-
-
Else - Actions
-
Unit - Remove Bash Effect from AttackedUnit
-
-
-
-
Else - Actions
-
-
-
How to make an ability deal damage based on statistics:
To do this, you must simply make a trigger action to make the attacking unit deal a specific amount of damage to the attacked unit. Since you now know how to create the events and conditions, you would only have to change what action you have the trigger perform. You can also customize the damage type, and whether or not to deal damage based on the base stats, or to include additions from abilities and items.
-
Actions
-
Unit - Cause (Attacking unit) to damage (Triggering unit), dealing (Real((Strength of (Attacking unit) (Include bonuses)))) damage of attack type Hero and damage type Normal
-
For more effects, simply check out other threads about triggering active abilities and use the triggering in this section to have your passive ability be triggered.
Last edited: