Experience rate for one hero

Dasslokk

New Member
Reaction score
9
How can I set a custom experience rate for only one of 2 or more heroes owned by a player?

I want it to look a little something like this:
Trigger:
  • xp rate
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Entering unit)) Equal to Timekiller
    • Actions
      • Hero - Make (Entering unit) gain 150.00% experience from future kills
 

Exide

I am amazingly focused right now!
Reaction score
448
Unless you have several heroes on each player, this will work:

Trigger:
  • Hero - Make (Owner of (Triggering unit)) Heroes gain 150.00% experience from future kills


If you DO have several heroes per player you'll need a lot of triggering, I'm afraid.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
It can be done, give me some time to make up a decent trigger, I'll come back with it

Alright:
Trigger:
  • ExpAdd
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PreviousEXP[(Integer A)] Less than (Hero experience of YourHero[(Integer A)])
            • Then - Actions
              • Hero - Add (((Hero experience of YourHero[(Integer A)]) - PreviousEXP[(Integer A)]) x (Integer(EXPrate[(Integer A)]))) experience to YourHero[(Integer A)], Hide level-up graphics
              • Set PreviousEXP[(Integer A)] = (Hero experience of YourHero[(Integer A)])
            • Else - Actions


Edit: might want more explanation:
PreviousEXP is an integer array with size 36 (you can change it to number of player * number of hero per player
EXPrate is a real array with size 36 (you can change it again), 1 being 100% exp rate
YourHero is a unit array with size 36 (changeable as well)

Now, can you do the rest or do you want me to show you how to properly set YourHero? :p
 

Exide

I am amazingly focused right now!
Reaction score
448
That was what i was afraid of :p

One simple way of doing it is to set every unit's exp rate to their point value. -Then you simply add exp via trigger to all units, and more to your special heroes.
However, that means you need to come up with how much exp each unit is worth.

A more advanced way of doing it is to calculate what level the killing unit is and what level the dying unit is, and then calculate how much exp the killing unit should get. Then again, you'll need to come up with how much exp each unit should be worth.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top