• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Make Spell Cost Gold

Status
Not open for further replies.
Level 3
Joined
May 10, 2014
Messages
41
Hello!

I make a spell for building, that simply transform unit into another.
And I just want that spell cost 100 gold.
I check player property, show text messages by conditions, and modify player gold if spell is used. Everything work correctly.
But there's NO icon "gold" with note 100 above spell description. Like 100 gold and 20 lumber above spell, transforming Obsidian Statue into Destroyer.

Is there any way to make spell cost gold without triggering?
Or way to show gold and lumber icons above spells?

Thaks everybody for any information! :as:
 
Level 25
Joined
May 11, 2007
Messages
4,650
Use the spell called "Charge Gold and Lumber". It can't be used for a targeted unit, but that's about it.

If you want a targeted spell, use channel. Then you're going to have to trigger it.
 
Level 6
Joined
May 20, 2014
Messages
228
Another way could be making a dummy unit that can be sold, and put on your hero, which can be an indicator that costs money, and it'll show the gold price. Then trigger it by checking if an unit is bought, with conditions checking it equal to that unit, then remove the unit from game and do usual actions.
 

sentrywiz

S

sentrywiz

If you want a targeted spell, use channel. Then you're going to have to trigger it.

^This. Its really simple too. Use channel. Then when spell is cast, check if player has X gold. If yes, reduce it and cast the effect you want. If not, display some message that player doesn't have enough gold. Easy as pie
 
Status
Not open for further replies.
Top