- Joined
- Sep 6, 2013
- Messages
- 6,742
-------- Setup --------
-------- MODIFY THE VARIABLES BELOW --------
Set UnitRefundRatio = 0.50
Set UnitRefundReqHP = 0.80
Set UnitRefundAbility = Sell Unit
-------- - --------
-------- MODIFY THIS PART IF YOU WISH TO CHANGE THE TOOLTIP --------
-------- - --------
Custom script: if udg_UnitRefundReqHP > 0. then
Custom script: call BlzSetAbilityExtendedTooltip(udg_UnitRefundAbility, "Refunds the unit for " + I2S(R2I(udg_UnitRefundRatio * 100)) + "% of its purchasing cost. Requires " + I2S(R2I(udg_UnitRefundReqHP * 100)) + "% health.", 1)
Custom script: else
Custom script: call BlzSetAbilityExtendedTooltip(udg_UnitRefundAbility, "Refunds the unit for " + I2S(R2I(udg_UnitRefundRatio * 100)) + "% of its purchasing cost.", 1)
Custom script: endif
-------- END --------
CustomUnitCost

Events


Time - Elapsed game time is 0.00 seconds

Conditions

Actions


-------- Example of how to change the refund value of a unit that is not based on the unit-type cost --------


Set unit = Rifleman 0006 <gen>


Set UnitRefundGoldCost[(Custom value of unit)] = 1000


Set UnitRefundWoodCost[(Custom value of unit)] = 1000


-------- Note that you must 0 these values when the unit is deindexed --------