I'm creating a td where you can merge a tower when you have at least two of the same kind.
I made this trigger:
It allows you to upgrade a tower without removing the other.
And you can also upgrade the tower when you dont have 2 of its kind.
Can you guys help me?
Thanks anyway!
I made this trigger:
-
UpgradeWhiteT1
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Merge
-


(Unit-type of (Casting unit)) Equal to [Tier 1] White Tower
-
-

Actions
-


For each (Integer A) from 1 to (Number of units in (Units currently selected by (Owner of (Casting unit)))), do (Actions)
-



Loop - Actions
-
-


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



If - Conditions
-




(Unit-type of (Triggering unit)) Equal to [Tier 1] White Tower
-




(Number of units in (Units owned by (Owner of (Casting unit)) of type [Tier 1] White Tower)) Greater than or equal to 2
-
-



Then - Actions
-




Unit - Remove (Random unit from (Random 1 units from (Units owned by (Owner of (Casting unit)) of type [Tier 1] White Tower))) from the game
-




Unit - Replace (Casting unit) with a [Tier 2] White Tower using The new unit's default life and mana
-
-



Else - Actions
-
-
-
It allows you to upgrade a tower without removing the other.
And you can also upgrade the tower when you dont have 2 of its kind.
Can you guys help me?
Thanks anyway!
Last edited:




