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

Help me with this?

Status
Not open for further replies.
Level 4
Joined
Jan 8, 2009
Messages
68
i Want to create an owl that drains the mana out from every unit in a radius, including the caster. i tought i culd make it on my own but apperantly it doesnt work...:sad:

can someone help me get this right?


  • mana owl
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Mana Owl (Level 1)
      • (Unit-type of (Entering unit)) Equal to Mana Owl (Level 2)
      • (Unit-type of (Entering unit)) Equal to Mana Owl (Level 3)
    • Actions
      • Set manaowl = (Entering unit)
      • Unit Group - Add manaowl to manaowltargets
      • Trigger - Turn on Mana owl 2 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • manaowl Equal to (Dying unit)
        • Then - Actions
          • Trigger - Turn off Mana owl 2 <gen>
        • Else - Actions
________________________________________________
  • Mana owl 2
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in manaowltargets and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 100.00)
          • Special Effect - Create a special effect at (Center of TempLoc) using Abilities\Spells\Other\Drain\ManaDrainCaster.mdl
          • Unit - Set mana of manaowl to ((Mana of manaowl) + 100.00)
          • Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\Drain\ManaDrainTarget.mdl

Edit.
okey, i have made some changes. still not working tho.
 
Last edited:
Level 18
Joined
Mar 13, 2009
Messages
1,411
Your condition for the first trigger got a problem.
You need to put all the 3 conditions inside the Or - Any (Conditions) are true
I also suggest using a Unit-Type Comparison instead of random units.

I would've done some fixing and memory leak removal if I had Warcraft 3 on this notebook :<

Also the spell isn't MUI since everytime a new owl will be summoned the point changes



EDIT
This still doesn't give the owl the mana and I can't remember all actions without having the WorldEditor with me D:

You could have a look at a spell I made to make a unit drain gold (could be adjusted to drain mana)

Moment link coming: http://www.hiveworkshop.com/forums/1180530-post8.html

Check my Alchemist's Stone spell
It could be usefull, but it uses a heal on itself everytime to do the draining (so you would need negative health regen on the owl) :p

Really sorry, but I need my World Editor and then I would do this for you fully triggered :C
 
Last edited:
Level 18
Joined
Mar 13, 2009
Messages
1,411
Oh eh Arnadath is right

You don't really need the first trigger if you just select all owls every 1.00 seconds

It would just be nice if you had a trigger to turn off and on the timed trigger

Like:
Unit Enters Playable Area

Or-
Unit = Owl Level 1
'' Level 2
'' Level 3

Turn on [Your timed trigger]

And on the second trigger:
Create a group for all owls of level 1 2 and 3
If the number of units in the group = 0
Turn of this trigger
Else do what's needed. (pick all units in the group and do the draining)

And don't forget memory leaks.
 
Level 6
Joined
Mar 22, 2009
Messages
276
Ungerbla you haven't added the target units into the manaowltargets group.
That's why it doesn't affect the other units just the owl itself.
 
Status
Not open for further replies.
Top