sentrywiz
S
sentrywiz
This thread has been started to not clutter the world edit forum, because the question is related to triggers. To visit that thread, click here
In the previous thread, i modified the dds in my map and added "unit is attacked" triggers so that I can manually cause specific unit animations for custom made critical and bash effects.
I feel its clunky and it sometimes doesn't work. Also with some units that have longer animations, they sort of get stuck in the end of the animation for a fraction of a second there.
Idk, maybe i'm just nit picking. In the case i'm not, here are my triggers, if you can suggest a more efficient way to make this work, i'm all ears (or eyes in this case) ;P
Please avoid all variables you don't understand and focus on the point of this thread.
If I don't disclose a variable, that means it doesn't play a role in this.
Important variables:
Player_HeroCrit_Animation [ Array ] - an integer with the animation number
Player_Will_Bash [ Array ] - boolean so that the dds knows the unit will bash
Player_Will_Crit [ Array ] - boolean so that the dds knows the unit will crit
In the previous thread, i modified the dds in my map and added "unit is attacked" triggers so that I can manually cause specific unit animations for custom made critical and bash effects.
I feel its clunky and it sometimes doesn't work. Also with some units that have longer animations, they sort of get stuck in the end of the animation for a fraction of a second there.
Idk, maybe i'm just nit picking. In the case i'm not, here are my triggers, if you can suggest a more efficient way to make this work, i'm all ears (or eyes in this case) ;P
Please avoid all variables you don't understand and focus on the point of this thread.
If I don't disclose a variable, that means it doesn't play a role in this.
Important variables:
Player_HeroCrit_Animation [ Array ] - an integer with the animation number
Player_Will_Bash [ Array ] - boolean so that the dds knows the unit will bash
Player_Will_Crit [ Array ] - boolean so that the dds knows the unit will crit
-
Critical Bash Animations
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
((Attacking unit) is A Hero) Equal to True
-
((Attacking unit) is an illusion) Equal to True
-
-
-
Or - Any (Conditions) are true
-
Conditions
-
((Attacking unit) has an item of type Palica) Equal to True
-
((Attacking unit) has an item of type Bastum) Equal to True
-
Player_Crit_Chance[(Player number of (Owner of (Attacking unit)))] Greater than 0.00
-
-
-
-
Actions
-
Set Animation_Unit = (Attacking unit)
-
Set Animation_Int = (Player number of (Owner of (Attacking unit)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Will_Crit[Animation_Int] Equal to False
-
Player_Crit_Chance[Animation_Int] Greater than 0.00
-
(Random real number between 1.00 and 100.00) Less than or equal to Player_Crit_Chance[Animation_Int]
-
-
Then - Actions
-
Set Player_Will_Crit[Animation_Int] = True
-
Custom script: call SetUnitAnimationByIndex(udg_Animation_Unit, udg_Player_HeroCrit_Animation[udg_Animation_Int])
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Will_Bash[Animation_Int] Equal to False
-
(Random real number between 1.00 and 100.00) Less than or equal to 10.00
-
Or - Any (Conditions) are true
-
Conditions
-
((Attacking unit) has an item of type Palica) Equal to True
-
((Attacking unit) has an item of type Bastum) Equal to True
-
-
-
-
Then - Actions
-
Set Player_Will_Bash[(Player number of (Owner of (Attacking unit)))] = True
-
Custom script: call SetUnitAnimationByIndex(udg_Animation_Unit, udg_Player_HeroCrit_Animation[udg_Animation_Int])
-
-
Else - Actions
-
-
-
-
PhysicalDMGevent
-
Events
-
Game - PDD_damageEventTrigger becomes Equal to 1.00
-
-
Conditions
-
PDD_damageType Equal to PDD_PHYSICAL
-
-
Actions
-
Set temp_int3 = (Player number of (Owner of PDD_source))
-
Set temp_int4 = (Player number of (Owner of PDD_target))
-
If (Player_Will_Bash[temp_int3] Equal to True) then do (Trigger - Run PASSIVE ITEM PALICA BASTUM <gen> (checking conditions)) else do (Do nothing)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Player_Will_Crit[temp_int3] Equal to True
-
Or - Any (Conditions) are true
-
Conditions
-
(PDD_source is an illusion) Equal to True
-
(PDD_source is A Hero) Equal to True
-
-
-
-
Then - Actions
-
Set PDD_amount = (PDD_amount x 2.00)
-
Set dmg__font_size = 11.00
-
Set dmg__string_color = |c00FF2626
-
Set dmg__string_end = !|r
-
Set Player_Will_Crit[temp_int3] = False
-
-
Else - Actions
-
Set dmg__font_size = 9.00
-
Set dmg__string_color = |c00E3E3E3
-
Set dmg__string_end = |r
-
-
-
-