• 🏆 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!

Need help making a spell MUI/cleaning leaks

Status
Not open for further replies.

DKG

DKG

Level 3
Joined
Jan 29, 2008
Messages
54
  • Initial Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Time Lapse
    • Actions
      • Set TimeLapseCaster[0] = (Triggering unit)
      • Unit - Add Cast that shit to (Triggering unit)
      • Unit - Remove Time Lapse from (Triggering unit)
      • Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Owner of (Triggering unit))
            • Then - Actions
              • Unit Group - Add (Picked unit) to UnitsToMove[0]
            • Else - Actions
      • Unit Group - Pick every unit in UnitsToMove[0] and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the origin of (Picked unit) using Time Rune.mdx
          • Set SpecialEffect[Counter] = (Last created special effect)
          • Set unit[Counter] = (Picked unit)
          • Set pos[Counter] = (Position of (Picked unit))
          • Set HP[Counter] = (Percentage life of (Picked unit))
          • Set MP[Counter] = (Percentage mana of (Picked unit))
          • Set Counter = (Counter + 1)
      • Set Counter = 0
      • Trigger - Turn on Mana Adjustment <gen>
  • Mana Adjustment
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Set mana of TimeLapseCaster[0] to ((Mana of TimeLapseCaster[0]) - 10.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of TimeLapseCaster[0]) Less than or equal to 30.00
        • Then - Actions
          • Unit Group - Pick every unit in UnitsToMove[0] and do (Actions)
            • Loop - Actions
              • Special Effect - Destroy SpecialEffect[Counter2]
              • Set Counter2 = (Counter2 + 1)
              • Trigger - Turn off (This trigger)
        • Else - Actions
          • Do nothing
  • Final Cast
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Cast that shit
    • Actions
      • Unit Group - Pick every unit in UnitsToMove[0] and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to Time Mage
            • Then - Actions
              • Unit - Move unit[Counter2] instantly to pos[Counter2]
              • Unit - Set life of unit[Counter2] to HP[Counter2]%
              • Special Effect - Destroy SpecialEffect[Counter2]
              • Set Counter2 = (Counter2 + 1)
            • Else - Actions
              • Unit - Move unit[Counter2] instantly to pos[Counter2]
              • Unit - Set mana of unit[Counter2] to MP[Counter2]%
              • Unit - Set life of unit[Counter2] to HP[Counter2]%
              • Special Effect - Destroy SpecialEffect[Counter2]
              • Set Counter2 = (Counter2 + 1)
      • Unit - Add Time Lapse to TimeLapseCaster[0]
      • Unit - Remove Cast that shit from TimeLapseCaster[0]
      • Trigger - Turn off Mana Adjustment <gen>
      • Set Counter2 = 0
Hi guys, I really need help making this MUI, and possibly even jass. Basically, the caster (time Mage) places an AOE special effect, and adds all effected units to the movment group. The second trigger then turns on and he begins losing mana.

When the final ability is cast, all affected units, including himself, are restored to the position when they first received the effect, and their HP is restored (unless they have died) and the time mage does not receive restored mana (for obvious balance reasons).

Any help regarding how to make this MUI or even jass converting it would be wonderful.

Note: I'm aware its probably pretty inefficient and full of leaks, help with that would be hugely appreciated too.
 

DKG

DKG

Level 3
Joined
Jan 29, 2008
Messages
54
Uh, really? :(

What about if like, there were only a max of one time mage per player (which will be true).

Also, how hard would it be to convert to jass?
 

DKG

DKG

Level 3
Joined
Jan 29, 2008
Messages
54
I could try to scratch code it? Though my jass is pretty horrendous

I definitely only need it multi player instanceable, if that helps.
I found the real problem was needing a 2 dimensional array <_<
 
Status
Not open for further replies.
Top