• 🏆 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!

Creating resources that don't exist

Status
Not open for further replies.
Level 6
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