• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Locust Enumeration

Status
Not open for further replies.
Level 13
Joined
Mar 29, 2012
Messages
530
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