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

[JASS] Locust Enumeration

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
542
I found that FirstOfGroup function always return null when the unit is a locust-based unit.
I tried doing enumeration with ForGroup function by choosing from GUI to find any difference.

JASS:
loop
    set u = FirstOfGroup(g) // Return null when unit is a locust-based.
    call BJDebugMsg("alpha")
    exitwhen u == null
    call BJDebugMsg("beta")
    
    call GroupRemoveUnit(g, u)
endloop

I'm pretty sure the dummies are already in the group.

  • Untitled Trigger 001
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Create 1 Snov_DummyObject for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Special Effect - Create a special effect attached to the origin of (Last created unit) using war3mapImported\FireMedium.mdx
      • Unit Group - Add (Last created unit) to Snov_SuperGravityGroup
      • Trigger - Turn on Untitled Trigger 002 <gen>
  • Untitled Trigger 002
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Snov_SuperGravityGroup and do (Actions)
        • Loop - Actions
          • Set loc = ((Position of (Picked unit)) offset by 50.00 towards 0.00 degrees)
          • Custom script: call SetUnitX(GetEnumUnit(), GetLocationX(udg_loc))
          • Custom script: call SetUnitY(GetEnumUnit(), GetLocationY(udg_loc))
The GUI version work well.
 
Status
Not open for further replies.
Top