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

[Spell] Cannot detect if a unit is alive or dead when it has locust?

Status
Not open for further replies.
Level 7
Joined
Mar 16, 2014
Messages
152
I am using dummy units with locust as projectiles for a spell. I check if the unit is alive or not when deciding to add them to a unit group, but the game cannot make this check when the unit has locust.

Is this normal? Is this supposed to happen?

There are other triggers involved in this spell, but the rest works fine. If I remove the check for the unit being alive at the start or use a unit that doesn't have locust as the projectile, the trigger works fine.

  • Leto Judgement Boulder Periodic
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set LetoJudgementPoint = (Position of FatherCornello)
      • Set LetoJudgementGroup[1] = (Units within 1000000000.00 of LetoJudgementPoint matching (((Unit-type of (Matching unit)) Equal to Boulder (Leto's Judgement)) and ((((Matching unit) is alive) Equal to True) and ((Owner of (Matching unit)) Equal to (Owner of FatherCornello)))))
      • Custom script: call RemoveLocation (udg_LetoJudgementPoint)
      • Unit Group - Pick every unit in LetoJudgementGroup[1] and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: ran group 1
          • Set LetoJudgementPoint = (Position of (Picked unit))
          • Set LetoJudgementGroup[2] = (Units within 90.00 of LetoJudgementPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Owner of (Matching unit)) is an enemy o
          • Custom script: call RemoveLocation (udg_LetoJudgementPoint)
          • If ((Number of units in LetoJudgementGroup[2]) Greater than 0) then do (Unit - Kill (Picked unit)) else do (Do nothing)
          • Unit Group - Pick every unit in LetoJudgementGroup[2] and do (Actions)
            • Loop - Actions
              • Game - Display to (All players) the text: ran group 2
              • Unit - Cause FatherCornello to damage (Picked unit), dealing (5.00 + (10.00 x (Real((Level of Rebound for FatherCornello))))) damage of attack type Chaos and damage type Universal
              • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set LetoJudgementPoint = (Position of (Picked unit))
              • Unit - Create 1 Dummy unit spells for (Owner of FatherCornello) at LetoJudgementPoint facing Default building facing degrees
              • Set Temp_Unit = (Last created unit)
              • Custom script: call RemoveLocation (udg_LetoJudgementPoint)
              • Unit - Add Storm Bolt (0.1 seconds 1 level) to Temp_Unit
              • Unit - Add a 0.40 second Generic expiration timer to Temp_Unit
              • Unit - Order Temp_Unit to Human Mountain King - Storm Bolt (Picked unit)
              • Game - Display to (All players) the text: (String((Unit-type of (Picked unit))))
      • If ((Number of units in LetoJudgementGroup[1]) Less than 1) then do (Trigger - Turn off (This trigger)) else do (Do nothing)
      • Custom script: call DestroyGroup(udg_LetoJudgementGroup[1])
      • Custom script: call DestroyGroup(udg_LetoJudgementGroup[2])
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Locust units cannot be detected by area searches, they are not in the appropriate system inside WC3. Searching an area for units will never return any locust units in the resulting group.

One either needs to explicitly add the locust units to a persistent group to track them, or search for them belonging to a player (they are still returned for player unit searches, just not area unit searches). In either case one might need to check if they are in the appropriate area of the map.
 
Status
Not open for further replies.
Top