- Joined
- Mar 21, 2014
- Messages
- 79
[Solved] Customized Experience Gain
Hello everyone,
I would like to do this in my map: Disable experience gain from all units (including computer players and neutral hostile) but not with "Disable Experience Gain" and replace it with my custom exp gain trigger.
The thing is this: First I made a map like every other and the hero gained experience from creeps and by killing undeads. Total normal. But the problem is, that the undeads belong to an Computer(player) and so the hero gains much more exp by killing undeads than killing creeps (Neutral Hostile). I want to make this level/same.
So I thought of a custom experience trigger.
This trigger looks like this:
(Remark: Player 2 is the Human player with the hero)
Now I have the following situation:
Neutral Hostile gives me as much exp as in the trigger. Not more, not less. This is good.
Undead players give me more than this trigger says. This is not good.
HOW CAN I DISABLE EXPERIENCE GAIN FROM UNITS WHO BELONG TO ENEMY PLAYERS(COMPUTERS)?
Thank you very much for your help =)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
UPDATE: SOLVED
One just has to add this action(s):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Hello everyone,
I would like to do this in my map: Disable experience gain from all units (including computer players and neutral hostile) but not with "Disable Experience Gain" and replace it with my custom exp gain trigger.
The thing is this: First I made a map like every other and the hero gained experience from creeps and by killing undeads. Total normal. But the problem is, that the undeads belong to an Computer(player) and so the hero gains much more exp by killing undeads than killing creeps (Neutral Hostile). I want to make this level/same.
So I thought of a custom experience trigger.
This trigger looks like this:
(Remark: Player 2 is the Human player with the hero)
-
Exp Gain
-
Events
- Unit - A unit Dies
-
Conditions
- ((Dying unit) belongs to an enemy of Player 2 (Blue)) Equal to True
- ((Dying unit) is in TrollGruppe) Equal to False
- ((Region centered at (Position of (Dying unit)) with size (2000.00, 2000.00)) contains Held) Equal to True
-
Actions
- Set ExpGain = ((Real((Level of (Dying unit)))) x (((Real((Level of (Dying unit)))) - 1.00) / (Real((Hero level of Held)))))
- Set ExpGain = (ExpGain + 1.00)
- Set ExpGainInt = (Integer(ExpGain))
- Hero - Add ExpGainInt experience to Held, Show level-up graphics
- Floating Text - Create floating text that reads ((String(ExpGainInt)) + |cff0066cc XP|r) above (Dying unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
- Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-
Events
Now I have the following situation:
Neutral Hostile gives me as much exp as in the trigger. Not more, not less. This is good.
Undead players give me more than this trigger says. This is not good.
HOW CAN I DISABLE EXPERIENCE GAIN FROM UNITS WHO BELONG TO ENEMY PLAYERS(COMPUTERS)?
Thank you very much for your help =)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
UPDATE: SOLVED
One just has to add this action(s):
- Hero - Enable experience gain for Held
- Hero - Make Player 2 (Blue) Heroes gain 0.00% experience from future kills
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Attachments
Last edited: