• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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,651
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