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

[Trigger] How to do so the ensnared units cant attack?

Status
Not open for further replies.
What shall I add and where in this trigger so the target units cant attack? Its an ensnare spell with AoE. I know that Cargo Hold do so a unit cant attack, but how to add the abillity to all in the group then and after that remove it?

  • Incarcerous
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incarcerous
    • Actions
      • Set Caster_Point = (Position of (Triggering unit))
      • Set Target_Point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Incarcerous for (Triggering unit))))) of Target_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
          • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation( udg_Caster_Point )
      • Custom script: call RemoveLocation( udg_Target_Point )
 
Level 20
Joined
Jan 6, 2008
Messages
2,627
Then you can make an if like breathless sayd and make 2 triggers, the one breath sayd:
Event
Every 0,1 sec.
If
he got Ensnared buff
Then
Order (attacked unit) to stop
and maybe:
Unit - Replace (attacked Unit) to Same Unit (Dummy) with no damage or range. (replace Peasant Model)
Else


Trigger 2
Every 0,1 sec


If then else multi
If
Attacked unit of type Dummy Peasant with model DONT got ensnared
Then
Replace back

And you also migth make a trigger that gives the unit the buff.
 
Level 5
Joined
Feb 21, 2009
Messages
136
Just use roots as a dummy spell, Replace this with roots..
  • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
  • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
  • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
 
Good idea! Why didn't I thought of that...?

Ok, now I have come this far:

  • Incarcerous
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incarcerous
    • Actions
      • Set Caster_Point = (Position of (Triggering unit))
      • Set Target_Point = (Target point of ability being cast)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Incarcerous for (Triggering unit))))) of Target_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set Ensnare = (Picked unit)
          • Unit - Pause Ensnare
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
          • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Unit Group - Add Ensnare to Ensnare_Group
          • Wait (1.25 x (Real((Level of Incarcerous for (Target unit of ability being cast))))) seconds
          • Unit - Unpause Ensnare
          • Unit Group - Remove Ensnare from Ensnare_Group
      • Custom script: call RemoveLocation( udg_Caster_Point )
      • Custom script: call RemoveLocation( udg_Target_Point )
But whats wrong? I dont know how to do with the groups, how to remove the "pause".
 
Level 5
Joined
Feb 21, 2009
Messages
136
Base it on Roots ffs..
  • Incarcerous
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Incarcerous
  • Actions
  • Set Caster_Point = (Position of (Triggering unit))
  • Set Target_Point = (Target point of ability being cast)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Incarcerous for (Triggering unit))))) of Target_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
  • Loop - Actions
    • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
    • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
    • 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_Caster_Point )
  • Custom script: call RemoveLocation( udg_Target_Point )
change the dummy ability with roots.. I also recommend changing the facing angle of the dummy when spawned to the angle between Caster and Target point
 
Base it on Roots ffs..
  • Incarcerous
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Incarcerous
  • Actions
  • Set Caster_Point = (Position of (Triggering unit))
  • Set Target_Point = (Target point of ability being cast)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within (100.00 x (Real((Level of Incarcerous for (Triggering unit))))) of Target_Point matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
  • Loop - Actions
    • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Caster_Point facing Default building facing degrees
    • Unit - Set level of Dummy Ability for (Last created unit) to (Level of Incarcerous for (Triggering unit))
    • 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_Caster_Point )
  • Custom script: call RemoveLocation( udg_Target_Point )
change the dummy ability with roots.. I also recommend changing the facing angle of the dummy when spawned to the angle between Caster and Target point

Good idea, thx!

Just set the aoe of the silence to the aoe of your roots spell...

I know, but now it seams like I shall base it on roots :p

Thx anyway!
 
Status
Not open for further replies.
Top