[Help] AoE spell trigger.

Zonagle

New Member
Reaction score
1
So, what I'm after is this.

The unit casts the ability, he gains some holy aura around him(SFX) it lasts 15 seconds. During those 15 seconds, any unit that comes within say, 500 of the hero, is struck with a holy bolt at 3 second intervals, creating a special effect at the location of the struck unit. It's not a channel spell, so the hero would be able to move around while it was active.

Any help would be more than welcome!

Edit: I'd assume you'd need to have two spells, and two triggers. The first spell would activate the first trigger, which would create a dummy unit, who'd then cast the spell at any enemy within 500, checking every 3 seconds. I'm still not really sure how to trigger this.
 

lh2705

Just another Helper
Reaction score
111
Firstly, make the ability based off "Berserk" or "Unholy Fever"(I forgot what it was called)
Set everything to 0 so that you gain no bonus damage or attack speed from the ability.
Set the duration to 15 as you wanted.
Now go make a new buff based off whichever ability you chose.
Just change the effects of the buff and the description as well.
Go back to the ability and replace the default buff with the new buff you made.

Code:
Holy Bolt

Events
   Every 3.00 seconds of game time
Conditions
Actions
   Set UnitGroup1 = Units in entire map matching condition matching unit has buff Holy Aura equal to true
   Unit Group - Pick every unit in UnitGroup1 and do actions
      -Loop
         Set Caster = Picked Unit
         Set Casterloc = Position of Picked Unit
         Set UnitGroup2 = Units within 500 range of Caster matching condition matching unit is alive equal to true and matching unit belongs to an ally of Caster equal to false
         Unit Group - Pick every unit in UnitGroup2 and do actions
            -Loop
               Unit - Create 1 Dummy at Casterloc facing Picked Unit
               Unit - Add a 3 second generic expiration timer to last created unit
               Unit - Add Holy Bolt(dummy) to last created unit
               Unit - Order last created unit to Holy Bolt picked unit
         Custom Script : call DestroyGroup(udg_UnitGroup2)
         Custom Script : call RemoveLocation(udg_Casterloc)
   Custom Script : call DestroyGroup(udg_UnitGroup1)

Should be something like that..
I wasn't too sure about your "special effect at the location of the struck unit"
 

X.Terror.X

New Member
Reaction score
10
cant u just let a dummy unit cast starfall with holy light strikes then u got the strikes not on the same moment and the idea is then to move instantly the unit constantly o nthe hero so create dummy none.mdl
[ i dont know if move instant cancels the ability]
mvby u can try its simple and might work
 

Zonagle

New Member
Reaction score
1
Firstly, make the ability based off "Berserk" or "Unholy Fever"(I forgot what it was called)
Set everything to 0 so that you gain no bonus damage or attack speed from the ability.
Set the duration to 15 as you wanted.
Now go make a new buff based off whichever ability you chose.
Just change the effects of the buff and the description as well.
Go back to the ability and replace the default buff with the new buff you made.

Code:
Holy Bolt

Events
   Every 3.00 seconds of game time
Conditions
Actions
   Set UnitGroup1 = Units in entire map matching condition matching unit has buff Holy Aura equal to true
   Unit Group - Pick every unit in UnitGroup1 and do actions
      -Loop
         Set Caster = Picked Unit
         Set Casterloc = Position of Picked Unit
         Set UnitGroup2 = Units within 500 range of Caster matching condition matching unit is alive equal to true and matching unit belongs to an ally of Caster equal to false
         Unit Group - Pick every unit in UnitGroup2 and do actions
            -Loop
               Unit - Create 1 Dummy at Casterloc facing Picked Unit
               Unit - Add a 3 second generic expiration timer to last created unit
               Unit - Add Holy Bolt(dummy) to last created unit
               Unit - Order last created unit to Holy Bolt picked unit
         Custom Script : call DestroyGroup(udg_UnitGroup2)
         Custom Script : call RemoveLocation(udg_Casterloc)
   Custom Script : call DestroyGroup(udg_UnitGroup1)

Should be something like that..
I wasn't too sure about your "special effect at the location of the struck unit"

What do you mean, not too sure? As in, not sure what I meant, or not sure how to go about it?

When a unit is struck by the Holy Strike/blast/whatever, I wanted to create a spell graphic above their head, of the spell Holy Light.

Edit: Would it work, to have a trigger activate that trigger you made? Eg.

Event - A unit begins the effect of an ability
Condition - Ability = berserk
Action - Turn on your trigger.

Otherwise, the timing might mess up, yeah? It counts 3 seconds all the time. So if it was going 1 2 3, 1 2 3, 1 2 3, and you cast the ability at say, 2 seconds, it'd be slightly off. Then obviously you'd need to add a way for your trigger to turn off after 15 seconds. Would a buff check work? In action, If unit has buff - Holy Nova, do whatever, else turn off this trigger. Also, do we need the dummy with this trigger? Couldn't we just have the caster deal damage directly to the enemies around him?

Updating with triggers.
Trigger:
  • Spell1
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to |cffffd700Holy Judgement|r
    • Actions
      • Trigger - Turn on Spell2 <gen>


Turns on the next trigger.

Trigger:
  • Spell2
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set Holy_Judgement_CasterGrp = (Units in (Playable map area) matching (((Matching unit) has buff Holy Judgement Buff ) Equal to True))
      • Unit Group - Pick every unit in Holy_Judgement_CasterGrp and do (Actions)
        • Loop - Actions
          • Set Holy_Judgement_Caster = (Picked unit)
          • Set Holy_Judgement_CasterLoc = (Position of Holy_Judgement_Caster)
          • Set Holy_Judgement_DamageGrp = (Units within 1000.00 of Holy_Judgement_CasterLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an ally of (Owner of Holy_Judgement_Caster)) Equal to False)))
          • Unit Group - Pick every unit in Holy_Judgement_DamageGrp and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (((Picked unit) is alive) Equal to True) and (((Picked unit) belongs to an ally of (Owner of Holy_Judgement_Caster)) Equal to False)
                  • (Holy_Judgement_Caster has buff Holy Judgement Buff ) Equal to True
                • Then - Actions
                  • Unit - Cause Holy_Judgement_Caster to damage (Picked unit), dealing 10.00 damage of attack type Chaos and damage type Divine
                  • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call DestroyGroup(udg_Holy_Judgement_DamageGrp)
                  • Custom script: call RemoveLocation(udg_Holy_Judgement_CasterLoc)
                • Else - Actions
                  • Trigger - Turn off (This trigger)
          • Custom script: call DestroyGroup(udg_Holy_Judgement_CasterGrp)


I realize I check that the units within 1000 yards are alive and not an ally, but hey, as far as I can tell, this trigger functions exactly like I wanted it to. Thanks for all your help, lh2705.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top