• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Set level limit for spell that have many levels

Status
Not open for further replies.
Level 3
Joined
Jun 17, 2015
Messages
56
[SOLVED] Set level limit for spell that have many levels

Tooltips:
Stun and deal 50 (+souls) damage to the target. Limit 5/10/15/20 souls.

Everytime an enemy unit dies around you, get 1 soul (each soul +10 stun damage and 0.2s stun)

Of course this is 31 levels of "storm bolt"

here are my triggers:

  • Soul Blast Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to (==) Soul Blast
    • Actions
      • Set SoulBlast_User = (Learning Hero)
      • Set SoulBlastStun = 1
      • Unit - Add Soul Blast [Stun] to (Learning Hero)
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Soul Blast Limit <gen>
  • Soul Blast Limit
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A structure) Not equal to (!=) True
      • ((Dying unit) belongs to an enemy of (Owner of SoulBlast_User)) Equal to (==) True
    • Actions
      • Set SoulBlast_Die = (Position of (Dying unit))
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • SoulBlastStun Less than (<) (1 + (5 x (Level of Soul Blast for SoulBlast_User)))
          • Then - Actions
            • Set AAGroup = (Units within 600.00 of SoulBlast_Die matching ((Matching unit) Equal to (==) SoulBlast_User))
            • Unit Group - Pick every unit in AAGroup and do (Actions)
              • Loop - Actions
                • Set SoulBlastStun = (SoulBlastStun + 1)
                • Unit - Set level of Soul Blast [Stun] for SoulBlast_User to SoulBlastStun
          • Else - Actions
      • Custom script: call DestroyGroup( udg_AAGroup )
      • Custom script: call RemoveLocation(udg_SoulBlast_Die)
  • Soul Blast After Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to (==) Soul Blast [Stun]
    • Actions
      • Set SoulBlastStun = ((SoulBlastStun / 2) + 1)
      • Unit - Set level of Soul Blast [Stun] for SoulBlast_User to SoulBlastStun
 
Last edited:
Also use one ability to stun a unit.
This ability may have a few hundred levels depending on how accurate you want it to be or you use the mass teleport ability to stun the units instead which basically means more dummy units (that cast the stun) but only one ability level (no additional loading time and 100% accuracy).
 
Yes, i use "Attribute Bonus" as dummy spell, after hero learnt it will dissapear, then add the 31 lvls stun to the hero

as i set the limit, sometime it stopped as 7 when the limit is 10 kills, dunno whats the problem
 
The tooltip will not updated when in view, make sure to refresh it on screen be moving the cursor off and on the command card button.

Instead of...
  • Unit - Increase level of Soul Blast [Stun] for SoulBlast_User
Try...
  • Unit - Set level of Soul Blast [Stun] for SoulBlast_User to (SoulBlastStun)
This should make sure the trigger logic is always consistent and reduce the chance of any error.
 
Status
Not open for further replies.
Back
Top