Avoid Experience Gain of Heroes?

Razed

New Member
Reaction score
44
I'm creating an adventure map. You can be with 1, 2, 3 or 4 players at a time. But the thing is, I want that when you are with 4 Player you gain as much XP per kill per Hero as when with 1 Player. Is that possible? Please reply.

+rep for those correct answers out there :cool:
 

oorosco

New Member
Reaction score
23
Your welcome

Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) controller) Equal to User
                    Then - Actions
                        Set temp_int = (temp_int + 1)
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Hero - Make (Picked player) Heroes gain (Real(((100 / temp_int) + 1)))% experience from future kills
 

Razed

New Member
Reaction score
44
Hmm, I might use that if the suggestion I have in mind won't work.

Can't you just change something in Gameplay Constants? There is a lot about XP Gain, but I don't know exactly what to change. :eek:
 

Xenoche

Member
Reaction score
18
Would'nt that trigger cause heroes to gain less experience? 100/temp_int?

Also,
Code:
((Player((Integer A))) controller) Equal to User
would include user slots, even if there not playing.

Heres the code with the fixes that should work as specified:
Code:
Untitled Trigger 001
    Events
        Map initialization
    Conditions
    Actions
        For each (Integer A) from 1 to 4, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Player((Integer A))) controller) Equal to Is Playing
                    Then - Actions
                        Set temp_int = (temp_int + 1)
                    Else - Actions
        Player Group - Pick every player in (All players) and do (Actions)
            Loop - Actions
                Hero - Make (Picked player) Heroes gain (Real(((100 x temp_int) )))% experience from future kills
 

Xenoche

Member
Reaction score
18
He wants experience to be split, the above trigger would increase experience gain by 100% per player.

The only problem is, if a player leaves you will have to reset it, if a players hero dies you will have to reset it. That isn't to difficult just letting you know for reference.
 

oorosco

New Member
Reaction score
23
OOOOOPS i thought he wanted to lower it, lol that's what pulling an all nighter does to u -_-
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Another problem of what if all the heros aren't within the exp gain range?

You'd have to make exp global distributed. But thats not right if 1 or more ppl can sit in town and the rest venture alone, dieing tons, killing many.

Theres nothing you can really do about exp distribution without making something else wrong.
 

Razed

New Member
Reaction score
44
I just want to make it like this that all Heroes within XP Gain Range will gain the same amount of XP as they would when soloing those creeps, no matter how many Heroes there are.

2 Heroes will both gain the amount of XP they would normally get when soloing.
3 Heroes will all gain the amount of XP they would normally get when soloing...

Get the point? ^_^

So now if someone could make one clear answer on my question and I will be able to fix it.
 

Cidzero

Imma firin mah lazer!!!1!1
Reaction score
39
Code:
Exp
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        Set Temp_Point = (Position of (Attacked unit))
        Set UnitGroup = (Units within 1200.00 of Temp_Point matching (((Attacking unit) belongs to an enemy of (Owner of (Attacked unit))) Equal to True))
        Unit Group - Pick every unit in UnitGroup and do (Actions)
            Loop - Actions
                Hero - Make (Owner of (Picked unit)) Heroes gain (100.00 x (Real((Number of units in UnitGroup))))% experience from future kills
        Custom script:   call RemoveLocation(udg_Temp_Point)
        Custom script:   call DestroyGroup(udg_UnitGroup)

Now if this fails then the answer is: Not possible.
 

Xenoche

Member
Reaction score
18
Cidzero pretty much summed it up, theres no way to do it using the standard wc3 experience system without something being wrong.

I would suggest creating a customized experience system which picks heroes within range of a dying creep and add experience that way, so:

a) All heroes within range get the same experience and is customizable.
b) Heroes out of range don't get experience (unless you dont mind global distribution).

Of course that means you will have to reduce all xp gains under 'gameplay constraints' to 0.

EDIT: What he said :p
 

Razed

New Member
Reaction score
44
I copied the entire trigger... but for some reason I can't find this (the Bold sentence)

''(100.00 x (Real((Number of units in UnitGroup))))% experience from future kills''

Maybe explain me step by step how I will find it? ^^
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
convert integer to real
count units in unit group
Variable UnitGroup
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top