P
Pawnable
Guest
Helped me a LOT!!!!
Thanks.
Thanks.
somael said:You didn't introduce the smax, temppoint or tempgroup variables at all.. it was very confusing(and it still is) :S
Daelin said:In order to understand this tutorial you need basic knowledge about Gui/manipulating the trigger editor.
HealingWaveMana
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Mana Healing Wave
Actions
Set MHW_prev = (Triggering unit)
Set MHW_target = (Target unit of ability being cast)
Set MHW_level = (Level of (Ability being cast) for MHW_prev)
Set MHW_targetsnum = (4 + (2 x (MHW_level - 1)))
For each (Integer A) from 1 to MHW_targetsnum, do (Actions)
Loop - Actions
Unit Group - Add MHW_target to MHW_alltargs
-------- Effect Part --------
Set MHW_temppoint = (Position of MHW_prev)
Unit - Create 1 Albatross for (Owner of MHW_prev) at MHW_temppoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_MHW_temppoint)
Animation - Change (Triggering unit) flying height to 50.00 at 0.00
Unit - Hide (Last created unit)
Unit - Add Mana Healing Wave (EFFECT) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike MHW_target
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
-------- Waiting part --------
Wait until ((MHW_target has buff Mana Healing Wave ) Equal to True), checking every 0.35 seconds
-------- Spell part --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MHW_target is dead) Equal to False
Then - Actions
Set MHW_temppoint = (Position of MHW_target)
Unit - Create 1 Albatross for (Owner of (Triggering unit)) at MHW_temppoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_MHW_temppoint)
Unit - Hide (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Healing Wave Mana (4 Chain Spell) to (Last created unit)
Unit - Set level of Mana Burn (4 Chain Spell) for (Last created unit) to ((8 x (MHW_level - 1)) + MB_cur)
Unit - Order (Last created unit) to Night Elf Druid Of The Claw - Rejuvenation MHW_target
Else - Actions
Set MHW_cur = (MHW_targetsnum + 1)
-------- Choice Part --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MHW_cur Less than MHW_targetsnum
Then - Actions
Set MHW_prev = MHW_target
Set MHW_SMax = -1.00
Set MHW_temppoint = (Position of MHW_prev)
Unit Group - Pick every unit in (Units within 500.00 of (Position of MHW_prev)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) is Mechanical) Equal to False
((Picked unit) is Magic Immune) Equal to False
((Picked unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to False
((Picked unit) is dead) Equal to False
((Picked unit) is in MB_alltargs) Equal to False
(Mana of (Picked unit)) Less than (Max mana of (Picked unit))
MB_SMax Greater than (Mana of (Picked unit))
Then - Actions
Set MHW_target = (Picked unit)
Set MHW_SMax = (Mana of (Picked unit))
Else - Actions
Else - Actions
Custom script: call RemoveLocation(udg_MHW_temppoint)
Unit Group - Remove all units from MHW_alltargs
For Each Integer A from 1 to X... loop
For Each Custom Integer Variable from 1 to X do
ChainManaBurn
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to ChainManaBurn
Actions
Set prev = (Triggering unit)
Set Targ = (Target unit of ability being cast)
Set Level = (Level of ChainManaBurn for prev)
Set targetsnum = (4 + (2 x (Level - 1)))
For each (Integer Cur) from 1 to targetsnum, do (Actions)
Loop - Actions
Unit Group - Add Targ to Alltargs
Set TempPoint = (Position of prev)
Unit - Create 1 DummyCMB for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_TempPoint)
Unit - Hide (Last created unit)
Animation - Change (Last created unit) flying height to 50.00 at 0.00
Unit - Add Buff Dummy to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike Targ
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Wait until ((((Triggering unit) has buff Mana Burn ) Equal to True) or (((Triggering unit) is dead) Equal to True)), checking every 0.10 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Targ is dead) Equal to False
Then - Actions
Set TempPoint = (Position of Targ)
Unit - Create 1 DummyCMB for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
Custom script: call RemoveLocation(udg_TempPoint)
Unit - Hide (Last created unit)
Animation - Change (Last created unit) flying height to 100.00 at 0.00
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Chain Mana Burn Dummy to (Last created unit)
Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn Targ
Else - Actions
Set Cur = (targetsnum + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Cur Less than targetsnum
Then - Actions
Set prev = Targ
Set SMax = -1.00
Set TempPoint = (Position of prev)
Set TempGroup = (Units within 600.00 of TempPoint)
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A structure) Equal to False
((Picked unit) is Mechanical) Equal to False
((Triggering unit) is Magic Immune) Equal to False
((Picked unit) belongs to an enemy of (Owner of prev)) Equal to True
((Picked unit) is dead) Equal to False
((Picked unit) is in Alltargs) Equal to False
(Max mana of (Picked unit)) Greater than 0.00
SMax Less than (Mana of (Picked unit))
Then - Actions
Set Targ = (Picked unit)
Set SMax = (Mana of (Picked unit))
Else - Actions
Else - Actions
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: call DestroyGroup(udg_TempGroup)
Unit Group - Remove all units from Alltargs
Wait until (((Targ has buff Mana Burn ) Equal to True) or ((Targ is dead) Equal to True)), checking every 0.10 seconds