Kelvin87
New Member
- Reaction score
- 14
Can somebody help me to find an ability that is using Gold to cast a spell (targeting unit, targeting ground or instant no target) in World Editor. Thx.
From:
Thelder Clan
From:
Thelder Clan
Can somebody help me to find an ability that is using Gold to cast a spell (targeting unit, targeting ground or instant no target) in World Editor. Thx.
From:
Thelder Clan
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YourAbility
Actions
Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - YourGoldCost)
Just set the manacost of the spell to 0 and try this trigger.
Code:Untitled Trigger 001 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to YourAbility Actions Player - Set (Owner of (Triggering unit)) Current gold to (((Owner of (Triggering unit)) Current gold) - YourGoldCost)
it would be easier to do ''Player - Add -GoldCost to Owner of Triggerring Unit current gold
Also, what if the player does not have enough gold? I think you'd have to add a if/then/else statement.
Untitled Trigger 001
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YourAbility
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Triggering unit)) Current gold) Less than YourGoldCost
Then - Actions
Else - Actions
Player - Add -YourGoldCost to (Owner of (Triggering unit)) Current gold
I believe there's a spell called Charge Gold and Lumber or something close. I don't know if you can change targeting like Channel, but you can set the gold and lumber cost of the spell. Try working with that.
Ah you're right. Well I was just speeding through it lol Anyway,
Code:Untitled Trigger 001 Events Unit - A unit Starts casting an ability Conditions (Ability being cast) Equal to YourAbility Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Owner of (Triggering unit)) Current gold) Less than YourGoldCost Then - Actions [COLOR="Red"]Order casting unit to stop[/COLOR] Else - Actions Player - Add -YourGoldCost to (Owner of (Triggering unit)) Current gold
That should be right.
You forgot to make it to where it can't be cast if he don't got the gold.
^ not with the event u used
only "Begins Casting" event is able to do that