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

Count items in region?

Status
Not open for further replies.
Level 4
Joined
Feb 8, 2009
Messages
61
How do I set an intiger variable to the number of items in a region?
(either with one line of code or gui)
and if posible that each item has an different value?
for example (claws of attack +1 = value 1, claws of attack +2 = value2, claws of attack +3 = value 3)
 
Level 18
Joined
Feb 28, 2009
Messages
1,970
For the first question you can simply create variable "number", and then make
  • Actions
    • Set number = 0
    • Item - Pick every item in (Playable map area) and do (Actions)
      • Loop - Actions
        • Set number = (number + 1)
    • Game - Display to (All players) the text: (String(number))
 
Status
Not open for further replies.
Top