an bug with aoe roots

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
Hi, i am really pissed i been trying to fix it for 3 hours and i cant know whats the reason ok so. ia m trying to create aoe spell roots. that picks 2/3/4 random units in range from casting point and dummies appear and cast roots on the choosen units. everything works fine but the problem is that if hero the caster stands far from the group he is using spell on then only one of the units will be rooted. if caster is close to units then more tha one units are rooted and it works perfectly. i mean this

upload_2020-6-23_1-4-51.png





here is trigger
upload_2020-6-23_1-5-20.png



the spell thats used for casting is based on channel.


i am also attachting map
 

Attachments

  • Roots_AoE.w3x
    20.7 KB · Views: 24
Level 21
Joined
Apr 12, 2018
Messages
494
Try this. I removed the second Unit Group and used an Integer counter instead (it's not random anymore) and changed the circle size according to how you have it in the Object Editor (because 1000 produces some funny results). With the Object Editor sizes it won't matter that it isn't random, although I suggest you add some additional checks against stuff like buildings and flyers (or anything else Entangling Roots can't hit for that matter since as is invalid targets will also be part of your Unit Group).

I'm not sure the second unit group functions the way you want it to.
 

Attachments

  • Roots_AoE.w3x
    20.6 KB · Views: 17

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
This might be very similar to Razorclaw's trigger but I just wanted to make sure that a few things were done that a lot of people tend to forget.

1) The Dummy needs to be setup correctly. The most important stats: Movement Type = None, Speed Base = 0, Art - Cast Backswing/Point = 0.00.
2) The trigger can be setup in a way that only 1 Dummy is needed to cast the spell multiple times (this only works if the Dummy has the proper settings)

  • AoE Roots
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cripple (Hero)
    • Actions
      • Set VariableSet Roots_Point = (Target point of ability being cast)
      • Set VariableSet Roots_Units = (Units within (40.00 + (40.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) of Roots_Point.)
      • Set VariableSet Roots_Max = (1 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet Roots_Counter = 0
      • -------- --------
      • Unit - Create 1 Dummy (Uncle) for (Triggering player) at Roots_Point facing 0.00 degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Roots_singletarget (Dummy) to (Last created unit)
      • -------- --------
      • Unit Group - Pick every unit in Roots_Units and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Roots_Counter Less than Roots_Max
              • (Picked unit) Not equal to (Target unit of ability being cast)
              • ((Picked unit) belongs to an enemy of (Triggering player).) Equal to True
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is invulnerable) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is A flying unit) Equal to False
            • Then - Actions
              • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
              • Set VariableSet Roots_Counter = (Roots_Counter + 1)
            • Else - Actions
      • -------- --------
      • Custom script: call RemoveLocation (udg_Roots_Point)
      • Custom script: call DestroyGroup (udg_Roots_Units)
 

Attachments

  • Roots_AoE Uncle 1.w3x
    19.4 KB · Views: 25
Last edited:
Level 12
Joined
Jul 17, 2013
Messages
544
This might be very similar to Razorclaw's trigger but I just wanted to make sure that a few things were done that a lot of people tend to forget.

1) The Dummy needs to be setup correctly. The most important stats: Movement Type = None, Speed Base = 0, Art - Cast Backswing/Point = 0.00.
2) The trigger can be setup in a way that only 1 Dummy is needed to cast the spell multiple times (this only works if the Dummy has the proper settings)

  • AoE Roots
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Cripple (Hero)
    • Actions
      • Set VariableSet Roots_Point = (Target point of ability being cast)
      • Set VariableSet Roots_Units = (Units within (40.00 + (40.00 x (Real((Level of (Ability being cast) for (Triggering unit)))))) of Roots_Point.)
      • Set VariableSet Roots_Max = (1 + (Level of (Ability being cast) for (Triggering unit)))
      • Set VariableSet Roots_Counter = 0
      • -------- --------
      • Unit - Create 1 Dummy (Uncle) for (Triggering player) at Roots_Point facing 0.00 degrees
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Roots_singletarget (Dummy) to (Last created unit)
      • -------- --------
      • Unit Group - Pick every unit in Roots_Units and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Roots_Counter Less than Roots_Max
              • (Picked unit) Not equal to (Target unit of ability being cast)
              • ((Picked unit) belongs to an enemy of (Triggering player).) Equal to True
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is invulnerable) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is A flying unit) Equal to False
            • Then - Actions
              • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Picked unit)
              • Set VariableSet Roots_Counter = (Roots_Counter + 1)
            • Else - Actions
      • -------- --------
      • Custom script: call RemoveLocation (udg_Roots_Point)
      • Custom script: call DestroyGroup (udg_Roots_Units)
the spell from you doesnt work, nothing happens when i use it at riders. any idea why? i cant find out myself
 
Level 12
Joined
Jul 17, 2013
Messages
544
It works in my test map, can't you just copy it over?

And what are riders? I excluded flying units from being targeted if you mean Gryphon Riders. Also, the entangling roots ability can't target air by default.
wait, i downloaded the file
Roots_AoE Uncle 1.w3x openned he map and used the skill on the green knights, nothing hapenned then, do i need to do anything else in order to make it work?
 
Status
Not open for further replies.
Top