Help with an Ensnare Spell!

Da_HP_Geek

New Member
Reaction score
8
What shall I add and where in this trigger so the target units cant attack? Its an ensnare spell with AoE. I want to pause them all, but I can't really figure out how to remove the pause after, so this far I am sure, then pllz help me with the rest! The best would be if u edited the trigger so I can see exactly how to do, cause my triggering skills aren't the best...

Thx in advance!

Trigger:
  • 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 )
 

free_killing

TH.net Regular
Reaction score
23
does the dummy have ensnare spell?

Something like this shud work, havent tested, but i think:
Trigger:
  • Incarcerous
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incarcerous
    • Actions
      • Set Caster_Point = (Position of (Casting unit))
      • Set Target_Point = (Target point of ability being cast)
      • Set UnitGroup = (Units within (100.00 x (Real((Level of Incarcerous for (Casting unit))))) of (Center of (Playable map area)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • Unit - Create 1 dummy for (Owner of (Casting unit)) at Caster_Point facing Default building facing degrees
          • Unit - Add IncarcerousDummy to (Last created unit)
          • Unit - Add a 1.00 second Water Elemental expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Orc Raider - Ensnare (Picked unit)
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: call RemoveLocation(udg_Caster_Point)
      • Custom script: call RemoveLocation(udg_Target_Point)


edit: forgot to set level of ability to level of Incarcerous, but do that right after the line "Unit - Add IncarcerousDummy to (Last created unit)"
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Yup, you did jsut set the level of the skill not add the skill. The trigger is good.
 

Da_HP_Geek

New Member
Reaction score
8
Ok, look at this trigger, I want to prevent them from attacking while they are ensanred and now I have came this far, but something is wrong. I cant remove the pause...

Trigger:
  • 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 - 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 - Pause Ensnare
          • Unit Group - Add Ensnare to Ensnare_Group
          • Wait (1.25 x (Real((Level of Incarcerous for (Target unit of ability being cast))))) seconds
          • Unit Group - Pick every unit in Ensnare_Group and do (Unit - Unpause all units)
      • Custom script: call RemoveLocation( udg_Caster_Point )
      • Custom script: call RemoveLocation( udg_Target_Point )
 

Carl-Fredrik

New Member
Reaction score
51
Try this:

Trigger:
  • 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 - 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 - Pause Ensnare
          • Unit Group - Add Ensnare to Ensnare_Group
      • Wait (1.25 x (Real((Level of Incarcerous for (Target unit of ability being cast))))) seconds
      • Unit Group - Pick every unit in Ensnare_Group and do (Unit - Unpause all units)
      • Custom script: call RemoveLocation( udg_Caster_Point )
      • Custom script: call RemoveLocation( udg_Target_Point )
 

vypur85

Hibernate
Reaction score
803
Edited the code a little:
Code:
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 - 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 - Pause Ensnare
                Unit Group - Add Ensnare to Ensnare_Group
        Custom script:   call RemoveLocation( udg_Caster_Point )
        Custom script:   call RemoveLocation( udg_Target_Point )
        Wait (1.25 x (Real((Level of Incarcerous  for ([B]Target unit of ability being cast[/B]))))) seconds
        Unit Group - Pick every unit in Ensnare_Group and do (Unit - Unpause all units)
        [B]Unit Group - Remove all units from Ensnare_Group[/B]

Why 'target unit ability being cast'? And you should also clear the unit group, for future use. Also, why pause an ensnared unit? Is that necessary?
 

free_killing

TH.net Regular
Reaction score
23
Edited the code a little:
Code:
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 - 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 - Pause Ensnare
                Unit Group - Add Ensnare to Ensnare_Group
        Custom script:   call RemoveLocation( udg_Caster_Point )
        Custom script:   call RemoveLocation( udg_Target_Point )
        Wait (1.25 x (Real((Level of Incarcerous  for ([B]Target unit of ability being cast[/B]))))) seconds
        Unit Group - Pick every unit in Ensnare_Group and do (Unit - Unpause all units)
        [B]Unit Group - Remove all units from Ensnare_Group[/B]

Why 'target unit ability being cast'? And you should also clear the unit group, for future use. Also, why pause an ensnared unit? Is that necessary?

I think you still can attack when ensnared, but you cant when paused..
also, doesnt the wait thing, makes it non-mui?
 

8uY_YoU

New Member
Reaction score
4
Maybe to prevent unit from attacking, you must using an edited stun ability, change the buff into ensare buff, its easier and MUI
 

free_killing

TH.net Regular
Reaction score
23
I agree with 8uy_you
So here is the trigger (havent tested it, but its supposed to work)
Trigger:
  • Incarcerous with stun
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Incarcerous
    • Actions
      • Set Target_Point = (Target point of ability being cast)
      • Set UnitGroup = (Units within (100.00 x (Real((Level of Incarcerous for (Casting unit))))) of (Center of (Playable map area)) matching (((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True))
      • Unit Group - Pick every unit in UnitGroup and do (Actions)
        • Loop - Actions
          • -------- create units --------
          • Set Caster_Point = (Position of (Casting unit))
          • Unit - Create 1 dummy for (Owner of (Casting unit)) at Caster_Point facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_Caster_Point)
          • Set Ensnarer = (Last created unit)
          • Set Caster_Point = (Position of (Casting unit))
          • Unit - Create 1 dummy for (Owner of (Casting unit)) at Caster_Point facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_Caster_Point)
          • Set Stunner = (Last created unit)
          • -------- ensnare --------
          • Unit - Add IncarcerousDummy to Ensnarer
          • Unit - Set level of IncarcerousDummy for Ensnarer to (Level of Incarcerous for (Casting unit))
          • Unit - Add a 1.00 second Water Elemental expiration timer to Ensnarer
          • Unit - Order Ensnarer to Orc Raider - Ensnare (Picked unit)
          • -------- stun --------
          • Unit - Add IncarcerousDummyStun to Stunner
          • Unit - Set level of IncarcerousDummyStun for Stunner to (Level of Incarcerous for (Casting unit))
          • Unit - Add a 1.00 second Water Elemental expiration timer to Stunner
          • Unit - Order Stunner to Human Mountain King - Storm Bolt (Picked unit)
      • Custom script: call DestroyGroup(udg_UnitGroup)
      • Custom script: call RemoveLocation(udg_Target_Point)
 

Da_HP_Geek

New Member
Reaction score
8
Well, it works exellent with the little thing Carl-Fredrik told me to change, and I am to lazy to do anything more right now, I mean it works ;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top