• 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.

Group units

Status
Not open for further replies.
Level 13
Joined
Mar 19, 2010
Messages
870
pick first unit->do something with it-->remove it from group --- and again...
pick first unit->do something with it-->remove it from group --- ...

if you need the unit, save it in an array or what ever.

Reg.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
  • Untitled Trigger 088
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set group = (Units in (Playable map area))
      • Set u = (Random unit from group)
      • Unit Group - Remove u from group
      • Set unit = (Random unit from group)
      • Unit Group - Remove unit from group
      • Custom script: call DestroyGroup(udg_group)
      • Custom script: set udg_group = null
In jass you would use FirstOfGroup(someGroup) instead of random unit, though FOG isn't completely random.
 
Status
Not open for further replies.
Top