So I have player 1, player 2, player 3, player 4, player 5 and player 6. When player 1 uses a spell it spawns a unit for player 2 that when it finishes the building it changes ownership to player 3. The same thing can happen for player 4, it spawns a unit for player 5 that changes ownership to player 6.
I need to limit the amount of unit type X for player 2 and 3 (separately) and for player 5 and 6 too.
Im trying to make it work but it doesnt works when the unit gets killed, it prevents me from making a new structure when the building gets destroyed, Ive tried with changing triggering unit to dying unit too. Any help?
I need to limit the amount of unit type X for player 2 and 3 (separately) and for player 5 and 6 too.
Im trying to make it work but it doesnt works when the unit gets killed, it prevents me from making a new structure when the building gets destroyed, Ive tried with changing triggering unit to dying unit too. Any help?
-
Begins Ob
-

Events
-


Unit - A unit Begins construction
-
-

Conditions
-


(Unit-type of (Constructing structure)) Equal to Ritual Obelisk
-
-

Actions
-


Set VariableSet TempObInt = (Player number of (Owner of (Triggering unit)))
-


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



If - Conditions
-




ObeliskCount[TempObInt] Greater than or equal to 2
-
-



Then - Actions
-




Unit - Remove (Constructing structure) from the game
-




Game - Display to Zombieshareupggroup for 30.00 seconds the text: |cffb4002aMaximum L...
-
-



Else - Actions
-




Set VariableSet ObeliskCount[TempObInt] = (ObeliskCount[TempObInt] + 1)
-




Hashtable - Save TempObInt as 0 of (Key (Constructing structure).) in HashOb.
-
-
-
-
-
Obelisk Dies
-

Events
-


Unit - A unit Dies
-
-

Conditions
-


(Unit-type of (Triggering unit)) Equal to Ritual Obelisk
-
-

Actions
-


Set VariableSet TempObInt = (Load 0 of (Key (Triggering unit).) from HashOb.)
-


Set VariableSet ObeliskCount[TempObInt] = (ObeliskCount[TempObInt] + 1)
-
-




