How does it work behind the scenes?
Resources > Trigger Libraries & Scripts
[Library] Add Experience To Unit
- 16 posts
-
vjeux Author
- Battle.net
- vjeux
- #463 EU
- Join date
- Jan 04, 2005
- Location
- France
- Reputation
- 0
- Posts
- 947
- Projects
- 3
- Last login
- May 12, 2012
-
KorvinGump Author
- Battle.net
- KorvinGump
- #962 EU
- Join date
- Apr 30, 2010
- Location
- Russian Federation
- Reputation
- 0
- Posts
- 168
- Projects
- 2
- Teams
- Last login
- May 16, 2012
Last edited Jul 24, 2010 by KorvinGump -
Aenigma Author
- Battle.net
- Trucidar
- #510 NA
- Join date
- Oct 02, 2005
- Location
- Canada
- Reputation
- 0
- Posts
- 335
- Projects
- 2
- Last login
- May 01, 2012
This is great Korvin! All the other methods of doing what should be a simple task were so clunky.
Sc2Mapster Data Assets for your map
(Abilities, units, weapons, you name it!) -
OneTwoSC Author
- Battle.net
- Onetwo
- #855 NA
- Join date
- May 12, 2010
- Location
- Canada
- Reputation
- 13
- Posts
- 1,066
- Projects
- 1
- Team
- Last login
- May 17, 2012
I've had to do this in my RPG for loading a hero and getting his exp back to the right number... I would guess he applies the 1000 XP effect in a loop until 100 XP needed until 10 XP until down to the last XP. It's the best we can do atm :/
SC2 video tutorials: http://www.youtube.com/onetwosc
-
zifoon Author
- Join date
- Apr 21, 2010
- Location
- Australia
- Reputation
- 0
- Posts
- 349
- Projects
- 1
- Last login
- Sep 02, 2011
So people didn't know how to do this? It's simple catalog function using a dummy effect. O_O
http://www.sc2mapster.com/maps/aos-template/files/ ^Mine was made May This wasn't uncommon either
-
KorvinGump Author
- Battle.net
- KorvinGump
- #962 EU
- Join date
- Apr 30, 2010
- Location
- Russian Federation
- Reputation
- 0
- Posts
- 168
- Projects
- 2
- Teams
- Last login
- May 16, 2012
I just found in your map solution through set catalog value. I'm shocked.

I do not understand how you knew all this so early. And in your map used such functions and chips, which I began to understand for example only after several months of studying the editor. You did this map http://www.sc2mapster.com/maps/aos-hero-revive-example/ after several days of release of the editor. I do not understand, or you're a genius, or?? oO
You have worked in Warcraft 3 World Editor? Why do you always write that it's easy? And why do you have a map of everywhere [zifoon]? :D . You love yourself so much?
-
zifoon Author
- Join date
- Apr 21, 2010
- Location
- Australia
- Reputation
- 0
- Posts
- 349
- Projects
- 1
- Last login
- Sep 02, 2011
Quote from KorvinGump: Go
I just found in your map solution through set catalog value. I'm shocked.
I do not understand how you knew all this so early. And in your map used such functions and chips, which I began to understand for example only after several months of studying the editor. You did this map http://www.sc2mapster.com/maps/aos-hero-revive-example/ after several days of release of the editor. I do not understand, or you're a genius, or?? oO
You have worked in Warcraft 3 World Editor? Why do you always write that it's easy? And why do you have a map of everywhere [zifoon]? :D . You love yourself so much?
Na I was using xml before editor was release. So I was using [zifoon] as identifier so I can search quicker through xml editor. It was few days after release of the editor but I played around with xml and native functions a lot so I pretty much knew every function. In addition to that, I do have a casual job designing interface for softwares and that helps too. Though very casual since I still have to finish university.
Not a genius just knew stuff before other people did.
Yeah, I used world editor for couple of years but I wasn't really fan of making maps. I just like challenging the limitation of world editor but that was it. Also I don't love myself per say but healthy dose of narcissism never hurt anybody ^.^Last edited Jul 25, 2010 by zifoon -
OneTwoSC Author
- Battle.net
- Onetwo
- #855 NA
- Join date
- May 12, 2010
- Location
- Canada
- Reputation
- 13
- Posts
- 1,066
- Projects
- 1
- Team
- Last login
- May 17, 2012
-
s3rius Moderator
- Battle.net
- serius
- #707 EU
- Join date
- Apr 24, 2010
- Location
- Germany
- Reputation
- 1
- Posts
- 2,317
- Projects
- 1
- Last login
- May 01, 2012
-
Greymechanic Regular Shmoe
- Join date
- Aug 09, 2010
- Location
- United States
- Reputation
- 0
- Posts
- 4
- Last login
- Aug 18, 2010
Thanks all! Been looking all over the place for something like this.
-
Airolden Regular Shmoe
- Join date
- Aug 10, 2010
- Location
- United States
- Reputation
- 0
- Posts
- 30
- Last login
- Mar 13, 2011
@KorvinGump: Go
Very nice library. Didn't realize how useful something like this would be until I saw this thread! :D
-
I was quite interested in your function, so I took it apart and rewrote it. It's still using base 10 multiples (so no new effects needed), it just uses arrays and loops to spit out the right experience. There are also 2 versions,1 that takes reals and 1 that takes ints (since it not showing up sucks). So a new Add_Experience_to_Unit.SCLib is attached. Also, I wrote a small javascript script that will spit out the xml for setting up level requirements. You can specify a function and it will spit out a bunch of veterancyLevelArray tags with the appropriate values. Because editing 40 levels worth of experience requirements sucks.
Edit: I re read the post about using set catalog, and nevermind, thats so much easier. Check out the vererancy levels generator though.
Last edited Aug 19, 2010 by cbaker118 -
MangledMind Regular Shmoe
- Join date
- Jul 22, 2010
- Location
- United States
- Reputation
- 0
- Posts
- 117
- Last login
- Apr 15, 2012
i have a question. currently in my ORPG map every time a hero dies, there is a brief lag spike, before they are instantly revived. Im not sure what the problem is, but i asssume it's becuase of the trigger i have that returns the heroes EXP to him. i have a behavior that applies a EXP effect that gives 1 exp point, and i stack the buff x number of times to equal the heroes EXP before he died. once the hero reaches a level higher than 10 the lag increases exponentially when they die and respawn, taking up to 5 seconds or more for the lag to clear, and the hero to respawn. i also get a trigger error for a random trigger every time the hero respawns, (ive tried turning off the triggers that return the error, but then it just picks a different one) will this method help solve either of these problems? thanks in advance!
Current Project: MangledMind's Impossible Bosses
8 Heroes, 4 abilties each
1 Boss (Normal/Impossible Mode)
PvP Arena - All skill shots
-
Mienk Author
- Battle.net
- Mienk
- #221 NA
- Join date
- Aug 25, 2010
- Location
- United States
- Reputation
- 0
- Posts
- 226
- Projects
- 1
- Team
- Last login
- Aug 08, 2011
This is what I call, quest rewards made easy. Thanks and awesome job.
-
Helral Moderator
- Battle.net
- Helral
- #454 EU
- Join date
- May 26, 2010
- Location
- Netherlands
- Reputation
- 7
- Posts
- 709
- Projects
- 6
- Team
- Last login
- May 16, 2012
the lag is caused by the loop to add 1 point of experience a lot of times.
I don't know if the asset supplied here uses the catalog one which is lag free since it is no loop at all just 2 actions, but at least it will cause less lag then the way you have it now.Helral's Lair
Meow meoow meeow. I'm ze evil SC2MapsterKitten.current projects:
- UI support for other projects
- Helrals Random Dungeon Map (progressing very slowly)
- monitoring wiki and UI development forum
- 16 posts

KorvinGump AuthorHello everyone.
I wrote a library that allows via action to give an any number of experience points to unit (from 1 to 99999). You can increase this number to how many you want, you only work a little over the library(or say me if it's need).
How to use:
Then you can call action Add Experience To Unit(Experience Points, Unit) which will give to Unit Experience Points. In addition, in map, I realized the command -give experience points, when experience points - number of experience points which you want to give your unit. I think all this will be useful for people who are developing maps with the heroes.