• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Ability need resoruces?

Status
Not open for further replies.
Level 3
Joined
May 31, 2005
Messages
26
In my map a building has an ability which i want too use lumber too beable too cast it, at the minute ive got the triggers working for the ability (too fire missles at distaces if your wondering) but i want it too use 50 wood, how can i do this? also too make sure it checks too see if you have enough and if you dont an error comes saying you dont have enough resoruces..
 
Building Ability
Events
Unit - A unit Begins casting an ability
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(("some player") Current lumber) Equal to X
Then - Actions
Actions... Remember to reduce lumber for that player.
Else - Actions
Unit - Order (Casting unit) to Stop
Game - Display to (All players) for Y seconds the text: text

I think this would work.
 
Status
Not open for further replies.
Back
Top