[Spell] Get units attacked by a unit with fire orb

Status
Not open for further replies.

Ardenian

A

Ardenian

Hello,

I have an idea for a spell and therefore I would like to know, how do I get all units damaged by a unit having a fire orb and therefore being hit by splash damage ?
I would like to not use a DDS, but keeping it as simple as possible, preferable something everyone can write.

Any ideas ? I would be glad to get some :)
 
Level 12
Joined
May 22, 2015
Messages
1,051
Sadly, the easiest way to do this IS with DDS. You can do a simple one in GUI if you don't want to learn JASS or deal with importing a library, but it could very easily get very bloated. Improper use of the "Unit is damaged" event can cause a lot of lag as well, since it can happen very often.

The triggers you need would look something like this:
  • Add Start Units
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set tempGroup = Units in (<Playable map area>)
    • Unit Group - Pick every unit in (tempGroup) and do:
      • Trigger - Add event (Unit - (Picked unit) takes damage) to Damage Detection
  • Add New Units
  • Events
    • Unit - A unit enters <Playable Map Area>
  • Conditions
  • Actions
    • Trigger - Add event (Unit - (Triggering unit) takes damage) to Damage Detection
  • Damage Detection
  • Events
  • Conditions
  • Actions
    • Do anything you want when a unit takes damage
For the easiest solution with this effect, I recommend making a custom orb effect. Base it off of Orb of Corruption. Make the armour modifier 0 and the duration 0.01. Make the buff your own custom buff that you don't use anywhere else.

Then, in the Damage Detection trigger, add:
  • If ((Triggering unit) has buff (custom buff)) then
    • Unit - Remove (custom buff) from (Triggering unit)
    • Do anything you want with your custom orb effect
You would have to trigger in the damage from the orb of fire effect if you want to keep it. But then you can also apply all the other effects you want.
 
Status
Not open for further replies.
Top