Triggering Experience

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

ytzi
Newcomer
Posts: 1
Joined: August 5th, 2007, 10:07 pm

Triggering Experience

Post by ytzi »

How do you set the experience gain to a trigger? For example, a unit dies and all heroes within 1500 range of the dying unit gain 3 experience.
User avatar
Syre
Forum Staff
Posts: 506
Joined: November 17th, 2008, 3:49 pm

Re: Triggering Experience

Post by Syre »

Alright, im not sure if this is going to work..as ive really never done anything like this before..just taking a guess..but something like...

Code: Select all

Actions
    Set Player = (All players controlled by a User player)
    Player Group - Pick every player in Player and do (Hero - Make (Picked player) Heroes gain 0.00% experience from future kills)
Put this under your initialization trigger

And then create a new trigger.

Code: Select all

Melee Initialization
    Events
        Unit - A unit Dies
    Conditions
        ((Killing unit) is A Hero) Equal to True
        ((Killing unit) belongs to an ally of Player 1 (Red)) Equal to True
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Dying unit)) Equal to Footman
            Then - Actions
                Unit Group - Pick every unit in (Units within 1500.00 of (Position of (Killing unit)) matching (((Owner of (Killing unit)) is an ally of Player 1 (Red)) Equal to True)) and do (Hero - Add 3 experience to (Picked unit), Show level-up graphics)
            Else - Actions
                Do nothing
Try it out, if it doesnt work, report back and ill try a different way...i just couldent find any good info on the subject so at the moment im not sure which direction im supposed to head with this.

Edit : You can still try that out..however somehow i feel like im completely wrong..lol take a look at this..http://www.hiveworkshop.com/forums/spel ... t%26r%3D20
Image