• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How to limit level/experience?

Status
Not open for further replies.
Level 3
Joined
Jul 26, 2011
Messages
38
umm Guys. how to disable experience gaining from footman(unit name) if the d hero level is equal or greater than 6?

and enable again if the killing unit is knight(unit name) and disable if hero level is equal or greater than 11?

how can i do that in a single trigger?? :vw_death:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Why do you want to do it in a single trigger?

There is a native to turn of EXP gain for a specific unit, it is clear this will be needed.
Next you will need some form of subsystem to handle what units are normal or knighted.
1 Trigger is used for the level up detection, if a unit levels up to his limit (you test if he is knigth or not to get limit) you then turn off his experience gain and set his experience back to the nearest whole level (otherwise it will overshoot).
1 Other trigger us used to govern the knight system (runs when a unit becomes a knight) and makes him known as a Knight. This trigger would also test if the unit was level capped and if so would turn his experience gain back on.
A final trigger is probably needed on death to remove the units and the unit from all systems that referenced it. Although units still leak even when removed, it is a lot better than leaving 100s of unrevivable dead hero units active in the game.
 
Status
Not open for further replies.
Top