• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Add units from one group to another group!

Status
Not open for further replies.
Level 1
Joined
Jun 13, 2008
Messages
132
Hi there, I am making a spell to help some guy on Hive but I am having a strange issue with this: the spell is Skewer, I have my trigger that runs every 0.01 seconds and creates the TempGroup based on a TempPoint, all is ok there, I try to add the units from the TempGroup to my SkewerGroup using pick every unit in TempGroup and then in actions if SkewerInteger is less than 1x level of Skewer for SkewerUnit then add picked unit to SkewerGroup and SkewerInteger = SkewerInteger +1. The problem is that it seems that even with this SkewerGroup seems to be always empty, what is happening?.
 
Level 1
Joined
Jun 13, 2008
Messages
132
  • Time - Every 0.01 seconds of game time
  • Acciones
    • Set TempPoint = (Position of SkewerUnit)
    • Set SkewerReal = (Angle from TempPoint to SkewerPoint)
    • Set TempPoint2 = (TempPoint offset by 9.50 towards SkewerReal degrees)
    • Unidad - Move SkewerUnit instantly to TempPoint2
    • Set TempGroup = (Units within 125.00 of TempPoint matching ((((Matching unit) is Un ancestro) Igual a False) and ((((Matching unit) is Mecánica) Igual a False) and ((((Matching unit) is alive) Igual a True) and ((((Matching player) is an enemy of (Owner of SkewerUnit)) Igua
    • Grupo de unidad - Pick every unit in TempGroup and do (Actions)
      • Bucle: Acciones
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • Si: Condiciones
            • SkewerInteger Menor que (1 x (Level of Skewer for SkewerUnit))
          • Entonces: Acciones
            • Grupo de unidad - Add (Picked unit) to SkewerGroup
            • Set SkewerInteger = (SkewerInteger + 1)
          • Otros: Acciones
    • Grupo de unidad - Pick every unit in SkewerGroup and do (Actions)
      • Bucle: Acciones
        • Unidad - Move (Picked unit) instantly to TempPoint2
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Si: Condiciones
        • (Distance between SkewerPoint and TempPoint) Menor que o igual a 100.00
      • Entonces: Acciones
        • Detonador - Turn off (This trigger)
        • Unidad - Turn collision for SkewerUnit Encendido
        • Grupo de unidad - Pick every unit in SkewerGroup and do (Actions)
          • Bucle: Acciones
            • Custom script: call RemoveLocation (udg_TempPoint)
            • Set TempPoint = (Position of (Picked unit))
            • Unidad - Cause SkewerUnit to damage (Picked unit), dealing (70.00 x (Real((Level of Skewer for SkewerUnit)))) damage of attack type Conjuros and damage type Normal
            • Unidad - Create 1 Dummy for (Owner of SkewerUnit) at TempPoint facing Vista edificio predeterminada degrees
            • Unidad - Add a 2.00 second Genérico expiration timer to (Last created unit)
            • Unidad - Add Skewer ( Dummy ) to (Last created unit)
            • Unidad - Set level of Skewer ( Dummy ) for (Last created unit) to (Level of Skewer for SkewerUnit)
            • Unidad - Order (Last created unit) to Muerto viviente Nigromante: Tullido (Picked unit)
            • Custom script: call RemoveLocation (udg_TempPoint)
      • Otros: Acciones
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Si: Condiciones
        • (SkewerUnit is dead) Igual a True
      • Entonces: Acciones
        • Detonador - Turn off (This trigger)
        • Unidad - Turn collision for SkewerUnit Encendido
        • Grupo de unidad - Pick every unit in SkewerGroup and do (Actions)
          • Bucle: Acciones
            • Custom script: call RemoveLocation (udg_TempPoint)
            • Set TempPoint = (Position of (Picked unit))
            • Unidad - Cause SkewerUnit to damage (Picked unit), dealing (70.00 x (Real((Level of Skewer for SkewerUnit)))) damage of attack type Conjuros and damage type Normal
            • Unidad - Create 1 Dummy for (Owner of SkewerUnit) at TempPoint facing Vista edificio predeterminada degrees
            • Unidad - Add a 2.00 second Genérico expiration timer to (Last created unit)
            • Unidad - Add Skewer ( Dummy ) to (Last created unit)
            • Unidad - Set level of Skewer ( Dummy ) for (Last created unit) to (Level of Skewer for SkewerUnit)
            • Unidad - Order (Last created unit) to Muerto viviente Nigromante: Tullido (Picked unit)
            • Custom script: call RemoveLocation (udg_TempPoint)
      • Otros: Acciones
    • Custom script: call DestroyGroup (udg_TempGroup)
    • Custom script: call RemoveLocation (udg_TempPoint)
    • Custom script: call RemoveLocation (udg_TempPoint2)
 
Level 1
Joined
Jun 13, 2008
Messages
132
This is the first trigger, it creates the group:

  • Unit - A unit Starts the effect of an ability
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • Si: Condiciones
      • (Ability being cast) Igual a Skewer
    • Entonces: Acciones
      • Custom script: call DestroyGroup (udg_SkewerGroup)
      • Custom script: call RemoveLocation (udg_SkewerPoint)
      • Set SkewerUnit = (Triggering unit)
      • Set TempPoint = (Position of SkewerUnit)
      • Set SkewerPoint = (Target point of ability being cast)
      • Set SkewerInteger = 0
      • Unidad - Turn collision for SkewerUnit Apagado
      • Set SkewerGroup = (Units within 125.00 of TempPoint matching ((((Matching unit) is Un ancestro) Igual a False) and ((((Matching unit) is Mecánica) Igual a False) and ((((Matching unit) is alive) Igual a True) and (((Owner of (Matching unit)) is an enemy of (Owner of SkewerUni
      • Detonador - Turn on Skewer 2 <gen>
      • Custom script: call RemoveLocation (udg_TempPoint)
    • Otros: Acciones
 
Status
Not open for further replies.
Top