- Joined
- Sep 11, 2023
- Messages
- 211
This is the ability i am in the process of making trigger for, so far it functions, sans the last part about giving shield to target instead if the caster has died.Shadow Pact (modified drain life spell)
Transfers life essence by almost instantly taking 55 hit points from the Witch Doctor and giving 75 hit points to a target friendly unit. |nAlso the Witch Doctor gains a invulnerability shield for 5 seconds afterwards. |nIf the Witch Doctor perished while casting this spell, then target friendly unit gains the shield.
The issue im facing is if when the second if,then,else block with the
-
((ShadowPact_Target is alive) Equal to True) and ((ShadowPact_Caster is alive) Not equal to True)
How can that be fixed, is it needed to loop the second seperately ? Also would like to ask if this could be done without having to use a periodic loop at all ?
In addition i can tell that Shadow Pact (dummy shield fx) is a modified dummy rejuvenation spell, it gives the buff to show shield fx on unit(and used for checking invulnerability)
-
Shadow Pact shield
-
Events
-
Unit - A unit Finishes casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Shadow Pact
-
-
Actions
-
Set ShadowPact_Caster = (Triggering unit)
-
Set ShadowPact_Target = (Target unit of ability being cast)
-
Unit - Create 1 Dummy Unit (0 Collision) for (Owner of (Triggering unit)) at (Position of ShadowPact_Caster) facing (Position of ShadowPact_Target)
-
Set ShadowPact_Dummy = (Last created unit)
-
Unit - Add a 3.00 second Generic expiration timer to ShadowPact_Dummy
-
Unit - Add Shadow Pact (dummy shield fx) to ShadowPact_Dummy
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ShadowPact_Caster is alive) Equal to True
-
-
Then - Actions
-
Unit - Order ShadowPact_Dummy to Night Elf Druid Of The Claw - Rejuvenation ShadowPact_Caster
-
Set ShadowPact_TempUnit = ShadowPact_Caster
-
Unit Group - Add ShadowPact_TempUnit to ShadowPact_Group
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((ShadowPact_Target is alive) Equal to True) and ((ShadowPact_Caster is alive) Not equal to True)
-
-
Then - Actions
-
Unit - Order ShadowPact_Dummy to Night Elf Druid Of The Claw - Rejuvenation ShadowPact_Target
-
Set ShadowPact_TempUnit = ShadowPact_Target
-
Unit Group - Add ShadowPact_TempUnit to ShadowPact_Group
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in ShadowPact_Group) Greater than 0
-
-
Then - Actions
-
Trigger - Turn on Shadow Pact loop <gen>
-
-
Else - Actions
-
-
-
-
Shadow Pact loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in ShadowPact_Group and do (Actions)
-
Loop - Actions
-
Set ShadowPact_TempUnit = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ShadowPact_TempUnit has buff Shadow Pact ) Equal to True
-
-
Then - Actions
-
Unit - Add ShadowPact_Invuln to ShadowPact_TempUnit
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(ShadowPact_TempUnit has buff Shadow Pact ) Equal to False
-
-
Then - Actions
-
Unit - Remove ShadowPact_Invuln from ShadowPact_TempUnit
-
Unit Group - Remove ShadowPact_TempUnit from ShadowPact_Group
-
-
Else - Actions
-
-
-
-
-