• 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] Cannot work

Status
Not open for further replies.
Level 6
Joined
Nov 24, 2012
Messages
198
I make the trigger like this
  • Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Sun Bombardment
    • Actions
      • Set SB_Caster = (Triggering unit)
      • Set SB_Caster_pos = (Position of (Triggering unit))
      • Unit Group - Add SB_Caster to SB_Caster_Group
      • Unit Group - Pick every unit in (Units within 500.00 of SB_Caster_pos matching ((((Triggering unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Triggering unit) is in SB_Caster_Group) Equal to False))) and do (Actions)
        • Loop - Actions
          • Set SB_target_pos = (Position of (Picked unit))
          • Set SB_taget_unit = (Picked unit)
          • Special Effect - Create a special effect attached to the chest of SB_taget_unit using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 SB Dummy unit for Neutral Hostile at SB_target_pos facing Default building facing degrees
          • Special Effect - Create a special effect attached to the origin of SB_taget_unit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause (Last created unit) to damage SB_taget_unit, dealing 300.00 damage of attack type Spells and damage type Fire
The problem is why is not working?:goblin_jawdrop:
Help me and post trigger too,tnx:ogre_haosis:
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
  • Unit Group - Pick every unit in (Units within 500.00 of SB_Caster_pos matching ((((Triggering unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Triggering unit) is in SB_Caster_Group) Equal to False))) and do (Actions)
Change all (Triggering unit) to (Matching unit) except, don't change the (Owner of (Triggering unit)).

It will look something like this:
  • Unit Group - Pick every unit in (Units within 500.00 of SB_Caster_pos matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to False) and (((Matching unit) is in SB_Caster_Group) Equal to False))) and do (Actions)
 
Oh, also, you should change any further (Triggering unit) references to SB_Caster. And, you also leak at the create dummy unit function.

Also, is the unit casting this a hero or just a normal unit? If it's a hero, make sure to change the damage source to SB_Caster.

Anyway, I combined defskull's suggestion and a few of my changes. I think this is right.

  • Cast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Sun Bombardment
    • Actions
      • Set SB_Caster = (Triggering unit)
      • Set SB_Caster_pos = (Position of (SB_Caster))
      • Unit Group - Add SB_Caster to SB_Caster_Group
      • Unit Group - Pick every unit in (Units within 500.00 of SB_Caster_pos matching ((((Matching unit) belongs to an ally of (Owner of (SB_Caster))) Equal to False) and (((Matching unit) is in SB_Caster_Group) Equal to False))) and do (Actions)
        • Loop - Actions
          • Set SB_target_pos = (Position of (Picked unit))
          • Set SB_taget_unit = (Picked unit)
          • Special Effect - Create a special effect attached to the chest of SB_taget_unit using Abilities\Spells\Undead\DarkRitual\DarkRitualCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Create 1 SB Dummy unit for Neutral Hostile at SB_target_pos facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_SB_target_pos)
          • Special Effect - Create a special effect attached to the origin of SB_taget_unit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Unit - Cause (Last created unit) to damage SB_taget_unit, dealing 300.00 damage of attack type Spells and damage type Fire
 
Status
Not open for further replies.
Top