• 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.

Lumber -> Mana/Energy System

Status
Not open for further replies.
Level 1
Joined
Dec 8, 2009
Messages
2
Hi, I was wondering if anyone could direct me to a tutorial on setting up a map to use lumber as a mana source?

Example: Player wishes to cast Blizzard, map checks amount of current lumber, casts blizzard, and subtracts lumber. If the player did not have adequate lumber, he is given the not enough mana message.

I believe the Single Player Campaign map "Wargale" uses it, but in the form of "Ability."

Thanks in advance.
 
Level 1
Joined
Dec 8, 2009
Messages
2
Or do I have to create a trigger for each spell adding/subtracting lumber?
 
Level 4
Joined
Jul 25, 2008
Messages
70
1) Do not double post pls...
2) I think i have an idea but someone can always improve it.

--------
1) Make a lot of description on your spells.
Blizzard

Mana Cost: 150
Damage: XX
Duration: X
Description: Blah Blah Blah
2) Make some triggers.
  • Events - A unit starts the Effect of an Ability.
  • Conditions -
  • Ability Being Cast = W.e
  • Actions -
  • If/Then/Else
  • If - (Owner of Caster)'s lumber is (< or =) 150
  • Then - Player - Set (Owner of (Casting unit)) Current lumber to (((Owner of (Casting unit)) Current lumber) - 150)
  • Else - Unit Group - Order (Units owned by (Owner of (Casting unit))) to Stop
Anyway I'm sure someone can improve that low-quality trigger, mainly cause it leaks a ton! That's the extent of my capabilities, i hope it helps.
 
Level 13
Joined
Jun 9, 2009
Messages
1,135
Do that thing like this. It is too easy.
  • Blizzard
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) Current gold) Greater than or equal to 150
        • Then - Actions
          • Player - Set Player 1 (Red) Current gold to (((Owner of (Triggering unit)) Current gold) - 150)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Owner of (Triggering unit)) Current gold) Less than 150
            • Then - Actions
              • Quest - Display to (Player group((Owner of (Triggering unit)))) the Hint message: You need the Energy...
            • Else - Actions
              • Do nothing
If it works enjoy. Give credit if you use this to your map, and give +rep
 
Status
Not open for further replies.
Top