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

Creating resources that don't exist

Status
Not open for further replies.
Level 7
Joined
Jan 29, 2010
Messages
213
Hi all! I have a little question. It's possible to make something like that:
Unit hits the stone 5 times than grabs bag goes to town and you'll get 5stone (I have variable stone(integer))
It have to look like worker gather wood
 
Level 11
Joined
Aug 6, 2009
Messages
697
Mabey somthing like this? I'm pretty sure theres an easier way to do this but heres for player 1 and player 2.
  • Events
    • Unit - A unit Is attacked
  • Conditions
    • (Unit-type of (Attacked unit)) Equal to Stone
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of (Attacking unit)) Equal to Player 1 (Red)
      • Then - Actions
        • Set StoneAmount[1] = (StoneAmount[1] + 1.00)
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • StoneAmount[1] Equal to 5.00
          • Then - Actions
            • Hero - Give Stonebag to (Attacking unit)
            • Set StoneAmount[1] = 0.00
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Owner of (Attacking unit)) Equal to Player 2 (Blue)
              • Then - Actions
                • Set StoneAmount[2] = (StoneAmount[2] + 1.00)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • StoneAmount[2] Equal to 5.00
                  • Then - Actions
                    • Hero - Give Stonebag to (Attacking unit)
                    • Set StoneAmount[2] = 0.00
                  • Else - Actions
              • Else - Actions
      • Else - Actions
 
Last edited:
Status
Not open for further replies.
Top