Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
graystuff111, that wasn't really an appropriate answer. :/ Try being a bit less unfriendly... Boosting your post count this way might get your posts simply reseted :S
Repair is an ability that costs gold and lumber in a certain percentage but also Charge Gold and Lumber works too.
The best way is to trigger it as some abilities might not work that way, if you want to create an ability with gold cost.
If you want a spell to actually cost gold, you should tell about the gold cost in the item's description.
To do the triggering of the spell, create an integer variable named as "gold". Then create the following two triggers:
When casting it:
Untitled Trigger 002
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to YOUR SPELL
Actions
Set gold = (Player 1 (Red) Current gold)
Player - Set Player 1 (Red) Current gold to (gold - 100)
And a simple check so if the player has less then 100 (or X) gold, then just disable the ability for the player, or re-enable it if he has it above 100.
Dissable
Untitled Trigger 001
Events
Player - Player 1 (Red)'s Current gold becomes Less than 100.00
Conditions
Actions
Player - Disable SPELL NAME for Player 1 (Red)
Enable:
Untitled Trigger 001
Events
Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 100.00
Conditions
Actions
Player - Enable SPELL NAME for Player 1 (Red)
EDIT: Ahh, you found it already. Well still, I've explained the gold cost thing for custom spells too Cheers
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.