• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

2. Variable

Status
Not open for further replies.
Level 4
Joined
Apr 25, 2009
Messages
74
Ohayô^^

i need a little bit help~

how can i Attach a 2. Variable to produceable Units, so that every Unit has its own Variable to count?

and gomen when this is a stupid question(i have a little bit probs with the variablethingys)
 
First off, store the units in a Unit Group variable, e.g.
  • Set Temp_Group = (Units of type X) or (Units in Region matching (Matching unit belongs to an enemy of Player Z) [or whatever you want]
  • For each (Integer A) from 1 to (Number of units in (Temp_Group)), do (Actions)
    • Loop - Actions
      • Set X[IntegerA] = Y
  • Custom script: call DestroyGroup (udg_Temp_Group)
"X" is the variable you want to assign to each unit, but it has to be enhanced with an array. In the array, assign the "IntegerA".
 
Status
Not open for further replies.
Top