Code:
Level 1 Sharing Experience and Max
Events
Unit - A unit owned by Neutral Hostile Dies
Conditions
(Level of (Dying unit)) Equal to 1
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Killing unit) is A Hero) Equal to True
(Hero level of (Killing unit)) Less than or equal to 7
Then - Actions
Set Sharing_Exp = 0
Player Group - Remove (Owner of Players_Current_Hero[(Integer A)]) from Sharing_Exp_Players_In_Range
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Rect centered at (Position of Players_Current_Hero[(Player number of (Owner of (Killing unit)))]) with size (600.00, 600.00)) contains Players_Current_Hero[(Integer A)]) Equal to True
Then - Actions
Player Group - Add (Owner of Players_Current_Hero[(Integer A)]) to Sharing_Exp_Players_In_Range
Set Sharing_Exp = ((Point-value of (Dying unit)) / (Number of players in Sharing_Exp_Players_In_Range))
Hero - Add Sharing_Exp experience to Players_Current_Hero[(Integer A)], Show level-up graphics
Else - Actions
Else - Actions
Do nothing
Ok, the objective of this trigger is:
When a player kills a monster, if there is any other players within a circle range of 600, then it is suppose to take the exp from the monster kill, divide it by the # of players in range, then distrubute the divided amount to the near players and the inital hero that did the killing.
I ran a debug trigger as well, it is correclty working as for diving the amount, but it is NOT giving the exp amount to the player or players in range.
Can someone help me with this? What did I do wrong?