• 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.

[Spell] Ball of death

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2011
Messages
326
Hi hive, me again. Okay i need help with trigger

The idea was to make a frost ball that moves towards targeted point when cast (i know how to make that but). For every unit it hits deals damage and shoots bolts at units in 500Aoe or so with smaller damage. (not the hitted unit ofc)
So for each unit that it hits shoots bolts at enemies around and deals smaller damage.

So all help appreciated
 

EdgeOfChaos

E

EdgeOfChaos

Pick every unit within 90 or so of the ice ball matching the condition that it's an enemy. Pick all units in 500 AoE of that second unit and make a dummy that shoots the bolt at every selected unit.
 
Level 8
Joined
Nov 9, 2011
Messages
326
Pick every unit within 90 or so of the ice ball matching the condition that it's an enemy. Pick all units in 500 AoE of that second unit and make a dummy that shoots the bolt at every selected unit.

so 2 groups then? and can i put those groups Group1[ARRAYED] to check for each INDEX if the player have been dealt dmg and for other group can i just use tempGroup and delete it after the bolts have been fired?
 

EdgeOfChaos

E

EdgeOfChaos

You don't need to use any group variables. Just type:
set bj_wantDestroyGroup=true
before you dynamically create a unit group and it takes care of the leak just fine.

You can nest the two groups in each other, like...
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • -------- TempUnit is the ball of death --------
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 90.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup=true
          • Unit Group - Pick every unit in (Units within 512.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))) and do (Actions)
            • Loop - Actions
              • -------- shoot ice --------
 
Level 8
Joined
Nov 9, 2011
Messages
326
You don't need to use any group variables. Just type:
set bj_wantDestroyGroup=true
before you dynamically create a unit group and it takes care of the leak just fine.

You can nest the two groups in each other, like...
  • Untitled Trigger 001
    • Events
    • Conditions
    • Actions
      • -------- TempUnit is the ball of death --------
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units within 90.00 of TempPoint matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Set TempPoint = (Position of (Picked unit))
          • Custom script: set bj_wantDestroyGroup=true
          • Unit Group - Pick every unit in (Units within 512.00 of TempPoint2 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))) and do (Actions)
            • Loop - Actions
              • -------- shoot ice --------
Thanks man
 
Status
Not open for further replies.
Top