HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making Hero level's relation to dying unit's level reduce XP with triggers?

03-19-2006, 07:08 AM#1
Ares_WarBlade
So I need heroes to be able to get all the way to level 300 through creeps and modified the gameplay constants to enable just that. However now that I have done this, I need a way to make it so that a hero gets reduced XP for killing creeps of a lower level than him. I created a trigger to do this, but it's flawed in the sense that if a unit that's not the hero kills a creep, the hero still gets full exp. I was wondering if someone could show me how to improve upon the script to make it work properly to include reducing exp for the hero if a normal unit kills it, maybe even an allying unit because if an allied unit kills it, then the hero wills till get full exp. Here's what I came up with:

Trigger:
Collapse Events:
Unit - A unit owned by Neutral Hostile Is attacked
Collapse Conditions:
((Attacking unit) is A Hero) Equal to True)
((Attacked unit) is A Hero) Equal to False)
Collapse Actions:
Collapse If (All Conditions are True) then do (Then Actions) else do Else Actions)
Collapse If - Conditions
(Hero level of (Attacking unit)) Less than ((Level of (Attacked unit)) + 2)
Collapse Then - Actions
Hero - Make (Owner of (Attacking unit)) Heroes gain 100.00% experience from future kills
Collapse Else -Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Hero level of (Attacking unit)) Equal to ((Level of (Attacked unit)) + 2)
Collapse Then - Actions
Hero - Make (Owner of (Attacking unit)) Heroes gain 50.00% experience from future kills.
Collapse Else - Actions
Hero - Make (Owner of (Attacking unit)) Heroes gain 0.00% experience from future kills.

Any ideas?
03-19-2006, 07:20 AM#2
Jacek
What about Event - a unit dies?
03-19-2006, 08:00 AM#3
Ares_WarBlade
Quote:
Originally Posted by Jacek
What about Event - a unit dies?
Won't work, when that event is called the unit is already dead and as such has already distributed EXP for the kill. (Tested it, even tried Pausing the dying unit, decreasing the XP given to then unpausing it, nada.)
03-19-2006, 08:09 AM#4
Captain Griffen
Why not completely trigger the XP system? Not that hard.
03-19-2006, 04:55 PM#5
Ares_WarBlade
*Edit*

Figured it out. Let the post die.