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

Problem with a special manaaura

Status
Not open for further replies.
Level 5
Joined
Feb 6, 2009
Messages
96
hi everybody i wanted to do for my map a special aura for my mage.
Allways when a allied units uses a spell and is in range of 300 of the mage he gets 2% of his mana back can someone help me with this? :D
 
Level 7
Joined
Nov 19, 2007
Messages
253
I have similar ability in my map it looks like this
  • Meditation Aura
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • ((Casting unit) has buff Meditation Aura 1) Equal to True
          • ((Casting unit) has buff Meditation Aura 2) Equal to True
          • ((Casting unit) has buff Meditation Aura 3) Equal to True
          • ((Casting unit) has buff Meditation Aura 4) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Meditation Aura 1) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 5
            • Then - Actions
              • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.20))
              • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Meditation Aura 2) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 10
            • Then - Actions
              • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.20))
              • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Meditation Aura 3) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 15
            • Then - Actions
              • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.20))
              • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Casting unit) has buff Meditation Aura 4) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 20
            • Then - Actions
              • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.20))
              • Special Effect - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
You need to remove all if then else set condition to
  • ((Casting unit) has buff Your Aura ) Equal to True
and action to
  • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + ((Max mana of (Casting unit)) x 0.02))
 
Your aura will obviously have a buff, right?
Then do this easy thing:
  • Trigger
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • ((Triggering unit) has Aura Buff) Equal to True //Boolean comparison, Unit - Unit has specific buff
  • Actions
    • Unit - Set mana of (Triggering unit) to ((Percentage mana of (Triggering unit)) + 2)%
 
Level 5
Joined
Feb 6, 2009
Messages
96
yeah but i dont want that the casting unit gets the mana the unit with the aura has to become the aura... and no i didnt want to use a buff with it... because they dont stack and i need the other auras thats my problem^^
 
Level 5
Joined
Feb 6, 2009
Messages
96
you have an hero who has the manaaura (mana meditation) and always when a allied unit who is in range of 300 of your hero with this aura casts a spell th OWNER of the mana meditation aura! gets 2% of his mana back
 
Here:
  • One
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Level of Bash for (Triggering unit)) Equal to 0
    • Actions
      • Set Point1 = (Position of (Triggering unit))
      • Set HeroDetector = (Units within 300.00 of Point1 matching ((Level of Bash for (Matching unit)) Greater than 0))
      • Wait 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in HeroDetector) Greater than 0
        • Then - Actions
          • Set ManaBonus = ((Mana of (Triggering unit)) + (((Max mana of (Triggering unit)) x 0.02) x (Real((Number of units in HeroDetector)))))
          • Unit - Set mana of (Triggering unit) to ManaBonus
          • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_Point1)
      • Custom script: call DestroyGroup (udg_HeroDetector)
Replace "Bash" ability with your ability; it was made for testing purposes.
The condition is there, so that it doesn't heal the mana of the hero that bears the ability.
It uses a wait of 0.00 seconds, so that the mana is counted after the mana cost of the spell.
It is made, so that it stacks with other auras; the more units with this passive skill, the higher mana you receive, each of them adding an extra 2%.
 
But that isn't what you wanted... With Pharaoh's trigger, the casting unit is the unit that gets mana...

Allways when a allied units uses a spell and is in range of 300 of the mage he gets 2% of his mana back can someone help me with this? :D

Well, he says when an allied unit casts a spell and is within 300 range of the hero that bears the aura ability, he will get 2% (of max mana, I guessed here) mana replenished. This is what I did. :)
 
Can I ask why you used
empty.gif
join.gif
zzz.gif
Wait 0.00 seconds
 
Level 7
Joined
Jul 18, 2009
Messages
272
Well, he says when an allied unit casts a spell and is within 300 range of the hero that bears the aura ability, he will get 2% (of max mana, I guessed here) mana replenished. This is what I did. :)
That's what he wrote later:
you have an hero who has the manaaura (mana meditation) and always when a allied unit who is in range of 300 of your hero with this aura casts a spell th OWNER of the mana meditation aura! gets 2% of his mana back
He wants the unit with the aura-ability to gain mana whenever an unit with the aura-buff casts a spell.
The "he" in the post you quoted refers to the mage who has the ability.
 
Level 5
Joined
Feb 6, 2009
Messages
96
well its true, i ment what meome ment^^ so for example you have two units jaina and thrall^^ jaina has the meditation aura!... when thrall casts a spell and is in 300 range of Jaina! JAINA gets 2% of her mana...

so your ability worked but wasnt really what i wanted... i just noticed^^

i hope i could make myself a little clear^^
sry for my bad english ;)
 
Well, you should correct me :p
meOme, good job ^^

Here is the trigger, as it should be:
  • One
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Set Point1 = (Position of (Triggering unit))
      • Set HeroesDetector = (Units within 300.00 of Point1 matching ((Level of Bash for (Matching unit)) Greater than 0))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in HeroesDetector) Not equal to 0
        • Then - Actions
          • Unit Group - Pick every unit in HeroesDetector and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Triggering unit) Not equal to (Picked unit)
                • Then - Actions
                  • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + (0.02 x (Max mana of (Picked unit))))
                  • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Items\AIma\AImaTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
        • Else - Actions
      • Custom script: call DestroyGroup (udg_HeroesDetector)
      • Custom script: call RemoveLocation (udg_Point1)
 
Status
Not open for further replies.
Top