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

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