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

[Trigger] Unit activates goblin mine and get's entangeld.

Status
Not open for further replies.
Level 6
Joined
May 31, 2008
Messages
218
I'm trying to do a simple spell like this: A unit will be able to place a nature trap(goblin mine) and if a enemy units walks over it, it will activate like usually and then the unit that activated the goblin land mine will be entangled. Easy shit i thought but apparently i can't get it to work.

  • Untitled Trigger 003
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Nature trap activation (REPUBLIC)
    • Actions
      • Set nature_trap = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Owner of (Casting unit)) at nature_trap facing Default building facing degrees
      • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Target unit of ability being cast)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation (udg_nature_trap)
  • Untitled Trigger 003 Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Nature Trap
    • Actions
      • Set nature_trap = (Position of (Dying unit))
      • Unit Group - Pick every unit in (Units within 60.00 of nature_trap) and do (Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Position of (Picked unit)) facing Default building facing degrees)
      • Unit Group - Order (Last created unit group) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
These are 2 triggers i tried with but none worked(they aren't complete). So i kinda need help to finish this stuff.
 
Level 6
Joined
Jul 22, 2008
Messages
243
  • Untitled Trigger 003 Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Nature Trap
    • Actions
      • Set nature_trap = (Position of (Dying unit))
      • Unit Group - Pick every unit in (Units within 60.00 of nature_trap) and do (Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Position of (Picked unit)) facing Default building facing degrees)
      • Unit Group - Order (Last created unit group) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)<----This is the one I'm talking about
You need to pick a unit for the second one. You order them to cast a spell on the picked unit... But you don't have a picked unit
Make it like the one above that.
 
  • Actions
    • Set nature_trap = (Position of (Dying unit))
    • Set T_Group = (Units within 60.00 of nature_trap)
    • Unit Group - Pick every unit in (T_Group) and do (Actions)
      • Loop - Actions
        • Set Point1 = (Position of (Picked unit)
        • For each (Integer A) from 1 to (Number of units in (T_Group), do (Actions)
          • Loop - Actions
            • Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Point1) facing Default building facing degrees)
            • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
            • Unit - Add a 1.00 second generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation (udg_Point1)
    • Custom script: call DestroyGroup (udg_T_Group)
    • Custom script: call RemoveLocation (udg_nature_trap)
 
Level 6
Joined
May 31, 2008
Messages
218
''Target unit of ability being cast'' and ''Target point of ability being cast'' works only if your event is ''Unit - A Unit Starts An Effect Of Ability''

Try to change event.

The thing is that goblin mines have abilites that are triggered when a unit walks over them, so i thought it might work. But i have no idea if the abilites are targeted on the unit that walks past.
 
Level 6
Joined
May 31, 2008
Messages
218
  • Actions
    • Set nature_trap = (Position of (Dying unit))
    • Set T_Group = (Units within 60.00 of nature_trap)
    • Unit Group - Pick every unit in (T_Group) and do (Actions)
      • Loop - Actions
        • Set Point1 = (Position of (Picked unit)
        • For each (Integer A) from 1 to (Number of units in (T_Group), do (Actions)
          • Loop - Actions
            • Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Point1) facing Default building facing degrees)
            • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
            • Unit - Add a 1.00 second generic expiration timer to (Last created unit)
        • Custom script: call RemoveLocation (udg_Point1)
    • Custom script: call DestroyGroup (udg_T_Group)
    • Custom script: call RemoveLocation (udg_nature_trap)

That didn't work either : /
But i do know that a unit is created so somewhere in that end line it fucks.
It could be that i made a stupid mistake when it comes to orderline on ability but i have checked it several times.
 
Level 6
Joined
May 31, 2008
Messages
218
  • Untitled Trigger 003 Copy
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Nature Trap
    • Actions
      • Set nature_trap = (Position of (Dying unit))
      • Unit Group - Pick every unit in (Units within 60.00 of nature_trap) and do (Unit - Create 1 Dummy for (Owner of (Dying unit)) at (Position of (Picked unit)) facing Default building facing degrees)
      • Unit Group - Order (Last created unit group) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)<----This is the one I'm talking about
You need to pick a unit for the second one. You order them to cast a spell on the picked unit... But you don't have a picked unit
Make it like the one above that.

But the one above wont work either.

Maybe the "within 60.00" is way too low? Try 100.00+.

Nothing happened except that 425 dummies were created xD
 
Status
Not open for further replies.
Top