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

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