Complex spell help, + rep for help

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
ok... so i need help with a sort of complex ability
if you played wow its like the shatter one from gruuls layer

on cast, it searches for enemies in a 10 range radius
creates a persistent for each one that applies a slowing debuff for 5% 4x/sec for 5 seconds (till 100%), then it stuns them for 1.5 seconds, and deals 10% of nearby enemies total health as damage to them
basically it requires that they spread out to not take a ton of damage

this is what i currently have:
Trigger:
  • Shatter (Abil)
    • Actors
      • Shatter (Explosion Actor)
        • -damage artwork
      • Shatter (Range)
        • -displays a 3 range radius around units with the shatter debuff so that they know what allies they will damage
      • Shatter (Slow Actor)
        • -psi disruptor model displaying the slowing effect
    • Behaviors
      • Shatter (Debuff)
        • -Slows the unit by 5% stacking 20 times over 4 seconds
      • Shatter (Stun)
        • -Disables attack, movement, production, and casting for 1.5 seconds
    • Buttons
      • Shatter
        • -Shatter button with tooltip and everything.
    • Effects
      • Shatter (Apply Debuff)
        • -Apply behavior Shatter (Debuff)
      • Shatter (Apply Stun)
        • -Apply behavior Shatter (Stun)
      • Shatter (Damage Search)
        • -Searches around the stunned units
      • Shatter (Damage)
        • -Deals damage to nearby stunned units
      • Shatter (Persistent)
        • -Periodic effect of Shatter (Apply Debuff)
      • Shatter (Remove Debuff)
        • -Final Effect of Shatter (Persistent) removes all 20 stacks of Shatter (Debuff)
      • Shatter (Search)
        • -Searches units in range of the caster
      • Shatter (Set)
        • -runs Shatter (Apply Stun), creates Shatter (Stun Persistent), and Shatter (Remove Debuff)
      • Shatter (Stun Pers Destroy)
        • -Destroys Shatter (Stun Persistent)
      • Shatter (Stun Pers Set)
        • -runs Shatter (Damage Search) and Shatter (Stun Pers Destroy)
      • Shatter (Stun Persistent)
        • -After 1.5 seconds, this runs Shatter (Stun Pers Set)
    • Models
      • Psi Disruptor Debuff
      • TerranLargeTriggeredExplosion
 

Attachments

  • Shatter Spell Test.SC2Map
    173.1 KB · Views: 177

Monsterous

In the Shadows, Lurking.
Reaction score
99
Heres how i would do it.

Ability Cast > Search Area around caster, range 10 > Create persistent, 20 periods, interval of 0.25 seconds > Apply Behavior Effect > Behavior with stack enabled, times movement speed of target by 0.95 (5%).

On the persistent, the FINAL effect will be a set effect, one with the apply behavior which adds the stun, and the other a damage effect. Make the damage effect do 0 damage (Its a dummy effect.)

Now, do the rest in the trigger editor.
Your Trigger
Trigger:
  • Your Trigger
    • Events
      • Environment - Player Any Player uses Effect [YOUR EFFECT GAME LINK]
    • Local Variables
      • Health Damage = 0.0 <Real>
    • Conditions
    • Actions
      • Unit Group - Pick each unit in (Any units in (Region((Point((X of (Position of (Triggering Effect Unit(Target)))), (Y of (Position of (Triggering Effect Unit(Target)))))), 5.0)) owned by player Any Player matching [TARGET FILTERS], with at most Any Amount) and do (Actions)
        • Actions
          • Variable - Set Health Damage = (Health Damage + ((Triggering Effect Unit(Target)) Life (Default)))
      • Environment - Deal damage using [YOUR DUMMY EFFECT] on (Triggering Effect Unit(Target)) from (Triggering Effect Unit(Target)) with (Health Damage / 10.0) extra damage
      • Unit - Remove All [SLOW BEHAVIOR] from (Triggering Effect Unit(Target))




This trigger uses your dummy effect as an event and point of reference, where it searches nearby around the target for other targets, adds their health to a variable, and then divides it by 10 (to get 10%) and deals the damage.
It also removes the slow behavior debuffs, so you don't have to do that in the data editor.

The reason why this is far easier to do this in the trigger editor, is that the effects use hard numbers, not variables, whereas the trigger does use variables - saving you alot of time and hassle trying to make this data editor only.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i can do anything in the trigger editor, i was doing this to challenge my data editor capabilities
it cant search the caster to apply the slow, it has to search it once, and apply a periodic to all units that adds the slow, its a boss ability

thanks for your help tho :)
+rep
 

Dave312

Censored for your safe viewing
Reaction score
269
it cant search the caster to apply the slow, it has to search it once, and apply a periodic to all units that adds the slow, its a boss ability
What Monsterous suggested would only search once. It does the search at the start and applies the persistant effect. The persistant effect is what applies the slow behaviour over time.

I would be doing it the same way as what Monsterous suggested.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
the second search is to deal aoe damage at the end of it
not to search for the units again

cast
search for enemies to apply the persistent that does the debuff
after they hit 100% slow, remove the debuff, stun them, wait 1.5 secs
deal 10% max health in damage to units near them
so if you are near 10 enemies, instakill, 5, half life, etc
impossible to do without 2 searches if you dont use triggers, i dont want to use any triggers
as i said this is a test for my data editing skillz

realized i was a little vague in the original post, it doesnt apply the slow debuff at all
thats the issue
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
While trying to make it 100% data editor might be a good way to approach problems, you have to learn when it's time to give up and involve triggers. I wouldn't trigger the whole thing but just the damage as Monsterous explained.

It's very hard to that kind of variable damage that depends on the nearby units health.

If you really want to do it 100% data editor, it becomes a lot more ugly than if you would just do everything but the damage part in data.

Here's what I would try if you want to do it 100% data editor. Keep in mind that I haven't really thought this through and it's very unlikely to actually work, I just want to give you some place to start.

So let's imagine we actually think of it like: When a unit takes damage equal to 10% of the nearby enemies total health, the nearby enemies actually DAMAGE the unit.

This way, we would need to do a search and have each unit deal 10% of their total health to the target.

The problem is how we want to deal 10% of the total health since we can only write in something constant like: "5" in the damage field. Therefore I would do something that deals damage several times.

I think you could create a new unit through effects, set it's vitals to the unit that's going to deal the damage and then have a persistent that deals 1 damage to the correct unit and 10 to itself. This way, it will have dealt 10% of it's current health to the unit before it dies.

As I said, it's ugly and stupid and probably not possible, but it's what I would try if I had to make it 100% data.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top