- Joined
- Jun 20, 2017
- Messages
- 380
The problem is when I upgrade my towers and click on the sell ability, the refund does not work! (I mean it works until I upgrade them).
For example: If a tower is newly built, it will sell for 100%, until the next round starts, otherwise it will sell 50%.
For example: If a tower is newly built, it will sell for 100%, until the next round starts, otherwise it will sell 50%.
-
Sell
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Sell 50%
-
-

Actions
-


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



If - Conditions
-




Boolean_InRound Equal to False
-
-



Then - Actions
-




For each (Integer B) from 1 to Integer_Towers, do (Actions)
-





Loop - Actions
-






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







If - Conditions
-








(Unit-type of (Casting unit)) Equal to UnitTypes_Towers[(Integer B)]
-
-







Then - Actions
-








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









If - Conditions
-










((Casting unit) is in UnitGroup_TowersNewlyBuilt.) Equal to True
-
-









Then - Actions
-










Set VariableSet Integer_Temp = ((Point-value of (Casting unit)) x 1)
-
-









Else - Actions
-










Set VariableSet Integer_Temp = (Integer(((Real((Point-value of (Casting unit)))) x 0.50)))
-
-
-








Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: ((You sold a + ((Name of (Casting unit)) + for |cffffcc00)) + ((String(Integer_Temp)) + |r gold.))
-








Player - Add Integer_Temp to (Owner of (Casting unit)).Current gold
-








Player - Set (Owner of (Casting unit)).Total gold gathered to (((Owner of (Casting unit)) Total gold gathered) - Integer_Temp)
-








Set VariableSet Integer_Temp2 = (Point-value of (Casting unit))
-








Set VariableSet Integer_Temp3 = (Integer_Temp2 - Integer_Temp)
-








Player - Set (Owner of (Casting unit)).Total gold gathered to (((Owner of (Casting unit)) Total gold gathered) - Integer_Temp3)
-








Set VariableSet Integers_TotalGold[(Player number of (Owner of (Casting unit)))] = (Integers_TotalGold[(Player number of (Owner of (Casting unit)))] - Integer_Temp3)
-








Set VariableSet Temp_Player = (Owner of (Casting unit))
-








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









If - Conditions
-










Integer_Temp Greater than 0
-
-









Then - Actions
-










Custom script: call showUnitTextPlayer (GetSpellAbilityUnit(), "+" + I2S(udg_Integer_Temp), 100.00, 77.00, 0.00, udg_Temp_Player)
-
-









Else - Actions
-
-








Unit Group - Remove (Casting unit) from UnitGroups_TowersSelected[(Player number of (Owner of (Casting unit)))].
-








Unit Group - Remove (Casting unit) from UnitGroup_Towers.
-








Unit - Remove (Casting unit) from the game
-








Set VariableSet Point_Temp = (Position of (Casting unit))
-








Special Effect - Create a special effect at Point_Temp using Abilities\Spells\Other\Transmute\PileofGold.mdl
-








Special Effect - Destroy (Last created special effect)
-








Custom script: call RemoveLocation(udg_Point_Temp)
-








Trigger - Run Fighters Value <gen> (ignoring conditions)
-
-







Else - Actions
-
-
-
-
-



Else - Actions
-




Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: |cffff0000Couldn't ...
-
-
-
-

