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

Custom Feral Spirit. Trigger problem.

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Hello, Hive!

I am working on a Hero right now and I've ran into a problem with one of his spells - Feral Spirit. Basically it's the original Feral Spirit spell, but it adds healing on the attacks of the wolves. Here is what I wanted to achieve:

• Feral Spirits must always heal the Far Seer no matter where he is.
• Feral Spirits heal allied units within 150 range of the attacked target.
• Feral Spirits cannot heal themselves. One Spirit can heal the other, but not itself.

The problem I ran into is that the Feral Spirits heal the Far Seer not only when they attack, but also when they are attacked. I've spent hours and hours to find the problem, but so far - no luck. I'll post the triggers now and after that I will explain what I thought that could be the problem, but isn't.

Here is the trigger where I set the Far_Seer variable.
[trigger=""]FS Setup
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Feral Spirit (Far Seer)
Actions
Set Far_Seer = (Triggering unit)
[/trigger]


Here is trigger one of the Damage Configuration.
[trigger=""]FS Configuration
Events
Map initialization
Conditions
Actions
Set FS_Config_Group = (Units in (Playable map area))
Unit Group - Pick every unit in FS_Config_Group and do (Actions)
Loop - Actions
Trigger - Add to FS Heal <gen> the event (Unit - (Picked unit) Takes damage)
Custom script: call DestroyGroup(udg_FS_Config_Group)
[/trigger]


Here is trigger two of the Damage Configuration.
[trigger=""]FS Configuration 2
Events
Unit - A unit enters (Playable map area)
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Not equal to Spirit Wolf (Level 1)
(Unit-type of (Triggering unit)) Not equal to Dire Wolf (Level 2)
(Unit-type of (Triggering unit)) Not equal to Shadow Wolf (Level 3)
(Unit-type of (Triggering unit)) Not equal to Elemental Wolf (Level 4)
Actions
Trigger - Add to FS Heal <gen> the event (Unit - (Triggering unit) Takes damage)
[/trigger]


And here is the actual effect trigger.
[trigger=""]FS Heal
Events
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
(Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
(Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
(Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
Actions
-------- HEAL FAR SEER --------
Set Heal_FeralSpirit_Amount = ((0.00 + (5.00 x (Real((Level of Feral Spirit (Far Seer) for Far_Seer))))) + (0.25 x (Real((Intelligence of Far_Seer (Include bonuses))))))
Unit - Set life of Far_Seer to ((Life of Far_Seer) + Heal_FeralSpirit_Amount)
Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above Far_Seer with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
-------- HEAL AOE --------
Set FeralSpirit_Point = (Position of (Triggering unit))
Set FeralSpirit_Group = (Units within 150.00 of FeralSpirit_Point matching ((((Matching unit) belongs to an ally of (Owner of (Damage source))) Equal to True) and (((Unit-type of (Matching unit)) Not equal to |c00ffff99Far Seer|r) and (((Matching unit) Not equal to (Damage source))
Unit Group - Pick every unit in FeralSpirit_Group and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + Heal_FeralSpirit_Amount)
Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Custom script: call RemoveLocation(udg_FeralSpirit_Point)
Custom script: call DestroyGroup(udg_FeralSpirit_Group)
[/trigger]


Here is what came to my mind:

• Maybe another trigger makes it so when Feral Spirits are attacked to heal the Far Seer. Checked, this isn't the issue.
• I played with the conditions countless of times. None seem to work.
• I've tried the system without the AoE heal once, and the second time without the Far Seer heal. This isn't the issue.

Just as a side note. Here is a very simple trigger that has almost the same effect. It works perfectly. Events are added in same manner as shown above.

[trigger=""]Demonic Bond
Events
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Damage source)) Equal to Felguard (Level 2)
(Unit-type of (Damage source)) Equal to Felguard (Level 3)
(Unit-type of (Damage source)) Equal to Felguard (Level 4)
Actions
Set Heal_DemonicBond_Amount = (0.30 x (Real((Integer((Damage taken))))))
Unit - Set life of Warlock to ((Life of Warlock) + Heal_DemonicBond_Amount)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Heal_DemonicBond_Amount Greater than or equal to 1.00
Then - Actions
Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_DemonicBond_Amount))))) above Warlock with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
Floating Text - Hide (Last created floating text) for (All players matching (((Matching player) Not equal to (Owner of Warlock)) and (((Matching player) Not equal to Neutral Hostile) and ((Matching player) Not equal to Player 12 (Brown)))))
Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
Else - Actions
[/trigger]
 
Last edited:

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
Well, basically the problem is here:
  • FS Configuration 2
  • Events
  • Unit - A unit enters (Playable map area)
  • Conditions
  • Actions
  • Trigger - Add to FS Heal <gen> the event (Unit - (Entering unit) Takes damage)
If a spirit enters in the map he will be registered in the event :D so you have to put conditions of the spirits unit type. By the way, change Entering unit to triggering unit, it's way faster.
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Well, basically the problem is here:
  • FS Configuration 2
  • Events
  • Unit - A unit enters (Playable map area)
  • Conditions
  • Actions
  • Trigger - Add to FS Heal <gen> the event (Unit - (Entering unit) Takes damage)
If a spirit enters in the map he will be registered in the event :D so you have to put conditions of the spirits unit type. By the way, change Entering unit to triggering unit, it's way faster.

It used to have conditions. Still didn't work. Besides I have the conditions in the FS Heal trigger.

EDIT: It's updated with conditions now. Still heals far seer when the Spirits are attacked.
 
Last edited:

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Then try to add conditions on FS Heal trigger like
  • (Unit-type of (Attacked unit) Not equal to Spirit Wolf (Level 1)
but as "and conditions"

Attacked Unit? The event is:
  • Trigger - Add to FS Heal <gen> the event (Unit - (Triggering unit) Takes damage)
It will do nothing.

I have this:
  • Or - Any (Conditions) are true
    • Conditions
      • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
      • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
      • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
      • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
Updated trigger with "Triggering Unit" instead of "Entering Unit".
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Changed it to this:

  • FS Heal
    • Events
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
          • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
          • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
          • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
    • Actions
      • -------- HEAL FAR SEER --------
      • Set Heal_FeralSpirit_Amount = ((0.00 + (5.00 x (Real((Level of Feral Spirit (Far Seer) for Far_Seer))))) + (0.25 x (Real((Intelligence of Far_Seer (Include bonuses))))))
      • Unit - Set life of Far_Seer to ((Life of Far_Seer) + Heal_FeralSpirit_Amount)
      • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above Far_Seer with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • -------- HEAL AOE --------
      • Set FeralSpirit_Point = (Position of (Triggering unit))
      • Set FeralSpirit_Group = (Units within 150.00 of FeralSpirit_Point matching ((((Matching unit) belongs to an ally of (Owner of (Damage source))) Equal to True) and (((Unit-type of (Matching unit)) Not equal to |c00ffff99Far Seer|r) and (((Matching unit) Not equal to (Damage source))
      • Unit Group - Pick every unit in FeralSpirit_Group and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + Heal_FeralSpirit_Amount)
          • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • Custom script: call RemoveLocation(udg_FeralSpirit_Point)
      • Custom script: call DestroyGroup(udg_FeralSpirit_Group)
Problem still persists.
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
No no, besides this:
  • Conditions
  • Or - Any (Conditions) are true
    • Conditions
      • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
      • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
      • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
      • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
Add that part of conditions:
  • Conditions
  • And - All (Conditions) are true
    • Conditions
      • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
      • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
      • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
      • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
=
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
        • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
        • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
        • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
    • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
    • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
    • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
    • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
Understand? xD
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Chaged into this: No result. :/
  • FS Heal
    • Events
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
              • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
              • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
              • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
          • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
          • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
          • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
          • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
    • Actions
      • -------- HEAL FAR SEER --------
      • Set Heal_FeralSpirit_Amount = ((0.00 + (5.00 x (Real((Level of Feral Spirit (Far Seer) for Far_Seer))))) + (0.25 x (Real((Intelligence of Far_Seer (Include bonuses))))))
      • Unit - Set life of Far_Seer to ((Life of Far_Seer) + Heal_FeralSpirit_Amount)
      • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above Far_Seer with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • -------- HEAL AOE --------
      • Set FeralSpirit_Point = (Position of (Triggering unit))
      • Set FeralSpirit_Group = (Units within 150.00 of FeralSpirit_Point matching ((((Matching unit) belongs to an ally of (Owner of (Damage source))) Equal to True) and (((Unit-type of (Matching unit)) Not equal to |c00ffff99Far Seer|r) and (((Matching unit) Not equal to (Damage source))
      • Unit Group - Pick every unit in FeralSpirit_Group and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + Heal_FeralSpirit_Amount)
          • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • Custom script: call RemoveLocation(udg_FeralSpirit_Point)
      • Custom script: call DestroyGroup(udg_FeralSpirit_Group)
  • [/hidden]
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
        • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
        • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
        • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
    • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
    • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
    • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
    • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
It's this, but you're doing it wrong :/
 

SpasMaster

Hosted Project: SC
Level 24
Joined
Jan 29, 2010
Messages
1,986
Nope. Still doesn't work :/
  • FS Heal
    • Events
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Damage source)) Equal to Spirit Wolf (Level 1)
          • (Unit-type of (Damage source)) Equal to Dire Wolf (Level 2)
          • (Unit-type of (Damage source)) Equal to Shadow Wolf (Level 3)
          • (Unit-type of (Damage source)) Equal to Elemental Wolf (Level 4)
      • (Unit-type of (Attacked unit)) Not equal to Spirit Wolf (Level 1)
      • (Unit-type of (Attacked unit)) Not equal to Dire Wolf (Level 2)
      • (Unit-type of (Attacked unit)) Not equal to Shadow Wolf (Level 3)
      • (Unit-type of (Attacked unit)) Not equal to Elemental Wolf (Level 4)
    • Actions
      • -------- HEAL FAR SEER --------
      • Set Heal_FeralSpirit_Amount = ((0.00 + (5.00 x (Real((Level of Feral Spirit (Far Seer) for Far_Seer))))) + (0.25 x (Real((Intelligence of Far_Seer (Include bonuses))))))
      • Unit - Set life of Far_Seer to ((Life of Far_Seer) + Heal_FeralSpirit_Amount)
      • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above Far_Seer with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • -------- HEAL AOE --------
      • Set FeralSpirit_Point = (Position of (Triggering unit))
      • Set FeralSpirit_Group = (Units within 150.00 of FeralSpirit_Point matching ((((Matching unit) belongs to an ally of (Owner of (Damage source))) Equal to True) and (((Unit-type of (Matching unit)) Not equal to |c00ffff99Far Seer|r) and (((Matching unit) Not equal to (Damage source))
      • Unit Group - Pick every unit in FeralSpirit_Group and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + Heal_FeralSpirit_Amount)
          • Floating Text - Create floating text that reads (|c0010db0a+ + (String((Integer(Heal_FeralSpirit_Amount))))) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 45.00 and 135.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.30 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
      • Custom script: call RemoveLocation(udg_FeralSpirit_Point)
      • Custom script: call DestroyGroup(udg_FeralSpirit_Group)
  • [/hidden]
 
Status
Not open for further replies.
Top