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

Triggering Experience

Status
Not open for further replies.
Level 8
Joined
Feb 23, 2020
Messages
255
Hello, i want to make a trigger that increases the expierence gain for every 10th level

  • Experience Award
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Hero - Add 30 experience to (Picked unit), Show level-up graphics
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 10
            • Then - Actions
              • Hero - Add 100 experience to (Picked unit), Show level-up graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 20
            • Then - Actions
              • Hero - Add 140 experience to (Picked unit), Show level-up graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 30
            • Then - Actions
              • Hero - Add 200 experience to (Picked unit), Show level-up graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 40
            • Then - Actions
              • Hero - Add 260 experience to (Picked unit), Show level-up graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 50
            • Then - Actions
              • Hero - Add 320 experience to (Picked unit), Show level-up graphics
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Hero level of (Picked unit)) Equal to 60
            • Then - Actions
              • Hero - Add 400 experience to (Picked unit), Show level-up graphics
            • Else - Actions
This trigger seems to only work at the specific hero levels, how do i fix this?
Hope i'm being clear enough for you to understand my point :P
 
The conditions, input greater than or equal to and less than comparisons
to make it work with certain levels only;

  • (Hero level of (Picked unit)) Greater than or equal to 10
  • (Hero level of (Picked unit)) Less than 20
  • (Hero level of (Picked unit)) Greater than or equal to 20
  • (Hero level of (Picked unit)) Less than 30
  • (Hero level of (Picked unit)) Greater than or equal to 30
  • (Hero level of (Picked unit)) Less than 40
  • (Hero level of (Picked unit)) Greater than or equal to 40
  • (Hero level of (Picked unit)) Less than 50
  • (Hero level of (Picked unit)) Greater than or equal to 50
I hope that's clear enough for you to understand too :)
 
The conditions, input greater than or equal to and less than comparisons
to make it work with certain levels only;

  • (Hero level of (Picked unit)) Greater than or equal to 10
  • (Hero level of (Picked unit)) Less than 20
  • (Hero level of (Picked unit)) Greater than or equal to 20
  • (Hero level of (Picked unit)) Less than 30
  • (Hero level of (Picked unit)) Greater than or equal to 30
  • (Hero level of (Picked unit)) Less than 40
  • (Hero level of (Picked unit)) Greater than or equal to 40
  • (Hero level of (Picked unit)) Less than 50
  • (Hero level of (Picked unit)) Greater than or equal to 50
I hope that's clear enough for you to understand too :)

Ah yes man, that was quite obvious lol, thank you very much mate! :)
 
200 is (default) amount of expirience required to reach lvl 2.
777, 100000 and any you like are amount required for lvl 3, lvl 4 etc.

So if i want 100 levels possible, i'd have to create 100 of those numbers? Seems a bit slow
 
Hello there.
yes @Deserted 's approach is the right one.

For information, on the conditions earlier, it could have been done much easier with a single modulo calculation.

Something like
  • test
    • Events
      • Unit - A unit owned by Player 12 (Brown) Dies
    • Conditions
      • ((Killing unit) is A Hero) Equal to True
    • Actions
      • Hero - Add (20 + (60 x ((Hero level of (Killing unit)) mod 10))) experience to (Killing unit), Show level-up graphics
I know it's not the best method for this specific problem, but I just wanted to point this to help you for future situations like this one.
 
So if i want 100 levels possible, i'd have to create 100 of those numbers? Seems a bit slow
It's not really slow compared to 10 If statements. It's more flexible and user-friendly as well.

Also, there are options to set all the values at once, but to use them one should get acknowledged with mathematical concepts like recursion and fibonacci numbers.
 
Status
Not open for further replies.
Back
Top