• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Mana Wave as Healing Wave

Status
Not open for further replies.
Level 9
Joined
Dec 16, 2017
Messages
344
Hello guys, i want to make a mana chain heal like healing wave but for mana, i've found this tutorial, but seems like it can take only 2 targets, what is the issue with it? It is casted on the unit the spell is being casted on, and one more, instead of 4/6/8 like it is in tutorial (i haven't modified the mana burn to be mana "heal" yet, i will do that once i know how to fix the "spreading" of the chain)

\
  • Chain Mana Burn
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Mana Burn
    • Actions
      • Set MB_prev = (Triggering unit)
      • Set MB_targ = (Target unit of ability being cast)
      • Set MB_level = (Level of Unknown (A000) for MB_prev)
      • Set MB_targetsnum = (4 + (2 x (MB_level - 1)))
      • For each (Integer MB_cur) from 1 to MB_targetsnum, do (Actions)
        • Loop - Actions
          • Unit Group - Add MB_targ to MB_alltargs
          • -------- Effect Part --------
          • Set MB_TempPoint = (Position of MB_prev)
          • Unit - Create 1 Albatross for (Owner of (Triggering unit)) at MB_TempPoint facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_MB_TempPoint)
          • Animation - Change (Last created unit) flying height to 50.00 at 0.00
          • Unit - Hide (Last created unit)
          • Unit - Add Chain Mana Burn (EFFECT) to (Last created unit)
          • Unit - Order (Last created unit) to Night Elf Warden - Shadow Strike MB_targ
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • -------- Waiting part --------
          • Wait until (((MB_targ has buff Chain Mana Burn ) Equal to True) or ((MB_targ is dead) 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
              • (MB_targ is dead) Equal to False
            • Then - Actions
              • Set MB_TempPoint = (Position of MB_targ)
              • Unit - Create 1 Albatross for (Owner of (Triggering unit)) at MB_TempPoint facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_MB_TempPoint)
              • Unit - Hide (Last created unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Mana Burn (4 Chain Spell) to (Last created unit)
              • Unit - Set level of Mana Burn (4 Chain Spell) for (Last created unit) to ((8 x (MB_level - 1)) + MB_cur)
              • Unit - Order (Last created unit) to Night Elf Demon Hunter - Mana Burn MB_targ
            • Else - Actions
              • Set MB_cur = (MB_targetsnum + 1)
          • -------- Choice Part --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MB_cur Less than MB_targetsnum
            • Then - Actions
              • Set MB_prev = MB_targ
              • Set MB_SMax = -1.00
              • Set MB_TempPoint = (Position of MB_prev)
              • Set MB_TmpGroup = (Units within 500.00 of MB_TempPoint)
              • Unit Group - Pick every unit in MB_TmpGroup 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 True
                      • ((Picked unit) is dead) Equal to False
                      • ((Picked unit) is in MB_alltargs) Equal to False
                      • (Max mana of (Picked unit)) Greater than 0.00
                      • MB_SMax Less than (Mana of (Picked unit))
                    • Then - Actions
                      • Set MB_targ = (Picked unit)
                      • Set MB_SMax = (Mana of (Picked unit))
                    • Else - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_MB_TempPoint)
          • Custom script: call DestroyGroup(udg_MB_TmpGroup)
      • Unit Group - Remove all units from MB_alltargs
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,557
Waits are almost always a sign of a bad system. I would use something like this:
 
Status
Not open for further replies.
Top