I'm having a slight issue with my sell ability. It's based on channel and given to all structures, when its cast your supposed to get some % back based on a variable. of built cost back, but the way I'm doing it:
The seller is either returned 0 gold or 1 gold depending on seemingly random conditions, and yes the point values all are set correctly.
Code:
Sell Final
Events
Unit - A unit Finishes casting an ability
Conditions
Multiple ConditionsAnd - All (Conditions) are true
Conditions
(Ability being cast) Equal to (==) Sell (Generic)
Actions
Set Sell = 0.00
Set Sell = ((Real((Point-value of (Casting unit)))) x ((Real(DiffSell)) / 100.00))
Player - Set (Owner of (Casting unit)) Current gold to (((Owner of (Casting unit)) Current gold) + (Integer(Sell)))
Unit Group - Remove (Casting unit) from Attackable
Unit - Explode (Casting unit)