Hey there, I invented a custom experience system for my map, Battle Before Armageddon; this experience system kinda allowed me to tweak my own settings and have it more customizable than the default experience system.
However, this backfired. The trigger often bugs meaning alot of units don't give experience, the King doesn't get experience, and if specific (not all) units score the kill on something it doesn't give the experience it should to units around the dying unit.
Does anyone know how I could possibly fix this? Oh, also. The units that AREN'T giving experience are above level 0; just as a bit of a clarification!
However, this backfired. The trigger often bugs meaning alot of units don't give experience, the King doesn't get experience, and if specific (not all) units score the kill on something it doesn't give the experience it should to units around the dying unit.
-
M Experience System
-
Events
- Unit - A unit Dies
-
Conditions
- ((Owner of (Triggering unit)) is an enemy of (Owner of (Killing unit))) Equal to True
- (Level of (Triggering unit)) Greater than or equal to 1
-
Actions
- Set TempUnitArray[1] = (Killing unit)
- Set TempPoint = (Position of (Triggering unit))
- Set TempGroup = (Units within 1500.00 of TempPoint)
- Unit Group - Add TempUnitArray[1] to TempGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater than 1
-
Then - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Triggering unit)) is an enemy of (Owner of (Picked unit))) Equal to True
- ((Picked unit) is alive) Equal to True
- ((Picked unit) is A Hero) Equal to True
- (Hero level of (Picked unit)) Less than 25
- ((Picked unit) is Summoned) Equal to False
- (Unit-type of (Picked unit)) Not equal to Alistair the Younger
-
Then - Actions
- Set TempUnit = (Picked unit)
- Set TempInteger = (Custom value of TempUnit)
- Set TempIntegerArray[1] = (TempIntegerArray[1] + 1)
- Set TempIntegerArray[2] = (40 x (Level of (Triggering unit)))
- Set TempIntegerArray[2] = ((Integer(MExperienceRate[TempInteger])) x TempIntegerArray[2])
- Set TempIntegerArray[2] = (TempIntegerArray[2] / TempIntegerArray[1])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
- ((Triggering unit) is Summoned) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering unit) is A Hero) Equal to True
- ((Triggering unit) is Summoned) Equal to True
-
Then - Actions
- Set TempIntegerArray[2] = ((Integer(1.50)) x TempIntegerArray[2])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Then - Actions
- Set TempIntegerArray[2] = ((Integer(4.00)) x TempIntegerArray[2])
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering unit) is Summoned) Equal to True
-
Then - Actions
- Set TempIntegerArray[2] = ((Integer(0.25)) x TempIntegerArray[2])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
- Hero - Add TempIntegerArray[2] experience to (Picked unit), Show level-up graphics
- Hero - Add TempIntegerArray[2] experience to Alistair the Younger 0080 <gen>, Show level-up graphics
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (TempUnitArray[1] is A Hero) Equal to True
- (Hero level of TempUnitArray[1]) Less than 25
- (TempUnitArray[1] is Summoned) Equal to False
- (Unit-type of TempUnitArray[1]) Not equal to Alistair the Younger
-
Then - Actions
- Set TempUnit = TempUnitArray[1]
- Set TempInteger = (Custom value of TempUnit)
- Set TempIntegerArray[2] = (40 x (Level of (Triggering unit)))
- Set TempIntegerArray[2] = ((Integer(MExperienceRate[TempInteger])) x TempIntegerArray[2])
- Hero - Add TempIntegerArray[2] experience to TempUnitArray[1], Show level-up graphics
- Hero - Add TempIntegerArray[2] experience to Alistair the Younger 0080 <gen>, Show level-up graphics
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Set TempIntegerArray[1] = 0
- Custom script: call DestroyGroup (udg_TempGroup)
- Custom script: call RemoveLocation (udg_TempPoint)
-
Events