Hey guys,
I'm currently working on my map again and I need help 'cause I cant figure out which condition is missing for this trigger to work as I want.
Short Description (So you'll understand what the trigger is supposed to do):
Spell Shield: Absorbs the next Spell that is hitting you. After absorbing, a timer starts; when timer ends it can absorb again.
Problem is: When a Unit with "Spell Shield" attacks while the "Spell Shield" is still on cooldown, it will instantly create a "Spell Shield" ignoring the remaining time of timer.
Of course I am using Bribe's awesome Damage Engine System.
So here is the code maybe you can help me finding an additional condition or another way to fix it.
EDIT: Code Updated
I'm currently working on my map again and I need help 'cause I cant figure out which condition is missing for this trigger to work as I want.
Short Description (So you'll understand what the trigger is supposed to do):
Spell Shield: Absorbs the next Spell that is hitting you. After absorbing, a timer starts; when timer ends it can absorb again.
Problem is: When a Unit with "Spell Shield" attacks while the "Spell Shield" is still on cooldown, it will instantly create a "Spell Shield" ignoring the remaining time of timer.
Of course I am using Bribe's awesome Damage Engine System.
So here is the code maybe you can help me finding an additional condition or another way to fix it.
-
Spell Shield GetDmg
-
Events
-
Spiel - DamageEvent becomes Equal to 1.00
-
-
Conditions
-
(DamageEventTarget has buff Spell Shield (Buff) ) Equal to True
-
IsDamageSpell Equal to True
-
-
Actions
-
Unit - Remove Spell Shield (Buff) buff from DamageEventTarget
-
-------- ----------------------------------------------------------------- --------
-
-------- ----------------------------------------------------------------- --------
-
Unit Group - Add DamageEventTarget to ZS_Group
-
-------- ----------------------------------------------------------------- --------
-
Set ZS_RefreshTime[UDex] = 3.00
-
-------- ----------------------------------------------------------------- --------
-
Trigger - Turn on Spell Shield Loop <gen>
-
-------- ----------------------------------------------------------------- --------
-
-
-
Spell Shield Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in ZS_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
((Picked unit) is in ZS_Group_Debuff) Equal to False
-
((Picked unit) has buff Spell Shield (Buff) ) Equal to False
-
-
'THEN'-Actions
-
Set ZS_RefreshTime[UDex] = (ZS_RefreshTime[UDex] - 0.03)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
ZS_RefreshTime[UDex] Kleiner gleich 0.00
-
-
'THEN'-Actions
-
Quest - Display to (All players) the Quest-Update message: Get Shield
-
Unit Group - Remove (Picked unit) from ZS_Group
-
-------- ----------------------------------------------------------------- --------
-
-------- ----------------------------------------------------------------- --------
-
Set ZS_TempLoc = (Position of (Picked unit))
-
Unit - Create 1 A Dummy For All for (Owner of (Picked unit)) at ZS_TempLoc facing 0.00 degrees
-
Unit - Add Spell Shield - (Buff Ability) to (Last created unit)
-
Unit - Order (Last created unit) to Human-Priest - 'Inner Fire' (Picked unit)
-
Unit - Add a 1.00 second Standard expiration timer to (Last created unit)
-
-------- ----------------------------------------------------------------- --------
-
-------- ----------------------------------------------------------------- --------
-
Custom script: call RemoveLocation(udg_ZS_TempLoc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
'IF'-Conditions
-
(ZS_Group is empty) Equal to True
-
-
'THEN'-Actions
-
Trigger - Turn off (This trigger)
-
-
'ELSE'-Actions
-
-
-
'ELSE'-Actions
-
-
-
'ELSE'-Actions
-
-
-
-
-
EDIT: Code Updated
Last edited: