• 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] Trigger help

Status
Not open for further replies.
Level 25
Joined
Feb 9, 2009
Messages
1,800
Basically I'm making a makeshift spider mine from starcraft it works but its not mui and I'm terrible with arrays, if you could give me alternate ways of making it mui or enhancing the current trigger.

here:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Spawns a summoned unit
    • Conditions
      • (Unit-type of (Summoned unit)) Equal to Spider Mine
    • Actions
      • Unit Group - Add (Summoned unit) to Spider_mineGroup
      • Set Spider_mineNumber = (Number of units in Spider_mineGroup)
      • Set Spider_mineunit[Spider_mineNumber] = (Summoned unit)
      • Trigger - Add to Untitled Trigger 001 <gen> the event (Unit - A unit comes within 250.00 of Spider_mineunit[Spider_mineNumber])
and the second part:
  • Untitled Trigger 001
    • Events
    • Conditions
      • ((Triggering unit) belongs to an enemy of (Owner of Spider_mineunit[Spider_mineNumber])) Equal to True
    • Actions
      • Unit - Replace Spider_mineunit[Spider_mineNumber] with a Spider Mine (Moving) using The old unit's relative life and mana
      • Unit - Order (Last replaced unit) to Neutral - Kaboom! (Triggering unit)
      • Unit - Add a 5.00 second Generic expiration timer to (Last replaced unit)
 
Level 25
Joined
Feb 9, 2009
Messages
1,800
didn't change anything T.T.

ok i found how to make it mui but... i have unearthed a brand new problem
heres the trigger help if you can...

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Spider Mine
    • Actions
      • Set Spider_minePoint = (Position of (Dying unit))
      • Set Spider_minegroup = (Units within 250.00 of Spider_minePoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Dying unit))) Equal to True))
      • Set Spider_mineRange = 250
      • Unit Group - Pick every unit in Spider_minegroup and do (Actions)
        • Loop - Actions
          • Set Spider_minePoint2 = (Position of (Picked unit))
          • Set Spider_mineNumber = (Integer((Distance between (Position of (Picked unit)) and (Position of (Dying unit)))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Spider_mineNumber Less than Spider_mineRange
            • Then - Actions
              • Custom script: set udg_Spider_mineTarget = null
              • Set Spider_mineTarget = (Picked unit)
              • Unit - Create 1 Spider Mine (Moving) for (Owner of (Dying unit)) at Spider_minePoint facing Default building facing (270.0) degrees
              • Unit - Order (Last created unit) to Neutral - Kaboom! Spider_mineTarget
              • Unit - Add a 5.00 second Generic expiration timer to (Last created unit)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Spider_minePoint2)
      • Custom script: call RemoveLocation(udg_Spider_minePoint)
my goal is for the moving spider mine to target the closest and only one but with this trigger it creates multiple minesi just want one unit and for the unit to be the closest.
 
Last edited:
Level 25
Joined
Feb 9, 2009
Messages
1,800
Here it is i made a mini little change to make it warcraft worthy!

instead of Spider mines i give you Necrotic Scarabs!!!
the Burrowed necrotic Scarab(triggering unit) has the goblin mine ability so it can die when near units to activate the trigger.
  • Necrotic Scarab
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Burrowed Necrotic Scarab (Triggering unit)
    • Actions
      • Set Spider_minePoint = (Position of (Dying unit))
      • Set Spider_minegroup = (Units within 600.00 of Spider_minePoint matching (((Owner of (Matching unit)) is an enemy of (Owner of (Dying unit))) Equal to True))
      • Set Spider_mineRange = 601
      • Unit - Remove (Dying unit) from the game
      • Unit Group - Pick every unit in Spider_minegroup and do (Actions)
        • Loop - Actions
          • Set Spider_minePoint2 = (Position of (Picked unit))
          • Set Spider_mineDistance = (Integer((Distance between (Position of (Picked unit)) and (Position of (Dying unit)))))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • Spider_mineDistance Less than Spider_mineRange
            • Then - Actions
              • Custom script: set udg_Spider_mineTarget = null
              • Set Spider_mineTarget = (Picked unit)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_Spider_minePoint2)
      • Unit - Create 1 Necrotic Scarab (Level 1) for (Owner of (Dying unit)) at Spider_minePoint facing Default building facing (270.0) degrees
      • -------- This Animation part is just to make it look good and not just a random unit popping out of no where --------
      • Animation - Play (Last created unit)'s Animation - Morph Alternate animation
      • Unit - Add Kaboom! (Necrotic Scarab) to (Last created unit)
      • Unit - Order (Last created unit) to Neutral - Kaboom! Spider_mineTarget
      • Custom script: call RemoveLocation(udg_Spider_minePoint)
 
Last edited:
Status
Not open for further replies.
Top