• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hero Level Multiple

Status
Not open for further replies.
Level 2
Joined
Jul 1, 2020
Messages
8
Hi all i new and i working in a map but i have a problem that I can't find a solution anywhere else
i can't find a solution anywhere else
i tried to do somethig with the level of heroes but i dont find the way
my idea is about a gain level and get something
but my idea is that the hero obtain the item when the level gained is multiple of 2 and that it always happens, for example at level 2, level 4, level 6, etc.

thanks for your help.
 
hey,

there are probably better ways to go about it, but this works:

  • even levels
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • Set Integer = 0
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Integer = (Integer + 1)
          • Set EvenLevels = (Integer x 2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Triggering unit)) Equal to EvenLevels
            • Then - Actions
              • Hero - Create Cheese and give it to (Triggering unit)
            • Else - Actions
right now this will work till level 20. If you need more than that, just switch the number 10, with half of your max level.

(both of the variables here are of type "integer")
 
Status
Not open for further replies.
Back
Top