• 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] 3 Part Trigger Problem

Status
Not open for further replies.
Level 4
Joined
Jun 4, 2009
Messages
52
Hello, I have 3 triggers that don't work.
This first on is supposed to damage units within x range of the player with the skill, but I can't seem to figure out how to make it work.

(This first part turns on the second trigger, for the first problem)
Trigger 1, Part 1
  • Healing Aura Start
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Healing Aura (Erratic Magic Man)
    • Actions
      • Trigger - Turn on Healing Aura <gen>
Trigger 1, Part 2 (Initially off)
  • Healing Aura
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Spell_Heal_Aura_Temp_Point = (Position of (Triggering unit))
      • Set Spell_Heal_Aura_Temp_Level = (Level of Healing Aura (Erratic Magic Man) for (Triggering unit))
      • Set Spell_Heal_Aura_Temp_Enemy = (Units within ((Real(Spell_Heal_Temp_Level)) x 300.00) of Spell_Heal_Temp_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal
      • Set Spell_Heal_Aura_Temp_AmountDam = (Spell_Heal_Temp_Level x 50)
      • Unit Group - Pick every unit in Spell_Heal_Temp_Enemy_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Real(Spell_Heal_Temp_AmountDamage)) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_Spell_Heal_Aura_Temp_Enemy)
      • Custom script: call RemoveLocation(udg_Spell_Heal_Aura_Temp_Point)


This trigger is supposed to give gold to all players within 1500 range of the killing unit as well as experience; it only gives experience.

Trigger 2
  • Level 1 Unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Zombie - Level 1
    • Actions
      • Set Gold_Temp = (Random integer number between 10 and 20)
      • Set Exp_Temp = (Random integer number between 10 and 20)
      • Set Gold_Exp_Temp_Group = (Units within 1500.00 of (Position of (Killing unit)) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of (Killing unit))) Equal to True)))
      • Unit Group - Pick every unit in Gold_Exp_Temp_Group and do (Actions)
        • Loop - Actions
          • Player - Add Gold_Temp to (Matching player) Current gold
          • Floating Text - Create floating text that reads (String(Gold_Temp)) above (Picked unit) with Z offset 60.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
          • Hero - Add Exp_Temp experience to (Picked unit), Show level-up graphics
          • Floating Text - Create floating text that reads (String(Exp_Temp)) above (Picked unit) with Z offset 100.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
      • Custom script: call DestroyGroup(udg_Gold_Exp_Temp_Group)


This third trigger is supposed to add an icon to a hero because he has a skill that was initially a unit skill; the skill doesn't show up after you pick it.

Trigger 3
  • Spell 001
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Unit-type of (Learning Hero)) Equal to Erratic Magic Man
    • Actions
      • Unit Group - Add (Learning Hero) to UnitGroup_HealingAura
      • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Hero - Learn skill for (Picked unit): Healing Aura (Erratic Magic Man - icon)) else do (Do nothing)
      • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Unit - Set level of Healing Aura (Erratic Magic Man - icon) for (Triggering unit) to 1) else do (Do nothing)


Any / all help is appreciated and will be rewarded; thanks!
 
Level 20
Joined
Jul 6, 2009
Messages
1,885
In second trigger,you use Triggering unit which doesn't exist,atleast it's not defined. At first trigger,you must set a unit variable to the triggering unit and then use it in trigger 2. In trigger 2,you add gold to Matching player,undefined again. Use 'Add gold to Owner of Picked unit'.
For third trigger...i'm not sure what you want to achieve. A unit skill should be visible...
 
Level 4
Joined
Jun 4, 2009
Messages
52
The unit is added to a "Unit" variable.
But, it still doesn't do the damage it should.

Trigger 1, Part 1:
  • Healing Aura Start
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Healing Aura (Erratic Magic Man)
    • Actions
      • Set Spell_Heal_Aura_Trig_Unit = (Triggering unit)
      • Trigger - Turn on Healing Aura <gen>
Trigger 1, Part 2 (Initially off):
  • Healing Aura
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Spell_Heal_Aura_Temp_Point = (Position of Spell_Heal_Aura_Trig_Unit)
      • Set Spell_Heal_Aura_Temp_Level = (Level of Healing Aura (Erratic Magic Man) for Spell_Heal_Aura_Trig_Unit)
      • Set Spell_Heal_Aura_Temp_Enemy = (Units within ((Real(Spell_Heal_Temp_Level)) x 300.00) of Spell_Heal_Temp_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Spell_Heal_Aura_
      • Set Spell_Heal_Aura_Temp_AmountDam = (Spell_Heal_Temp_Level x 50)
      • Unit Group - Pick every unit in Spell_Heal_Temp_Enemy_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause Spell_Heal_Aura_Trig_Unit to damage (Picked unit), dealing (Real(Spell_Heal_Temp_AmountDamage)) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_Spell_Heal_Aura_Temp_Enemy)
      • Custom script: call RemoveLocation(udg_Spell_Heal_Aura_Temp_Point)
Still gives experience only; no gold given.
Trigger 2:
  • Level 1 Unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Zombie - Level 1
    • Actions
      • Set Gold_Temp = (Random integer number between 10 and 20)
      • Set Exp_Temp = (Random integer number between 10 and 20)
      • Set Gold_Exp_Temp_Group = (Units within 1500.00 of (Position of (Killing unit)) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of (Killing unit))) Equal to True)))
      • Unit Group - Pick every unit in Gold_Exp_Temp_Group and do (Actions)
        • Loop - Actions
          • Player - Add Gold_Temp to (Picked player) Current gold
          • Floating Text - Create floating text that reads (String(Gold_Temp)) above (Picked unit) with Z offset 60.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
          • Hero - Add Exp_Temp experience to (Picked unit), Show level-up graphics
          • Floating Text - Create floating text that reads (String(Exp_Temp)) above (Picked unit) with Z offset 100.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
      • Custom script: call DestroyGroup(udg_Gold_Exp_Temp_Group)

The hero does not have a skill icon for this skill when he picks it. I was told this is similar to SA's (Stealth Assassin (Riki)) ultimate in DotA.
This ultimate is a unit ability and it triggered to show; the code below is what my friend gave me to show the icon, but it doesn't work.

Trigger 3:
  • Spell 001
  • Events
  • Unit - A unit Learns a skill
  • Conditions
  • (Unit-type of (Learning Hero)) Equal to Erratic Magic Man
  • Actions
  • Unit Group - Add (Learning Hero) to UnitGroup_HealingAura
  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Hero - Learn skill for (Picked unit): Healing Aura (Erratic Magic Man - icon)) else do (Do nothing)
  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Unit - Set level of Healing Aura (Erratic Magic Man - icon) for (Triggering unit) to 1) else do (Do nothing)
 
Level 5
Joined
Nov 30, 2010
Messages
184
I have no idea what your third triggers suppose to do. Dota's SA's ultimate is based of permanent invisibility from a neutral hostile.

Problem With trigger 2. For the action that gives gold to the player, use Owner of Picked unit NOT PICKED PLAYER...

There doesn't seem to be a problem with trigger one but 50 damage per second? I pity the zombies...

Edit: for the first trigger of trigger 1, use learning unit instead of triggering unit for the set spell_heal_aura_trig_unit action.
 
Level 12
Joined
Apr 4, 2010
Messages
862
The unit is added to a "Unit" variable.
But, it still doesn't do the damage it should.

Trigger 1, Part 1:
  • Healing Aura Start
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Healing Aura (Erratic Magic Man)
    • Actions
      • Set Spell_Heal_Aura_Trig_Unit = (Triggering unit)
      • Trigger - Turn on Healing Aura <gen>
Trigger 1, Part 2 (Initially off):
  • Healing Aura
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Spell_Heal_Aura_Temp_Point = (Position of Spell_Heal_Aura_Trig_Unit)
      • Set Spell_Heal_Aura_Temp_Level = (Level of Healing Aura (Erratic Magic Man) for Spell_Heal_Aura_Trig_Unit)
      • Set Spell_Heal_Aura_Temp_Enemy = (Units within ((Real(Spell_Heal_Temp_Level)) x 300.00) of Spell_Heal_Temp_Point matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of Spell_Heal_Aura_
      • Set Spell_Heal_Aura_Temp_AmountDam = (Spell_Heal_Temp_Level x 50)
      • Unit Group - Pick every unit in Spell_Heal_Temp_Enemy_Group and do (Actions)
        • Loop - Actions
          • Unit - Cause Spell_Heal_Aura_Trig_Unit to damage (Picked unit), dealing (Real(Spell_Heal_Temp_AmountDamage)) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_Spell_Heal_Aura_Temp_Enemy)
      • Custom script: call RemoveLocation(udg_Spell_Heal_Aura_Temp_Point)
Still gives experience only; no gold given.
Trigger 2:
  • Level 1 Unit
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Zombie - Level 1
    • Actions
      • Set Gold_Temp = (Random integer number between 10 and 20)
      • Set Exp_Temp = (Random integer number between 10 and 20)
      • Set Gold_Exp_Temp_Group = (Units within 1500.00 of (Position of (Killing unit)) matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) belongs to an ally of (Owner of (Killing unit))) Equal to True)))
      • Unit Group - Pick every unit in Gold_Exp_Temp_Group and do (Actions)
        • Loop - Actions
          • Player - Add Gold_Temp to (Picked player) Current gold
          • Floating Text - Create floating text that reads (String(Gold_Temp)) above (Picked unit) with Z offset 60.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
          • Hero - Add Exp_Temp experience to (Picked unit), Show level-up graphics
          • Floating Text - Create floating text that reads (String(Exp_Temp)) above (Picked unit) with Z offset 100.00, using font size 10.00, color (0.00%, 100.00%, 0.00%), and 15.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 1.70 seconds
      • Custom script: call DestroyGroup(udg_Gold_Exp_Temp_Group)

The hero does not have a skill icon for this skill when he picks it. I was told this is similar to SA's (Stealth Assassin (Riki)) ultimate in DotA.
This ultimate is a unit ability and it triggered to show; the code below is what my friend gave me to show the icon, but it doesn't work.

Trigger 3:
  • Spell 001
  • Events
  • Unit - A unit Learns a skill
  • Conditions
  • (Unit-type of (Learning Hero)) Equal to Erratic Magic Man
  • Actions
  • Unit Group - Add (Learning Hero) to UnitGroup_HealingAura
  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Hero - Learn skill for (Picked unit): Healing Aura (Erratic Magic Man - icon)) else do (Do nothing)
  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Unit - Set level of Healing Aura (Erratic Magic Man - icon) for (Triggering unit) to 1) else do (Do nothing)

2) its not picked player, its owner of picked unit, don't rush or u will miss out such things.
3) careless mistakes are careless... picked unit came out from nowhere.
 
Level 8
Joined
Dec 12, 2010
Messages
280
  • Player - Add Gold_Temp to (Picked player) Current gold
I agree with crabman this line here should read owner of picked unit not picked player.

  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Hero - Learn skill for (Picked unit): Healing Aura (Erratic Magic Man - icon)) else do (Do nothing)
This line should read learn skill for learning hero not picked unit. Also Macnuggets is right you can't use learn skill for a hero that doesn't have the ability.
But you can use unit - Add Ablility Looks like this:
  • Unit - Add Attribute Bonus to (Triggering unit)

  • If ((Level of Healing Aura (Erratic Magic Man) for (Learning Hero)) Equal to 1) then do (Unit - Set level of Healing Aura (Erratic Magic Man - icon) for (Triggering unit) to 1) else do (Do nothing)
This trigger here is useless since when learning a new skill it would already be at level one.
 
Level 4
Joined
Jun 4, 2009
Messages
52
Thanks for the help guys.
Most of the problems were using a variable for another trigger.
The only last thing is that the unit ability (made into a hero ability) still doesn't show.
 
Level 5
Joined
Nov 30, 2010
Messages
184
Oh...
YOU CAN'T GIVE A HERO AN UNIT ABILITY FOR GOODNESS SAKE!!!
and with that I rest my case.

Edit: oops.
Sorry I didn't read your post right my computer bugged up
Sorry for the stuff above

Edit2: check if you did change the skill to a hero ability
It's most likely you didn't
Also, are you still using trigger 3 to do the skill icon and stuff?

Edit3: and what skill are you making with the unit ability? Permanent invisibility?
 
Level 8
Joined
Dec 12, 2010
Messages
280
Hey Macnuggets all Heros in WC3 have unit ablilities, all night elf heros have Ultravision a unit ability. Even the hero inventory is a unit ability :D

Thanks for the help guys.
Most of the problems were using a variable for another trigger.
The only last thing is that the unit ability (made into a hero ability) still doesn't show.

Copy the trigger from the editor and paste it here so we can see the trigger your currently using. The one that adds the ability to the hero.

If your still using the spell 001 trigger from above the action should look like this:
  • If ((Level of Healing Aura (Erratic magic man) for (Learning Hero)) Equal to 1) then do (Unit - Add Healing Aura (Erratic magic man - icon) to (Learning Hero)) else do (Do nothing)
 
Level 7
Joined
Dec 8, 2008
Messages
243
Please update your main post so people know what to help you on without reading through the entire thread. Here's a trigger similar to your gold & xp

  • Gold and XP System
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Owner of (Dying unit)) Equal to Player 12 (Brown)
          • (Owner of (Dying unit)) Equal to Neutral Hostile
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Ling (Spider Attack)
          • (Unit-type of (Dying unit)) Equal to Fleshmound Spawn
        • Then - Actions
        • Else - Actions
          • Set DegreesRandom[0] = (Random real number between 0.00 and 359.00)
          • Set DegreesRandom[1] = (Random real number between 0.00 and 359.00)
          • Set GiveUnitLocation = (Position of (Dying unit))
          • Set GiveGroup = (Units within 1100.00 of GiveUnitLocation matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is in (Units owned by Player 1 (Red))) Equal to True) or ((((Matching unit) is in (Units owned by Player 2 (Blue))) Equal to True) or (((Matc
          • Set GiveXP = (Random integer number between ((Level of (Dying unit)) x 2) and ((Level of (Dying unit)) x 3))
          • Set GiveGP = ((Random integer number between ((Level of (Dying unit)) + 7) and ((Level of (Dying unit)) + 20)) / 2)
          • Unit Group - Pick every unit in GiveGroup and do (Actions)
            • Loop - Actions
              • Hero - Add GiveXP experience to (Picked unit), Show level-up graphics
              • Floating Text - Create floating text that reads (+ + ((String(GiveXP)) + xp)) above (Picked unit) with Z offset 0.00, using font size 8.00, color (55.00%, 99.00%, 55.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards DegreesRandom[0] degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • -------- -- --------
              • Player - Set (Owner of (Picked unit)) Current gold to (((Owner of (Picked unit)) Current gold) + GiveGP)
              • Floating Text - Create floating text that reads (+ + ((String(GiveGP)) + gold)) above (Picked unit) with Z offset 0.00, using font size 8.00, color (100.00%, 80.00%, 20.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 60.00 towards DegreesRandom[1] degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the fading age of (Last created floating text) to 1.50 seconds
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
          • Custom script: call DestroyGroup(udg_GiveGroup)
          • Custom script: call RemoveLocation(udg_GiveUnitLocation)
          • Set GiveXP = 0
          • Set GiveGP = 0
I'll review the other triggers in a momen.
 
Status
Not open for further replies.
Top