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

MUI Mana Drain Spam?

Status
Not open for further replies.
Level 6
Joined
Aug 12, 2007
Messages
201
I'm trying to get a mana drain tower to work properly and so far I have it mostly smooth except I am having trouble transfering the mana from the dummy to the tower itself.

  • DrainDummy
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Mana Drain (Curse)
      • ((Attacked unit) has buff Cripple) Equal to False
    • Actions
      • Set ManadrainLoc = (Position of (Triggering unit))
      • Unit - Create 1 ManaDrainDummy for (Owner of (Triggering unit)) at ManadrainLoc facing Default building facing degrees
      • Unit - Order (Last created unit) to Human Blood Mage - Siphon Mana (Target unit of ability being cast)
      • Unit Group - Add (Last created unit) to ManaDrainDummies
      • Unit Group - Pick every unit in ManaDrainDummies and do (Actions)
        • Loop - Actions
          • Trigger - Add to GiveManaBeam <gen> the event (Unit - (Picked unit)'s mana becomes Greater than or equal to 10.00)
  • GiveManaBeam
    • Events
    • Conditions
    • Actions
      • Set ManadrainLoc = (Position of (Triggering unit))
      • Unit Group - Pick every unit in (Units within 32.00 of ManadrainLoc) 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 Mana Drain Tower
            • Then - Actions
              • Unit - Set mana of (Picked unit) to ((Mana of (Triggering unit)) + (Mana of (Picked unit)))
            • Else - Actions
The first part of the triggers works pretty sound, except at the very end where it does the pick and loop, and the second part that Is supposed to give the mana to the tower doesn't function at all. Not sure how to fix this and keep it MUI.

Also I left out the leak cleanup triggers here because they just clutter it up. Once I have it working I'll add those back in.
 
Level 2
Joined
Nov 16, 2008
Messages
24
Whoops scrap that, didnt see that add event...

Do the dummies have mana?

Perhaps instead of:
  • ((Attacked unit) has buff Cripple) Equal to False
This?
  • ((Target unit of ability being cast) has buff Cripple) Equal to False
 
Level 6
Joined
Aug 12, 2007
Messages
201
  • Trigger - Add to GiveManaBeam <gen> the event (Unit - (Picked unit)'s mana becomes Greater than or equal to 10.00)
Its at the end of the first trigger...

EDIT: I already said the first trigger fires fine. It's the second one that doesn't give the mana after the dummy drains it. Whoops I see what you mean there though, It was like that from before when it was based off of Attack and not an Ability. It didn't give the mana then either so fixing this sill has us a problem. Since the 'attacked unit' didn't have the buff it worked, even though there was no attacked unit.
 
Level 2
Joined
Nov 16, 2008
Messages
24
Just checking thorugh it....

(Units within 32.00 of ManadrainLoc)

  • The tower is within 32 of the location?
Other then that i have no clue...
 
Level 6
Joined
Aug 12, 2007
Messages
201
Better get your glasses checked, second line of the action:

  • Unit - Create 1 ManaDrainDummy for (Owner of (Triggering unit)) at ManadrainLoc facing Default building facing degrees
Like I said I know the first trigger is working because I've seen it siphon mana everything in range, its the giving it to the tower that does not function.
 
Level 6
Joined
Aug 12, 2007
Messages
201
...? The tower doesn't 'spawn' anywhere, it is built by peasants? How could I possibly be testing if this was working or not if I didn't have any towers?
 
Level 2
Joined
Nov 16, 2008
Messages
24
Well you can dispaly text to yourself to show you were the actual problem is within trig 2 i suggest, basically if the thired here doesnt appear the unit isnt chosen and such and if the first doesnt appear thier is serious trouble.

  • GiveManaBeam
  • Events
  • Conditions
  • Actions
    • Set ManadrainLoc = (Position of (Triggering unit))
    • HERE
    • Unit Group - Pick every unit in (Units within 32.00 of ManadrainLoc) and do (Actions)
    • Loop - Actions
      • HERE
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Picked unit)) Equal to Mana Drain Tower
        • Then - Actions
          • HERE
          • Unit - Set mana of (Picked unit) to ((Mana of (Triggering unit)) + (Mana of (Picked unit)))
        • Else - Actions
 
Level 7
Joined
Mar 8, 2009
Messages
360
I don't know why it's not working but you should also set dummy mana to 0 at the end of 2nd trigger. Or tower will recieve more mana than drained.

Only other things i think could be wrong are:
-dummy have mana pool < 10
-dummy dies (negative regen?) before it can reach 10 mana
-dummy isn't added to group for unknown reason
 
Status
Not open for further replies.
Top