• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Experience sharing

Status
Not open for further replies.
Level 3
Joined
Jun 12, 2009
Messages
38
Okay, I guess I'll have to make a thread about this as I couldn't make it at all..
Basically I need experience gained by one hero to be added to another one (so they'll both share experience outside the maximum range). The situation is with "one" hero separated in two, which are quite different (but that doesn't matter I guess).
If I have to give you an example with a popular map which has something similar - Meepo, the Geomancer's ability Divided we Stand from DotA. Each of the Meepo's clones shares experience with the rest. However I do not need an ability as my second (and only one) hero is created at the pick of the actual hero (so when you pick her you receive them both), so I need only the experience sharing between them two, but I'm unable to trigger it -_-'
Any ideas? ^^
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
So you're talking more like a Mirror Image?

With some kind of Good/Evil sides?

And you want them to gain equal experience, regardless of their position in the map?

Trying to get everything straight.
 
Level 3
Joined
Jun 12, 2009
Messages
38
Yes, I need them to gain equal experience, regardless of their position in the map and no, they are not mirror images or something. They are two different heroes (just you receive them both upon picking one).
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Oh, I see. So it's something like, you pick the Demon Hunter

And you get the Demon Hunter and a Blademaster for picking that hero?
 
Here I tested it, it worked fine!
  • xx
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Hero[1] = Paladin 0000 <gen>
      • Set Hero[2] = Paladin 0001 <gen>
      • Set Hero[3] = Paladin 0002 <gen>
      • Set Hero[4] = Paladin 0003 <gen>
  • xxxx
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set Exp[(Integer A)] = (Hero experience of Hero[(Integer A)])
      • Set Exp[5] = (Max(Exp[1], Exp[2]))
      • Set Exp[6] = (Max(Exp[3], Exp[4]))
      • Set Exp[7] = (Max(Exp[5], Exp[6]))
      • For each (Integer A) from 1 to 4, do (Actions)
        • Loop - Actions
          • Hero - Set Hero[(Integer A)] experience to Exp[7], Show level-up graphics
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Darn, Kobas beat me to it. I was trying to figure out which math functions to use for that!
 
Status
Not open for further replies.
Top