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

Damage + Heal Trigger Problem

Status
Not open for further replies.
Level 4
Joined
May 8, 2007
Messages
70
Hi all
i have a problem with one of my triggers.

The plan: I want create a spell that heals frindly Targets and deals damage to enemy Targets. So i created this Trigger here:
  • - Holy Paladin 5
    • Events:
      • Unit - A unit Begins casting an ability
    • Conditions:
      • Unit - A unit Begins casting an ability
    • Actions:
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to - Holy Paladin 5
        • Then - Actions
          • Set PALA_Caster = (Casting unit)
          • Unit Group - Pick every unit in (Units within 600.00 of (Position of PALA_Caster) matching ((Owner of (Picked unit)) Equal to Neutral Hostile)) and do (Actions)
            • Loop - Actions
              • Unit - Cause PALA_Caster to damage (Picked unit), dealing ((Real((Intelligence of PALA_Caster (Include bonuses)))) x 3.00) damage of attack type Spells and damage type Normal
          • Wait 0.01 seconds
          • Unit Group - Pick every unit in (Units within 600.00 of (Position of PALA_Caster) matching ((Owner of (Picked unit)) Equal to (Local player))) and do (Actions)
            • Loop - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Intelligence of PALA_Caster (Include bonuses)))) x 2.00))
        • Else - Actions
          • Do nothing
So now i have try this ingame but the enemies dont get damage and my frindly targets dont get any heal :sad:

Maybe someone know, what i do wrong or i can do better that this trigger works.
 
Level 10
Joined
Jun 16, 2007
Messages
415
The entire trigger doesnt make any sense, why do you have that wait and why assign the Caster to a variable instead of just saying Triggering Unit, why use Picked unit when matchin units, where the actual command is Matching Unit and there is no such thing as local player in gui and why are u checking for enemy units to be neutral passive, it will only target creeps then.


OMG THIS IS MY 100TH POST!
 
Level 4
Joined
May 8, 2007
Messages
70
I dont understand why you say the trigger doesn't make any sense...

The wait... sry but i dont think thats the problem now, but when u wanna i will remove it

I create a variable for the caster, because the caster have more then one spell and there are much more caster than this one and when i use "Triggering Unit" I! think maybe when more Units use a spell nearly same time, one doesn't work because there's not only ONE triggering Unit

And i know that "Neutral Hostile" are creeps
And i dont understand what you mean with the "Local Player" sry
 
Level 3
Joined
Apr 19, 2008
Messages
36
ill make the spell for u, just tell me 1 thing, wat kind of spell is the actual spell? is it a no target Aoe? eg thunder clap?

either that or u could just use the Blizzard spell 'Death Coil' In Object Editor>Ability Editor>Undead>Heroes> Death Coil.

but ud have to make the basically every unit that will ever be effected by the spell in the map, go to their data and use Unit Classification-TICK UNDEAD

gl with ur spell
 
Last edited:
Level 8
Joined
Jun 25, 2007
Messages
165
Ok I have your trigger its work. I have do a little change and I the the problem was the wait, you can add some condition like only undead...
  • Protector
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Heal/damage
    • Actions
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit))) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to TRUE
            • Then - Actions
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Real((Intelligence of (Casting unit) (Include bonuses)))) x 3.00) damage of attack type Spells and damage type Normal
            • Else - Actions
              • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to FALSE
            • Then - Actions
              • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Intelligence of (Casting unit) (Include bonuses)))) x 2.00))
            • Else - Actions
              • Do nothing
(Scuse me if there are some mistake in trigger, hard to change french to english).
 
Status
Not open for further replies.
Top