I think I might have some memory leaks in these triggers...lags real bad after using them several times. They all work but I did have a bug with the caster of Ocean's Fury. When the caster of it would attack someone, they would keep auto attacking until they died. It didnt matter if I tried to move him away, It was like he was paused but still attacking. I am not sure if these triggers are even good or not I just started playing with the editor so if you want let me know if anything else is wrong or if there is a better way I can do it.
Trigger:
- Drought x Rain
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Drought/Rain
- Actions
- Set Casting_Unit[41] = (Triggering unit)
- Set Casting_Unit_Target[41] = (Target unit of ability being cast)
- Set Caster_Target_Position[41] = (Position of Casting_Unit_Target[41])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Casting_Unit_Target[41] belongs to an enemy of (Owner of Casting_Unit[41])) Equal to True
- Then - Actions
- Special Effect - Create a special effect at Caster_Target_Position[41] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Unit - Cause Casting_Unit[41] to damage Casting_Unit_Target[41], dealing 6.00 damage of attack type Hero and damage type Normal
- Wait 1.00 seconds
- Unit - Cause Casting_Unit[41] to damage Casting_Unit_Target[41], dealing 6.00 damage of attack type Hero and damage type Normal
- Wait 1.00 seconds
- Unit - Cause Casting_Unit[41] to damage Casting_Unit_Target[41], dealing 6.00 damage of attack type Hero and damage type Normal
- Wait 1.00 seconds
- Unit - Cause Casting_Unit[41] to damage Casting_Unit_Target[41], dealing 6.00 damage of attack type Hero and damage type Normal
- Wait 1.00 seconds
- Unit - Cause Casting_Unit[41] to damage Casting_Unit_Target[41], dealing 6.00 damage of attack type Hero and damage type Normal
- Custom script: call RemoveLocation (udg_Caster_Target_Position[41])
- Else - Actions
- Set Caster_Target_Health[41] = (Life of Casting_Unit_Target[41])
- Unit - Set life of Casting_Unit_Target[41] to (Caster_Target_Health[41] + 10.00)
- Wait 1.00 seconds
- Set Caster_Target_Health[41] = (Life of Casting_Unit_Target[41])
- Unit - Set life of Casting_Unit_Target[41] to (Caster_Target_Health[41] + 10.00)
- Wait 1.00 seconds
- Set Caster_Target_Health[41] = (Life of Casting_Unit_Target[41])
- Unit - Set life of Casting_Unit_Target[41] to (Caster_Target_Health[41] + 10.00)
- Wait 1.00 seconds
- Set Caster_Target_Health[41] = (Life of Casting_Unit_Target[41])
- Unit - Set life of Casting_Unit_Target[41] to (Caster_Target_Health[41] + 10.00)
- Wait 1.00 seconds
- Set Caster_Target_Health[41] = (Life of Casting_Unit_Target[41])
- Unit - Set life of Casting_Unit_Target[41] to (Caster_Target_Health[41] + 10.00)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[41])
- If - Conditions
- Events
Trigger:
- Riverflow
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Riverflow
- Actions
- Set Casting_Unit[42] = (Triggering unit)
- Set Casting_Unit_Target[42] = (Target unit of ability being cast)
- Set Caster_Target_Position[42] = (Position of Casting_Unit_Target[42])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Casting_Unit_Target[42] belongs to an enemy of (Owner of Casting_Unit[42])) Equal to True
- Then - Actions
- Unit - Set Casting_Unit_Target[42] movement speed to ((Current movement speed of Casting_Unit_Target[42]) x 0.80)
- Wait 5.00 seconds
- Unit - Set Casting_Unit_Target[42] movement speed to ((Current movement speed of Casting_Unit_Target[42]) / 0.80)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[42])
- Else - Actions
- Unit - Set Casting_Unit_Target[42] movement speed to ((Current movement speed of Casting_Unit_Target[42]) / 0.80)
- Wait 5.00 seconds
- Unit - Set Casting_Unit_Target[42] movement speed to ((Current movement speed of Casting_Unit_Target[42]) x 0.80)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[42])
- If - Conditions
- Events
Trigger:
- Low Tides x High Tides
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Low Tides/High Tides
- Actions
- Set Casting_Unit[43] = (Triggering unit)
- Set Casting_Unit_Target[43] = (Target unit of ability being cast)
- Set Caster_Target_Position[43] = (Position of Casting_Unit_Target[43])
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- ((Unit-type of Casting_Unit_Target[43]) Not equal to Faerie Dragon) and ((Unit-type of Casting_Unit_Target[43]) Not equal to Faerie Dragon)
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Casting_Unit_Target[43] belongs to an enemy of (Owner of Casting_Unit[43])) Equal to True
- Then - Actions
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] - 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] - 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] - 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] - 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] - 7.00)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[43])
- Else - Actions
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] + 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] + 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] + 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] + 7.00)
- Wait 1.00 seconds
- Set Caster_Target_Mana[43] = (Mana of Casting_Unit_Target[43])
- Unit - Set mana of Casting_Unit_Target[43] to (Caster_Target_Mana[43] + 7.00)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[43])
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- Do nothing
- If - Conditions
- Events
Trigger:
- Oceans Fury
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Ocean's Fury
- Actions
- Set Casting_Unit[44] = (Triggering unit)
- Set Caster_Position[44] = (Position of Casting_Unit[44])
- Set Unit_Group[44] = (Units in (Entire map))
- Unit Group - Pick every unit in Unit_Group[44] and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to False) and (((Picked unit) has buff Riverflow ) Equal to True)
- Then - Actions
- Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Move (Picked unit) instantly to Caster_Position[44]
- Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to True) and (((Picked unit) has buff Riverflow ) Equal to True)
- Then - Actions
- Set Caster_Target_Position[44] = (Position of (Picked unit))
- Special Effect - Create a special effect at Caster_Target_Position[44] using Abilities\Spells\Items\AIta\CrystalBallCaster.mdl
- Set Special_Effect[44] = (Last created special effect)
- Unit - Pause (Picked unit)
- Wait 5.00 seconds
- Special Effect - Destroy Special_Effect[44]
- Unit - Unpause (Picked unit)
- Custom script: call RemoveLocation (udg_Caster_Target_Position[44])
- Else - Actions
- Do nothing
- If - Conditions
- -------- ----------------------------------------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to False) and (((Picked unit) has buff Drought/Rain ) Equal to True)
- Then - Actions
- Set Caster_Target_Health[44] = (Life of (Picked unit))
- Unit - Set life of (Picked unit) to (Caster_Target_Health[44] + 100.00)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to True) and (((Picked unit) has buff Drought/Rain ) Equal to True)
- Then - Actions
- Special Effect - Create a special effect attached to the overhead of (Picked unit) using Objects\Spawnmodels\Orc\Orcblood\BattrollBlood.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Cause Casting_Unit[44] to damage (Picked unit), dealing 100.00 damage of attack type Hero and damage type Normal
- Else - Actions
- Do nothing
- If - Conditions
- -------- ----------------------------------------------------------------------------------------- --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to False) and (((Picked unit) has buff Low/High Tides ) Equal to True)
- Then - Actions
- Set Caster_Target_Mana[44] = (Mana of (Picked unit))
- Unit - Set mana of (Picked unit) to (Caster_Target_Mana[44] + 50.00)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (((Picked unit) belongs to an enemy of (Owner of Casting_Unit[44])) Equal to True) and (((Picked unit) has buff Low/High Tides ) Equal to True)
- Then - Actions
- Set Caster_Target_Mana[44] = (Mana of (Picked unit))
- Unit - Set mana of (Picked unit) to (Caster_Target_Mana[44] - 50.00)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events