• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Annoying trigger

Status
Not open for further replies.
Level 7
Joined
Aug 29, 2007
Messages
336
Yet again I call for trigger help. The following is the tooltip of the spell I'm making.
medallionofcourage.gif

Medallion of Disturbance
The medallion, given to Frine by his father, has the ability to break any spell near the medallion's wearer. Studying this medallion might reveal more powers. Level 1 - Silences nearby enemy units. Level 2 - Silences nearby enemy units and decreases nearby enemy units' armor. Level 3 - Silences nearby enemy units, decreases nearby enemy units' armor and heals the wearer.
... and here is the trigger for it:
  • MoD 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Medallion of Disturbance
    • Actions
      • Set MoD_Caster = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 1
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 2
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Add Howl of Terror (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Unit - Order DUMMY to Neutral Pit Lord - Howl Of Terror
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 3
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Add Howl of Terror (Dummy) to DUMMY
          • Unit - Add Heal (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Unit - Order DUMMY to Human Priest - Heal MoD_Caster
          • Unit - Order DUMMY to Neutral Pit Lord - Howl Of Terror
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
and I have tried to make individual triggers for each level.
 
Last edited:
Level 9
Joined
Oct 22, 2006
Messages
599
- Sorry, I'm too sleepy to see the solution, but I got a tip for you. Repost the whole trigger by right-clicking on the trigger-name (Above Events) and select "Copy as Text". Paste it here in the trigger tags.

PS: It would be best if you edited your first post.
 
Level 15
Joined
Aug 11, 2009
Messages
1,606
Well,i think the trigger isn't completed.Yes you are storing the postions and casting unit to variables and then creating a dummy unit there,then you order dummy to silence this area.Only to silence....I guess this would only match the lvl1 part of your ability.In order to do the rest 2 lvls just add more order to dummy.

P.S. About the spell,with the spell you are currently using i think you will need 3 different triggers for each lvl,you could do this with 1 trigger using a better formula.

AND the -Do Nothing,actually does nothing.Remove the command.
 
Level 7
Joined
Aug 29, 2007
Messages
336
The trigger first posted was only meant to work for lvl 1. But since it doesn't even cast the silence I thought that the problem was located elsewhere than the dummy's trigger casting.
*First post updated with full trigger*
 
Level 9
Joined
Oct 22, 2006
Messages
599
Yet again I call for trigger help. The following is the tooltip of the spell I'm making.
... and here is the trigger for it:
  • MoD 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Medallion of Disturbance
    • Actions
      • Set MoD_Caster = (Casting unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 1
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 2
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Add Howl of Terror (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Unit - Order DUMMY to Neutral Pit Lord - Howl Of Terror
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Medallion of Disturbance for MoD_Caster) Equal to 3
        • Then - Actions
          • Set MoD_Area = (Position of MoD_Caster)
          • Unit - Create 1 DUMMY for Player 6 (Orange) at MoD_Area facing Default building facing degrees
          • Set DUMMY = (Last created unit)
          • Unit - Add a 2.00 second Generic expiration timer to DUMMY
          • Unit - Add Silence (Dummy) to DUMMY
          • Unit - Add Howl of Terror (Dummy) to DUMMY
          • Unit - Add Heal (Dummy) to DUMMY
          • Unit - Order DUMMY to Neutral Dark Ranger - Silence MoD_Area
          • Unit - Order DUMMY to Human Priest - Heal MoD_Caster
          • Unit - Order DUMMY to Neutral Pit Lord - Howl Of Terror
          • Custom script: call RemoveLocation(udg_MoD_Area)
        • Else - Actions
and I have tried to make individual triggers for each level.

Why do you set the DUMMY in a variable? Remove that. You can also move the actions that will happen at all levels (e.g.create 1 dummy...)before the conditions, saving space. Also what EXACTLY do you need help with?
 
Level 7
Joined
Aug 29, 2007
Messages
336
Lol. For some reason it started working when I created the dummy before if/then/else :p Well thanks for the help +rep
*SOLVED*
 
Status
Not open for further replies.
Top