Stopping Heroes from giving exp

neckcuttabob

Member
Reaction score
3
I'm making a map and for it I need heroes to gain exp from killing the computers monsters but not from killing other heroes. I figured it was somewhere either in object data or game play constants but I haven't found it if its there. Anyone know how to do that?
 
F

FViral

Guest
There isn't a clear cut boolean or constant you can change that I am aware of, sounds like you'll have to use some triggers.

Perhaps you can make the heroes unable to attack each other?

Or if they must be able to attack each other, try engineering a trigger that detects when two heroes are fighting, then disable experience gain (using the Hero - Disable/Enable Experience Gain) for both those heroes until one emerges victorious, then enable experience gain again.
 
Reaction score
333
It is somewhere under Advanced > Gameplay Constants.

Find a value named "Experience - Hero Table" (or something similar) and set everything in it to 0.
 

Ryuu

I am back with Chocolate (:
Reaction score
64
>try engineering a trigger that detects when two heroes are fighting, then disable experience gain (using the Hero - Disable/Enable Experience Gain)

That wouldn't work lol, if one guy escapes the trigger is still firing.
Code:
Disable Experience From Hero
    Events
        Unit - A unit Is attacked
    Conditions
        And - Conditions
            ((Attacking Unit) is a Hero) Equal to True
            ((Attacked Unit) is a Hero) Equal to True
            (Attacking Unit) Not equal to No unit
            (Attacked Unit) Not equal to No unit
    Actions
        Set unitGrp = (All units in (Playable map area) matching (((Matching unit) Equal to (Attacking Unit)) or ((Matching unit Equal to (Attacked Unit)))
        Unit Group - Pick every unit in unitGrp and do (Actions)
            Loop - Actions
                Hero - Disable Experience Gain for (Picked unit)
        Custom script:   call DestroyGroup( udg_unitGrp )

^Hand-written, my computer that can use applications crashed =.= the computer I'm using now can only use small-sized applications (altho lag) and internet surfing =[
 
F

FViral

Guest
>try engineering a trigger that detects when two heroes are fighting, then disable experience gain (using the Hero - Disable/Enable Experience Gain)

That wouldn't work lol, if one guy escapes the trigger is still firing.

I guess i wasn't that clear in my post. I'd make a countdown timer, for say 5 seconds. Whenever a unit is in combat with another hero, start the timer and disable experience gain. When it expires, enable experience gain. Basically, if two heroes are "in combat" with each other, they have 5 seconds after their battle of no experience, kinda like an experience cool down.

The map I'm making now shows the status of all heroes on a multiboard, I more or less the above idea to show a "combat" string for the status when a player takes damage.
 
General chit-chat
Help Users

      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