- Joined
- Apr 23, 2010
- Messages
- 312
I've been working on this unit veterancy system for about a week but it's still a bit buggy. The system doesn't work properly until a unit get to the max rank and is fairly simple. The problem i'm having is that when unit-A gets a kill all units owned by that player (at least i think it's only by that player) get +1 toward their "Rank_Kills[(Custom value of (Killing unit))]".
The map that this system and my "Advanced Alliance System" are going into is nearly complete and will be uploaded once my other map is either accepted or rejected.
-
Setup
-

Events
-


Time - Elapsed game time is 1.00 seconds
-
-

Conditions
-

Actions
-


Set TempGroup = (Units in (Playable map area))
-


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Owner of (Picked unit)) Not equal to Player 9 (Gray)
-
-





Then - Actions
-






Set Unit_v[UnitNum_v] = (Picked unit)
-






Unit - Set the custom value of (Picked unit) to UnitNum_v
-






Set UnitNum_v = (UnitNum_v + 1)
-
-





Else - Actions
-
-
-
-


Custom script: call DestroyGroup(udg_TempGroup)
-
-
-
Created Units
-

Events
-


Unit - A unit Finishes training a unit
-
-

Conditions
-

Actions
-


Set Unit_v[UnitNum_v] = (Last created unit)
-


Unit - Set the custom value of Unit_v[UnitNum_v] to UnitNum_v
-


Set UnitNum_v = (UnitNum_v + 1)
-
-
-
Record
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


(Unit-type of (Killing unit)) Not equal to Watch Tower
-
-

Actions
-


Set Rank_Kills[(Custom value of (Killing unit))] = (Rank_Kills[(Custom value of (Killing unit))] + 1)
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Rank_Kills[(Custom value of (Killing unit))] Equal to 2
-
-



Then - Actions
-




Unit - Remove Rank [|cFF4BC428Private|r] dummy #1 from (Killing unit)
-




Unit - Add +1 to (Killing unit)
-




Unit - Add 2% to (Killing unit)
-




Unit - Add Rank [|cFF4BC428Private First Class|r] dummy #2 to (Killing unit)
-




Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-




Wait 2.00 game-time seconds
-




Special Effect - Destroy (Last created special effect)
-
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Rank_Kills[(Custom value of (Killing unit))] Equal to 5
-
-





Then - Actions
-






Unit - Remove Rank [|cFF4BC428Private First Class|r] dummy #2 from (Killing unit)
-






Unit - Remove +1 from (Killing unit)
-






Unit - Remove 2% from (Killing unit)
-






Unit - Add +2 to (Killing unit)
-






Unit - Add 4% to (Killing unit)
-






Unit - Add Rank [|cFF4BC428Corporal|r] dummy #3 to (Killing unit)
-






Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-






Wait 2.00 game-time seconds
-






Special Effect - Destroy (Last created special effect)
-
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








Rank_Kills[(Custom value of (Killing unit))] Equal to 8
-
-







Then - Actions
-








Unit - Remove Rank [|cFF4BC428Corporal|r] dummy #3 from (Killing unit)
-








Unit - Remove +2 from (Killing unit)
-








Unit - Remove 4% from (Killing unit)
-








Unit - Add +3 to (Killing unit)
-








Unit - Add 6% to (Killing unit)
-








Unit - Add Rank [|cFF4BC428Sergeant|r] dummy #4 to (Killing unit)
-








Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-








Wait 2.00 game-time seconds
-








Special Effect - Destroy (Last created special effect)
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










Rank_Kills[(Custom value of (Killing unit))] Equal to 11
-
-









Then - Actions
-










Unit - Remove Rank [|cFF4BC428Sergeant|r] dummy #4 from (Killing unit)
-










Unit - Remove +3 from (Killing unit)
-










Unit - Remove 6% from (Killing unit)
-










Unit - Add +4 to (Killing unit)
-










Unit - Add 8% to (Killing unit)
-










Unit - Add Rank [|cFF4BC428Sergeant Major|r] dummy #5 to (Killing unit)
-










Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-










Wait 2.00 game-time seconds
-










Special Effect - Destroy (Last created special effect)
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












Rank_Kills[(Custom value of (Killing unit))] Equal to 14
-
-











Then - Actions
-












Unit - Remove Rank [|cFF4BC428Sergeant Major|r] dummy #5 from (Killing unit)
-












Unit - Remove +4 from (Killing unit)
-












Unit - Remove 8% from (Killing unit)
-












Unit - Add +5 to (Killing unit)
-












Unit - Add 10% to (Killing unit)
-












Unit - Add Rank [|cFF4BC428Warrent Officer|r] dummy #6 to (Killing unit)
-












Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-












Wait 2.00 game-time seconds
-












Special Effect - Destroy (Last created special effect)
-
-











Else - Actions
-












If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-













If - Conditions
-














Rank_Kills[(Custom value of (Killing unit))] Equal to 17
-
-













Then - Actions
-














Unit - Remove Rank [|cFF4BC428Warrent Officer|r] dummy #6 from (Killing unit)
-














Unit - Remove +5 from (Killing unit)
-














Unit - Remove 10% from (Killing unit)
-














Unit - Add +6 to (Killing unit)
-














Unit - Add 12% to (Killing unit)
-














Unit - Add Rank [|cFF4BC428Chief Warrent Officer|r] dummy #7 to (Killing unit)
-














Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-














Wait 2.00 game-time seconds
-














Special Effect - Destroy (Last created special effect)
-
-













Else - Actions
-














If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-















If - Conditions
-
















Rank_Kills[(Custom value of (Killing unit))] Equal to 20
-
-















Then - Actions
-
















Unit - Remove Rank [|cFF4BC428Chief Warrent Officer|r] dummy #7 from (Killing unit)
-
















Unit - Remove +6 from (Killing unit)
-
















Unit - Remove 12% from (Killing unit)
-
















Unit - Add +7 to (Killing unit)
-
















Unit - Add 14% to (Killing unit)
-
















Unit - Add Rank [|cFF4BC428Lieutenant|r] dummy #8 to (Killing unit)
-
















Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
















Wait 2.00 game-time seconds
-
















Special Effect - Destroy (Last created special effect)
-
-















Else - Actions
-
















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-

















If - Conditions
-


















Rank_Kills[(Custom value of (Killing unit))] Equal to 23
-
-

















Then - Actions
-


















Unit - Remove Rank [|cFF4BC428Lieutenant|r] dummy #8 from (Killing unit)
-


















Unit - Remove +7 from (Killing unit)
-


















Unit - Remove 14% from (Killing unit)
-


















Unit - Add +8 to (Killing unit)
-


















Unit - Add 16% to (Killing unit)
-


















Unit - Add Rank [|cFF4BC428Captain|r] dummy #9 to (Killing unit)
-


















Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-


















Wait 2.00 game-time seconds
-


















Special Effect - Destroy (Last created special effect)
-
-

















Else - Actions
-


















If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



















If - Conditions
-




















Rank_Kills[(Custom value of (Killing unit))] Equal to 26
-
-



















Then - Actions
-




















Unit - Remove Rank [|cFF4BC428Captain|r] dummy #9 from (Killing unit)
-




















Unit - Remove +8 from (Killing unit)
-




















Unit - Remove 16% from (Killing unit)
-




















Unit - Add +9 to (Killing unit)
-




















Unit - Add 18% to (Killing unit)
-




















Unit - Add Rank [|cFF4BC428Major|r] dummy #10 to (Killing unit)
-




















Special Effect - Create a special effect attached to the origin of (Killing unit) using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-




















Wait 2.00 game-time seconds
-




















Special Effect - Destroy (Last created special effect)
-
-



















Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
The map that this system and my "Advanced Alliance System" are going into is nearly complete and will be uploaded once my other map is either accepted or rejected.








