• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! 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,971
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