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

[Trigger] Need help with spell idea

Status
Not open for further replies.
Level 4
Joined
Jan 6, 2009
Messages
100
Trigger Spell: Spell that is actually a trigger

Im making a ability based off the 'Icy Veins' spell for the Mage class in WOW. It gives you X% of your mana back.

I know how to everything, except one little hitch:
It's a hero ability, and thus has several levels.

I know how to do this for a unit ability, but since its a hero ability, the mana amount gets bigger as you gain levels.

What im asking is: Is there any way to specify the level being cast?
  • Events
    • Unit - A unit Finishes casting an ability
  • Conditions
    • (Ability being cast) Equal to Icy Veins
  • Actions
    • Unit - Set mana of (Triggering unit) to 10.00%
This is what i have so far.
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
You can do it with "if"
so one if for every level:

  • waaaa
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Level of (Ability being cast) for (Triggering unit)) equals 1
        • 'THEN'-Actions
        • 'ELSE'-Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Conditions
              • (Level of (Ability being cast) for (Triggering unit)) equals 2
            • 'THEN'-Actions
            • 'ELSE'-Actions

OR you can just do:

  • waaaa
    • Events
    • Conditions
    • Actions
      • Unit - Set mana of (Triggering unit) to (10.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))%
 
Status
Not open for further replies.
Top