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

Crypt Fiend Auto Burrow Trigger

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
this is my trigger:

  • Events
    • Time - Every 1.00 seconds of game time
  • Conditions
  • Actions
    • Set NerubianTempUnitGroup = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Nerubian Lurker))
    • Unit Group - Pick every unit in NerubianTempUnitGroup and do (Actions)
      • Loop - Actions
        • Set NerubianTempPoint = (Position of (Picked unit))
        • Set NerubianEnemyTempUnitGroup = (Units within 512.00 of NerubianTempPoint matching ((Owner of (Matching unit)) Not equal to Player 12 (Brown)))
        • If (((Current order of (Picked unit)) Not equal to (Order(attack))) and ((Current order of (Picked unit)) Not equal to (Order(stop)))) then do (Unit - Order (Picked unit) to Undead Crypt Fiend - Burrow) else do (Do nothing)
        • If ((Number of units in NerubianEnemyTempUnitGroup) Greater than 0) then do (Unit - Order (Picked unit) to Undead Crypt Fiend - Unburrow) else do (Do nothing)
        • Custom script: call RemoveLocation(udg_NerubianTempPoint)
        • Custom script: call DestroyGroup (udg_NerubianEnemyTempUnitGroup)
    • Custom script: call DestroyGroup (udg_NerubianTempUnitGroup)
It is supposed to make the Nerubian (Crypt fiend) burrow when it's not in combat. When an enemy (anything but player 12) comes close, it's supposed to unburrow.

What is the problem with this trigger? Is there an easier way to make the Crypt Fiend auto burrow/unburrow?
 
Level 6
Joined
Apr 15, 2012
Messages
205
I found the problem, Burrow is a morphing ability so Crypt Fiends turn into the unit Burrowed Crypt Fiends, because of that the pick all units matching(matching unit = crypt fiend) didn't understand that crypt fiend = burrowed crypt fiend.
 
Status
Not open for further replies.
Top