• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with a system

Status
Not open for further replies.
Level 1
Joined
Feb 25, 2011
Messages
5
Hello, can someone help me make a system with ammo , for example: when a unit does an atack, the player who owns the unit will loose 1 lumber and when the player has no lumber the unit will stand and won't atack. Thank you.
 
Level 7
Joined
Jun 15, 2010
Messages
218
How do u like youre shooting. autmaticly (like normal ranged units) or with an ability, so the player shoots manualy
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Ammo Count
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Attacking unit)) Current lumber) Equal to 0
        • Then - Actions
          • Unit - Order (Attacking unit) to Stop
          • Cinematic - Clear the screen of text messages for (Player group((Owner of (Attacking unit))))
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: Not enough ammo !
        • Else - Actions
          • Player - Add -1 to (Owner of (Attacking unit)) Current lumber
          • Cinematic - Clear the screen of text messages for (Player group((Owner of (Attacking unit))))
          • Game - Display to (Player group((Owner of (Attacking unit)))) the text: (Current ammo is + (String(((Owner of (Attacking unit)) Current lumber))))
 
Status
Not open for further replies.
Top