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

[Trigger] Soul Burn on heros

Status
Not open for further replies.
Level 13
Joined
Mar 13, 2013
Messages
299
I'm trying to get soul burn to do more damage to heroes, but the same amount of damage it currently does to regular units. I suspect triggers are the only way of doing this. I don't want to use a DDS or anything... any ideas?

These are the triggers I have for it thus far:

  • Soul Burn init
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Soul Burn
    • Actions
      • Set SoulBurn[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
  • Soul Burn
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Soul Burn
          • (Unit-type of (Casting unit)) Equal to Firelord
          • (SoulBurn[(Player number of (Owner of (Casting unit)))] is A Hero) Equal to True
    • Actions
      • Unit - Remove Soul Burn buff from SoulBurn[(Player number of (Owner of (Casting unit)))]
      • Unit - Create 1 GargoylePL for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
      • Unit - Set level of Soul BurnG for (Last created unit) to (Level of Soul Burn for (Casting unit))
      • Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn SoulBurn[(Player number of (Owner of (Casting unit)))]
      • Unit - Remove (Last created unit) from the game
GargoylePL is a gargoyle with a version of Soul Burn (called "Soul BurnG") that does the damage I want it to do.
The variable SoulBurn is a unit array.
 
Level 25
Joined
May 11, 2007
Messages
4,650
Use a unit starts the effect of an ability.
You can keep it all in one trigger.

Why check if the caster is a hero when the spell itself is only casted by heroes?
Why check if it's a Firelord who casts it? Shouldn't the spell work the same for all heroes? It's you who set who's casting the spell, nobody else.

Also instead of removing your temp unit, set it's timed life to ~1.5 seconds, that way it has a few milliseconds to cast the spell instead of being created, casting the spell and then being removed before any effect has been done.
 
Level 13
Joined
Mar 13, 2013
Messages
299
Use a unit starts the effect of an ability.
the problem is then it might be triggered when the effects start of my 'dummy unit's ability as well, leading to an infinite loop.


Why check if the caster is a hero when the spell itself is only casted by heroes?
SoulBurn is a unit array that, in this case, contains the target unit
Why check if it's a Firelord who casts it? Shouldn't the spell work the same for all heroes?
same as the first
 
Level 25
Joined
May 11, 2007
Messages
4,650
Scratch everything, just do this:

Event: A unit starts the effect of an ability
Conditions: ability being cast = soul burn
Actions: if boolean(target of ability being cast == hero) == true:
set tempPoint1 = position of target of ability being cast
create 1 dummy unit for player (owner of triggering unit at tempPoint1)
unit - add timed life water elemental 2 seconds
unit issue last created unit to damage target of ability being cast dealing XX damage.

Voilá, heroes take bonus damage while regular units take the normal damage.
 
Status
Not open for further replies.
Top