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

Help with trigger

Status
Not open for further replies.
Level 4
Joined
Dec 4, 2014
Messages
97
i want to order unit to use a spell on alls units in a group so i did Unit Group - Pick every unit in _Target and do (Actions)
Loop - Actions
-------- - --------

Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
-------- - --------
but it only stuns 1 unit pls help me
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
something like:
  • Set TempUnitGroup = Some units
  • Unit Group - Pick all units in TempUnitGroup and do actions
    • loop
      • Set TempUnit = Picked Unit
      • Set TempPoint = Unit position of TempUnit
      • Unit - Create Dummy at TempPoint
      • Set TempUnit2 = Last Created Unit
      • Unit - Order TempUnit2 to Human Mountain King - Storm Bolt TempUnit
      • Unit - Add 1 sec expiration timer to TempUnit2
      • Custom Script - call RemoveLocation(udg_TempPoint)
  • Custom Script - call DestroyGroup(udg_TempUnitGroup)
If you are not familiar with how dummy units work search around.
 
Level 4
Joined
Dec 4, 2014
Messages
97
i did
Set Oonoki_Target = (Units within 400.00 of Oonoki_Point matching ((((Matching unit) is A structure) Equal to (==) False) and (((Picked unit) belongs to an enemy of (Owner of Oonoki_Caster)) Equal to (==) True)))

Unit Group - Pick every unit in Oonoki_Target and do (Actions)
Loop - Actions
Special Effect - Create a special effect at Oonoki_Point using earthsmash.mdx
Special Effect - Destroy (Last created special effect)
-------- - --------
Unit - Cause Oonoki_Caster to damage (Picked unit), dealing (80.00 x (Real((Level of |cffaa8a29Doton: Goremu no Jutsu|r for Oonoki_Caster)))) damage of attack type Normal and damage type Normal
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
-------- - --------
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
You do this:
Dummy, attack that unit (unit 1)
Dummy, attack that unit (unit 2)
Dummy, attack that unit (unit 3)
Dummy, attack that unit (unit 4)
Dummy, attack that unit (unit 5)
Dummy, attack that unit (unit 6)
Dummy, attack that unit (unit 7)
Dummy, attack that unit (unit 8)
<next-frame>
Dummy starts attacking unit 8.

What you need is this:
Dummy1, attack that unit (unit 1)
Dummy2, attack that unit (unit 2)
Dummy3, attack that unit (unit 3)
Dummy4, attack that unit (unit 4)
Dummy5, attack that unit (unit 5)
Dummy6, attack that unit (unit 6)
Dummy7, attack that unit (unit 7)
Dummy8, attack that unit (unit 8)
<next-frame>
Dummy1 starts attacking unit 1.
Dummy2 starts attacking unit 2.
Dummy3 starts attacking unit 3.
Dummy4 starts attacking unit 4.
Dummy5 starts attacking unit 5.
Dummy6 starts attacking unit 6.
Dummy7 starts attacking unit 7.
Dummy8 starts attacking unit 8.

What nedio95 said is how you can do it.
 
Status
Not open for further replies.
Top