• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] Ball of death

Status
Not open for further replies.
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
 
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.
 
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?
 
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 --------
 
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.
Back
Top