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

land mine destroyer trigger

Status
Not open for further replies.
Level 4
Joined
Jun 14, 2008
Messages
72
I was wondering how to make a land mine destroyer trigger this how im trying to make it...

you get this unit called a mine destroyer...it has an ability buton and when you push it it kills all units in a cirtan range... the problem is it destroys ANY unit in range.. i cant figure out how to make it only destroy goblin land mines...

add a condition to for example: pick every unit in area ....
if picked unit type is equal to goblin land mines
kill picked unit
 
Last edited by a moderator:
Level 19
Joined
May 1, 2008
Messages
1,130
but if u use kill unit, doesn't make the mine explode?
i suggest using remove picked unit not kill picked unit
 
Level 4
Joined
Jun 14, 2008
Messages
72
THis Brings up new problems... 1 it kills the destroyer unit when ii do it with out this condition

  • (Unit-type of (Picked unit)) Equal to Goblin Land Mine
but with it it does absalutly nothing...


  • seek and destroy
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Seek and destroy
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Picked unit)) Equal to Goblin Land Mine
        • Then - Actions
          • Unit Group - Pick every unit in (Units within 1000.00 of (Position of (Triggering unit))) and do (Unit - Remove (Picked unit) from the game)
        • Else - Actions
          • Do nothing
 
Do it like this:
  • Destroyer
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Taste of Death
    • Actions
      • Set TempLoc1 = (Position of (Triggering unit))
      • Set Group = (Units within 1000.00 of TempLoc1 matching ((Unit-type of (Matching unit)) Equal to Goblin Land Mine))
      • Unit Group - Pick every unit in Group and do (Actions)
        • Loop - Actions
          • Set TempLoc2 = (Position of (Picked unit))
          • Unit - Remove (Picked unit) from the game
          • Special Effect - Create a special effect at TempLoc2 using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation (udg_TempLoc2)
      • Custom script: call DestroyGroup (udg_Group)
      • Custom script: call RemoveLocation (udg_TempLoc1)
I also made you a nice special effect =D
 
Level 4
Joined
Jun 14, 2008
Messages
72
  • seek and destroy
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Seek and destroy
    • Actions
      • Set temploc1 = (Position of (Triggering unit))
      • Set group = (Units within 1000.00 of temploc1)
      • Unit Group - Pick every unit in group and do (Actions)
        • Loop - Actions
          • Set temploc1 = (Position of (Picked unit))
          • Unit - Remove (Picked unit) from the game
          • Special Effect - Create a special effect at temploc1 using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Destroy (Last created special effect)
 
You need this line:
  • Set Group = (Units within 1000.00 of TempLoc1 matching ((Unit-type of (Matching unit)) Equal to Goblin Land Mine))
"Its units in range matching condition" Your trigger now picks every unit and remove it.

I tested the trigger i have done, and it works nice.

Just totally copy the trigger i posted, it worked for me.
And for custom scripts, you can copy it from here(if you are using same variable names as i do) =D
 
Status
Not open for further replies.
Top