1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  4. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  5. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Giving xp to hero

Discussion in 'StarCraft II Modding' started by Bu113t, May 1, 2010.

  1. Bu113t

    Bu113t

    Joined:
    Mar 13, 2008
    Messages:
    223
    Resources:
    0
    Resources:
    0
    My hero is not getting xp if its not him that kills the unit,

    and I need a trigger that can give him xp, or make him get xp when he doesnt kill the unit.

    Anyone know how?
     
  2. P-Exodus

    P-Exodus

    Joined:
    Jan 29, 2008
    Messages:
    38
    Resources:
    2
    Maps:
    2
    Resources:
    2
    Well, even after going through all GUI functions and Galaxy natives I couldn't find a single function, that lets you add XP to a unit.
    I think this is pretty weird, considering the fact, that there are XPGain events, you can read out the event XP, the current XP and level of a unit. Why is a function missing that adds experience to a unit? I just can't get it into my head.

    Unless somebody knows, how it's done. I already know, that some people played with the thought to let the unit in question kill another units via trigger, which gives just the wanted XP, but that's ... an ugly way of doing things.

    Sorry for double posting, but at least I got an answer.

    Apparently it is possible to add experience - with effects. Just create a unit modifying effect, edit the 'experience' field and then apply that effect to your hero. The disadvantage of this is, that you now only have one fixed experience value. So you either create an effect with 1 XP and apply it as often, as you need to get your desired total experience, or you create a clever system, which does this itself, by using different effects, with different experience values.
    Sounds complicated? Rejoice! It has already been done, you can find the test map there:
    http://forums.sc2mapster.com/develo...formation-map-hero-revive-give-experience/#p1

    All credits to zifoon, for creating this system. (he also created a hero respawn system, pretty weird but the best we got so far)
     
    Last edited by a moderator: May 3, 2010
  3. Bu113t

    Bu113t

    Joined:
    Mar 13, 2008
    Messages:
    223
    Resources:
    0
    Resources:
    0
    THANK YOU! Either way I have already set all units to give 5 exp.