HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Levels and Experience.

08-08-2006, 11:08 PM#1
Azhag
How would I make it so only heroes within 5 levels of the creep it killed, or the party the hero is with, can gain experience?
08-09-2006, 12:27 AM#2
Orc_Tamer
Make the creep give out 0 experiece and make a trigger to give hero the exp if he is the required level.
08-09-2006, 01:01 AM#3
Azhag
I was more or less talking about if the Heroes are in a group.
How would you trigger it, so it only gives experience to Heroes in the group who are within 5 levels of the creep they just killed. Plus split the experience for each Hero in the group.
08-09-2006, 01:46 AM#4
Ignitedstar
Maybe something like this? I'm not sure if it works though.

Trigger:
Hero Exp
Collapse Events
Unit - A unit Dies
Collapse Conditions
((Triggering unit) belongs to an enemy of (Neutral Hostile)) Equal to True
Collapse Actions
Set HeroExp = ((Level of (Triggering unit)) x 50)
Set HeroesInRange = (Units within 600.00 of (Position of (Triggering unit)) matching (((Matching unit) is A Hero) Equal to True))
Collapse Unit Group - Pick every unit in HeroesInRange and do (Actions)
Collapse Loop - Actions
Hero - Set (Picked unit) experience to ((Hero experience of (Picked unit)) + (HeroExp / (Number of units in HeroesInRange))), Show level-up graphics

Oops, forgot the part of where the heroes are within a 5 level limit. I'm not sure how to do that, though.