• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] How to Hero gain mana in melee attacks and spells?

Status
Not open for further replies.

calebelima00

Banned
Level 1
Joined
Sep 17, 2013
Messages
2
I want to create a skill that when my hero attack (auto attack) or when he uses specific skills, he wins mana every attack ... It may be in any unit and any building. Please respond and I thank.
 
Last edited by a moderator:
Level 13
Joined
Mar 24, 2013
Messages
1,105
Be sure NOT to double post, someone will answer when they have a moment.

  • Refund Mana (Spell Cast)
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Ability1ThatShouldRefundMana
    • Actions
      • Set TempUnit = (Triggering unit)
      • Set TempReal = 5.00 //Amount of Mana it should refund.
      • Unit - Set mana of TempUnit to ((Mana of TempUnit) + TempReal)
I don't recommend the Attacks Trigger as if you spam S, you'll get full mana very quickly. Use a DDS(Damage Detection System), you can search on here to find one.

  • Refund Mana (Attack)
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set TempUnit = (Attacking unit)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Unit-type of TempUnit) Equal to (==) YourUnitWhoGainsManaOnAttack
          • Then - Actions
            • Set TempReal = 5.00 // Amount to Refund
            • Unit - Set mana of TempUnit to ((Mana of TempUnit) + TempReal)
          • Else - Actions
 
Status
Not open for further replies.
Top