Why isn't this working? I've checked, it adds the hero to the group (or rather, printing the number of units in 'tempgroup' shows '1' when tested with 1 hero), so all conditions seem to be met, but the xp gain isn't implemented, any thoughts?
Here it is;
all the array variable parts are right, but it's the
Thanks in advance
Thanks in advance
Here it is;
Trigger:
- XP Awarded
- Events
- Unit - A unit Dies
- Conditions
- ((Owner of (Killing unit)) is in Defenders) Equal to True
- Actions
- For each (Integer A) from 0 to CreepTypeNumber, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Unit-type of (Dying unit)) Equal to CreepArray[(Integer A)]
- Then - Actions
- Set TempPoint = (Position of (Dying unit))
- Set Tempgroup = (Units within 800.00 of TempPoint matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) is alive) Equal to True)))
- Unit Group - Pick every unit in Tempgroup and do (Actions)
- Loop - Actions
- Hero - Add ((CreepValueArray[(Integer A)] / ((Number of units in Tempgroup) / 5)) + 2) experience to (Picked unit), Hide level-up graphics
- Loop - Actions
- Unit Group - Remove all units of Tempgroup from Tempgroup
- Custom script: call DestroyGroup(udg_Tempgroup)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 0 to CreepTypeNumber, do (Actions)
- Events
all the array variable parts are right, but it's the
Trigger:
- Hero - Add ((CreepValueArray[(Integer A)] / ((Number of units in Tempgroup) / 5)) + 2) experience to (Picked unit), Hide level-up graphics
Thanks in advance
Thanks in advance