HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Experience Gain

12-03-2006, 05:52 PM#1
Rising_Dusk
If I disable experience gain via a trigger and then try to add experience to a hero via a trigger --
Will it work?

I can't test it right now, and I'm really curious if it would work.
Help would be much appreciated.
12-03-2006, 05:58 PM#2
Ryude
Use the trigger Set Experience Gain Rate for Player. If you set it to 0% and then back to w/e it will work fine.
12-03-2006, 06:28 PM#3
ragingspeedhorn
I think it should work, yes, I remember one guy I knew once did it and I think it worked there :)
12-03-2006, 06:59 PM#4
PipeDream
Since no game time elapses while the Jass VM is running, if necessary you can safely reenable, add, disable.
12-03-2006, 08:20 PM#5
Rising_Dusk
Okay, fair enough. Thanks guys!
Also, one more question --

Does anyone know how to regulate how much experience is needed to gain a level?
In games it always seems to just stay constant, but I want to change it.
Is that possible? And if so then how?
12-03-2006, 08:54 PM#6
Captain Griffen
It can be changed in game play constants.

If you need to change it dynamically, then dynamically change the rate at which it is gained.
12-03-2006, 09:32 PM#7
Ryude
Quote:
Originally Posted by Captain Griffen
It can be changed in game play constants.

If you need to change it dynamically, then dynamically change the rate at which it is gained.

Exactly what I was going to say.
12-04-2006, 01:12 AM#8
Alevice
Quote:
Originally Posted by Rising_Dusk
If I disable experience gain via a trigger and then try to add experience to a hero via a trigger --
Will it work?

I can't test it right now, and I'm really curious if it would work.
Help would be much appreciated.
Collapse JASS:
    call SuspendHeroXP(hero, false)
    call AddHeroXP( hero, exp, true)
    call SuspendHeroXP(hero, true)

erdit: goddamit, I should read the whole thread I am replying to once in a while.