• 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] Please tell how to do with this

Status
Not open for further replies.
Level 5
Joined
Feb 18, 2009
Messages
123
Sorry for asking again
i have some problem with my trigger spell again

1. here the first trigger [SOLVED]

  • Mass Hypnosis
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Mass Hypnosis
    • Actions
      • Set MassHypnosis_point = (Position of (Triggering unit))
      • Set MassHypnosis_target = (Units within (260.00 + (40.00 x (Real((Level of Mass Hypnosis for (Triggering unit)))))) of MassHypnosis_point matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Dead) Equal to False)) and (((Owner of (Matching unit)) is a
      • Unit Group - Pick every unit in MassHypnosis_target and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing (270.0) degrees
          • Unit - Add Mass Hypnosis to (Last created unit)
          • Unit - Set level of Mass Hypnosis for (Last created unit) to (Level of Mass Hypnosis for (Triggering unit))
          • Unit - Order (Last created unit) to Undead Banshee - Curse (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Unit-type of (Triggering unit)) Equal to Aizen Sosuke (Hogyoku 1)) or ((Unit-type of (Triggering unit)) Equal to Aizen Sosuke (Hogyoku 2))
        • Then - Actions
          • Unit Group - Pick every unit in MassHypnosis_target and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing (270.0) degrees
              • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
              • Hero - Create Hogyoku Illusion2 and give it to (Last created unit)
              • Hero - Order (Last created unit) to use (Last created item) on (Picked unit)
        • Else - Actions
      • Custom script: call DestroyGroup(udg_MassHypnosis_target)
      • Custom script: call RemoveLocation(udg_MassHypnosis_point)
  • [/HIDDEN]
  • some time the given item is appear i don't know what happened
  • 2. the second, [HIDDEN=2]
  • [TRIGGER]Howling
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Guard Skill : Howling
    • Actions
      • Set Howlcast = (Triggering unit)
      • Animation - Play Howlcast's spell animation
      • Unit - Create 1 Howling Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
      • Unit - Turn collision for (Last created unit) Off
      • Unit - Move (Last created unit) instantly to (Position of (Triggering unit))
      • Set HowlSE = (Last created unit)
      • Trigger - Turn on Howling effect <gen>
      • Trigger - Turn off Hand Sonic <gen>
i use the dummy unit as a special effect because it looks better than normal special effect
  • Howling effect
    • Events
      • Time - Every 0.25 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Dummy Unit for (Owner of Howlcast) at (Position of Howlcast) facing Default building facing (270.0) degrees
      • Unit - Add Howling slow to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Unit Group - Pick every unit in (Units within 400.00 of (Position of Howlcast) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) belongs to an enemy of (Owner of Howlcast)) Equal to True))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to Howltarget
      • Unit Group - Pick every unit in Howltarget and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Level of Guard Skill : Howling for Howlcast) Not equal to 0
                  • (Level of Guard Skill : Howling for Howlcast) Less than 5
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Guard Skill : Howling for Howlcast) Less than or equal to 2
                • Then - Actions
                  • Unit - Cause Howlcast to damage (Picked unit), dealing ((Real((Agility of Howlcast (Include bonuses)))) / 5.00) damage of attack type Spells and damage type Normal
                  • Unit Group - Remove (Picked unit) from Howltarget
                • Else - Actions
                  • Unit - Cause Howlcast to damage (Picked unit), dealing ((Real((Agility of Howlcast (Include bonuses)))) / 4.00) damage of attack type Spells and damage type Normal
                  • Unit Group - Remove (Picked unit) from Howltarget
            • Else - Actions
              • Unit - Cause Howlcast to damage (Picked unit), dealing ((Real((Agility of Howlcast (Include bonuses)))) / 3.00) damage of attack type Spells and damage type Normal
              • Unit Group - Remove (Picked unit) from Howltarget
  • Howling Stop
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Guard Skill : Howling
    • Actions
      • Trigger - Turn off Howling effect <gen>
      • Unit Group - Pick every unit in Howltarget and do (Unit Group - Remove (Picked unit) from Howltarget)
      • Unit - Remove HowlSE from the game
      • Trigger - Turn on Hand Sonic <gen>
this triggers is supposed to damage and slow enemy unit near the caster while the caster channeling, but i want to make the skill affect the enemy near his illusions after he uses a mirror image ability and then use the channeling skill, the special effect should be appear at the illusion's position
how to do that?

3. the third

  • Implant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Implant Hogyoku
    • Actions
      • Trigger - Turn off (This trigger)
      • Set Implant_Point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at Implant_Point facing Default building facing (270.0) degrees
      • Unit - Add Henshin! to (Last created unit)
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Set Implant_Effect = (Last created special effect)
      • Set Implant_Target = (Units within 300.00 of Implant_Point matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and ((((Matching unit) is Dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of (
      • Unit Group - Pick every unit in Implant_Target and do (Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by -100.00 towards (Distance between (Position of (Triggering unit)) and (Position of (Picked unit))) degrees))
      • Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
      • Set Implant_Effect2 = (Last created special effect)
      • Special Effect - Destroy Implant_Effect
      • Special Effect - Destroy Implant_Effect2
      • Wait until ((((Triggering unit) has buff Implanted Hogyoku 2nd phase ) Equal to False) or (((Triggering unit) has buff Implanted Hogyoku 3rd phase ) Equal to False)), checking every 0.10 seconds
      • Trigger - Turn on (This trigger)
      • Custom script: call DestroyGroup(udg_Implant_Target)
      • Custom script: call RemoveLocation(udg_Implant_Point)
this is a trigger to create special effect and slow the enemy unit nearby the caster upon cast the skill base is Metamorphosis, and yes the caster is transformed, but the trigger is still occurred when the caster transformed back, why?

4. the fourth [SOLVED]

  • Hand Sonic
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacked unit) has buff Hand Sonic ) Equal to True
          • (Random integer number between 1 and 100) Less than or equal to 20
    • Actions
      • Set HandSonic_point = (Position of (Triggering unit))
      • Set HandSonic_target = (Units within 300.00 of HandSonic_point matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Triggering unit) is A structure) Equal to False)))
      • Animation - Play (Attacked unit)'s spell slam animation
      • Unit Group - Pick every unit in HandSonic_target and do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
          • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in HandSonic_target and do (Unit - Cause (Attacked unit) to damage (Picked unit), dealing ((5.00 x (Real((Level of (Triggering unit))))) + (1.00 x (Real((Agility of (Triggering unit) (Include bonuses)))))) damage of attack type Spells and damage type Normal)
      • Custom script: call DestroyGroup(udg_HandSonic_target)
      • Custom script: call RemoveLocation(udg_HandSonic_point)

this is a skill that look like Axe's Counter Helix in DotA but, the Special effect doesn't appear

5. the last [IMPOSSIBLE]
can i give an illusion a passive ability with trigger?

sorry if i asking too much but i hope you can solve it, thanks
 
Last edited:
Level 10
Joined
Sep 19, 2011
Messages
527
1º Trigger:

Remove the "Custom script: call DestroyGroup(udg_MassHypnosis_target)". Put it in the bottom of the trigger.

And, don't use Casting Unit, use Trigger Unit instead.

Don't use "Do Nothing" action.

2º: I don't understand what you want.

3º: Don't use Waits.
¿Why you turn off the trigger and then turn on?

You need to read what timers are, Wait is not recommended.

5º: No?, I think that you can't.

You've a lot of leaks, read this: http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/complete-list-things-leak-126761/

And, also you need to read about MUI spells: http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/hashtables-mui-133407/

Timers are good too :): http://www.hiveworkshop.com/forums/...stanceabilty-timers-custom-values-more-96460/

I don't know if these tutorials are updated, but it's an start.

Greetings.
 
Level 5
Joined
Feb 18, 2009
Messages
123
1º Trigger:

Remove the "Custom script: call DestroyGroup(udg_MassHypnosis_target)". Put it in the bottom of the trigger.

And, don't use Casting Unit, use Trigger Unit instead.

Don't use "Do Nothing" action.
Why i can't use do nothing, and if else action is do nothing then it will do nothing didn't it?
2º: I don't understand what you want.
so, my hero has an ability to create some illusion, what i want is to make the illusions do the same thing and same effect when the hero casts a spell

3º: Don't use Waits.
¿Why you turn off the trigger and then turn on?

You need to read what timers are, Wait is not recommended.
ok i will remove the wait, and i turn the trigger on and off because its occurred when the unit metamorphed back too

i will deal with the leaks later after the trigger functioned properly

note : triggers in no.4 edited
 
Level 10
Joined
Sep 19, 2011
Messages
527
Why i can't use do nothing, and if else action is do nothing then it will do nothing didn't it?

Because it's useless.

so, my hero has an ability to create some illusion, what i want is to make the illusions do the same thing and same effect when the hero casts a spell

Maybe you can create a dummy unit an use it like an illusion.

---

Don't destroy your groups, only clean it.
 
  • Unit Group - Pick every unit in MassHypnosis_target and do (Actions)
    • Loop - Actions
      • Unit - Create 1 Dummy Unit for (Owner of (Triggering unit)) at (Position of (Picked unit)) facing Default building facing (270.0) degrees
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Hero - Create Hogyoku Illusion2 and give it to (Last created unit)
      • Hero - Order (Last created unit) to use (Last created item) on (Picked unit)
      • Custom script: call DestroyGroup(udg_MassHypnosis_target)
Here is one problem. You're destroying the group during enumeration.
You should destroy it after enumeration else this will only work for the first unit.
So, move the DestroyGroup call outside of the block.

Also, remove the Do Nothing, it just adds to the filesize and slows down the processor.

About the second trigger, you have to store the illusions in a unit array and use those units instead of the caster in the rest of the trigger (Unless you wanna get the level data and attributes)

For the third one, I don't know.

For the fourth trigger, it's because you aren't creating the special effect.
Also, you never have to wait before you destroy a special effect.
If you create an effect and then destroy it instantly, the effect will show and it will be destroyed when it finishes.
 
Level 5
Joined
Feb 18, 2009
Messages
123
i have create the SE look carefully below
  • Unit Group - Pick every unit in HandSonic_target and do (Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\MissileDeath.mdl)
  • Trigger - Run SFX Destroy <gen> (ignoring conditions)
  • Unit Group - Pick every unit in HandSonic_target and do (Unit - Cause (Attacked unit) to damage (Picked unit), dealing (100.00 + (Real((Agility of (Attacked unit) (Include bonuses))))) damage of attack type Spells and damage type Normal)
  • Custom script: call DestroyGroup(udg_HandSonic_target)
  • Custom script: call RemoveLocation(udg_HandSonic_point)
about the second trigger what should i set on the array?
 
  • Unit Group - Pick every unit in HandSonic_target and do (Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\MissileDeath.mdl)
  • Trigger - Run SFX Destroy <gen> (ignoring conditions)
This wouldn't work if you set it up like that.
It would only destroy one special effect.
You should do this:
  • Unit Group - Pick every unit in HandSonic_target and do (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\MissileDeath.mdl)
      • Special Effect - Destroy (Last created special effect)
About the second trigger, now that I can think clearly, I realized that I understood you wrong. Could you rephrase this:
this triggers is supposed to damage and slow enemy unit near the caster while the caster channeling, but i want to make the skill affect the enemy near his illusions after he uses a mirror image ability and then use the channeling skill, the special effect should be appear at the illusion's position
how to do that?
 
Level 5
Joined
Feb 18, 2009
Messages
123
so, my hero has an ability to create some illusion, what i want is to make the illusions do the same thing and same effect when the hero casts a spell
 
Oh!
What you have to do is:
When he casts the illusions spell, store the units in a hashtable with Key(Triggering unit) (meaning the caster)
And when you cast this spell, load the units from the hashtable (his illusions) and order them to cast the spell)
But you have to check if the units are available else you will hit an infinite loop.
To check if the illusions are available, load them from the hashtable using Key(Triggering unit) as an index and check if their HP is greater than 0. (Null units have 0 hp)
If the units are available, order them to cast the spell.
This won't cause an infinite loop because the illusions' instances of the spell won't order anything to cast the spell since loading the units from the hashtable using their keys would return null.
 
Status
Not open for further replies.
Top