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

[Trigger] Another trigger failure

Status
Not open for further replies.
Level 11
Joined
Nov 15, 2007
Messages
800
  • Collision
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set tempgroup = (Units of type Static Orb)
      • Unit Group - Pick every unit in tempgroup and do (Actions)
        • Loop - Actions
          • Set temppoint = (Position of (Picked unit))
          • Set tempgroup2 = (Units within 50.00 of temppoint matching ((Unit-type of (Matching unit)) Equal to (==) Static Orb))
          • Unit Group - Remove (Picked unit) from tempgroup2
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in tempgroup2) Greater than or equal to (>=) 1
            • Then - Actions
              • Unit Group - Add (Picked unit) to collisiongroup
              • Unit - Order (Picked unit) to Orc Tauren Chieftain - War Stomp
            • Else - Actions
      • Custom script: call DestroyGroup(udg_tempgroup)
      • Custom script: call DestroyGroup(udg_tempgroup2)
      • Custom script: call RemoveLocation(udg_temppoint)
Always returns false. I'm probably missing some small stupid detail, but I can't see it. Anyone?
 
Level 11
Joined
Nov 15, 2007
Messages
800
It returns false because when I add an event to "Else do - ", that event always runs. And when I remove the condition it runs, too.
 
Level 11
Joined
Nov 15, 2007
Messages
800
The units have no collision and there's another ability which draws them closer together, to the point where many of them end up stacked atop one another. I'd say they're within 1 range of eachother, and still it won't detect it.

Edit: Okay, this is weird as hell. It's detecting dead units but not living units...
 
Level 5
Joined
Feb 21, 2009
Messages
136
  • Collision
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set tempgroup = (Units of type Static Orb)
      • Unit Group - Pick every unit in tempgroup and do (Actions)
        • Loop - Actions
          • Set temppoint = (Position of (Picked unit))
          • Set tempgroup2 = (Units within 50.00 of temppoint matching ((Unit-type of (Matching unit)) Equal to (==) Static Orb))
          • Unit Group - Remove (Picked unit) from tempgroup2
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in tempgroup2) Greater than or equal to (>=) 1
            • Then - Actions
              • Unit Group - Add (Picked unit) to collisiongroup
              • Unit - Order (Picked unit) to Orc Tauren Chieftain - War Stomp
            • Else - Actions
      • Custom script: call DestroyGroup(udg_tempgroup)
      • Custom script: call DestroyGroup(udg_tempgroup2)
      • Custom script: call RemoveLocation(udg_temppoint)
Always returns false. I'm probably missing some small stupid detail, but I can't see it. Anyone?



Leaks.. make
  • Custom script: call RemoveLocation(udg_temppoint)
be in the loop
 
Level 11
Joined
Nov 15, 2007
Messages
800
No, a unit group loop runs once for each individual unit in the group. The problem was it doesn't detect locust units; I knew it'd be something I should've already known. Just not sure why it detects dead locusts. Is there a way to detect locust units or will I have to create temporary corpses all over the place? :xxd:
 
Level 11
Joined
Nov 15, 2007
Messages
800
I already went through the trouble of indexing every locust unit's location to an array and comparing range between them for this system, which was sortof a hassle for something that was supposed to be a quick spell. Thanks anyway, I'll probably use this locust detection thing a lot in the future.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
I do not see it returning any value let alone a boolean.

Anyway, you can loop through locusts if they are in a group. You can not pick locusts to add them to a group via the pick in X radious of position action. You can however add locust units to a group as they are created or pick them via all untis of type (I think).
 
Status
Not open for further replies.
Top