• 🏆 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!

Trigger not working help please

Status
Not open for further replies.
Level 13
Joined
Jun 3, 2011
Messages
1,058
hi guys i want to ask why does this trigger dosen't restict anyone? from getting a certain spell hmmmm i have set the condition to warrior only but i tried a mage to learn the mortal strike and after a sec a noticed that the mortal strike was in the mages skills i duno why can you guys help me?
  • Mortal Strike Learned
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Hero manipulating item)) Equal to Heroes_1st_Job[1]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
        • Then - Actions
          • Set Units = (Triggering unit)
          • Set Ability[(Player number of (Owner of Units))] = Mortal Strike
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 1
            • Then - Actions
              • Unit - Add Ability[(Player number of (Owner of Units))] to Units
              • Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: Mortal Strike Learn...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 3
                • Then - Actions
                  • Unit - Increase level of Ability[(Player number of (Owner of Units))] for Units
                  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (Mortal Strike's Level + ( is + ( + (String((Level of Mortal Strike for Units))))))
                • Else - Actions
                  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: This spell is alrea...
                  • Player - Add 1 to (Owner of Units) Current lumber
        • Else - Actions
          • Game - Display to (All players) for 5.00 seconds the text: |cff6d6d6dThis spel...
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
i did that's why i use the heroes 1st job[1] is set to my warrior
  • (Unit-type of (Hero manipulating item)) Equal to Heroes_1st_Job[1]
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
  • (Unit-type of (Hero manipulating item)) Equal to Heroes_1st_Job[1]
  • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
is this correct? if not can you make me a example trigger?
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
  • (Unit-type of (Hero manipulating item)) Equal to Heroes_1st_Job[1]
  • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
is this correct? if not can you make me a example trigger?

  • (Unit-type of (triggering unit)) Equal to Heroes_1st_Job[1]
  • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
this is the right way. look at the difference unit type of triggering unit. you cant get a unit type of an item.
 
Level 13
Joined
Jun 3, 2011
Messages
1,058
  • (Unit-type of (triggering unit)) Equal to Heroes_1st_Job[1]
  • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
this is the right way. look at the difference unit type of triggering unit. you cant get a unit type of an item.

Hmmm i get it let me try :)

  • Mortal Strike Learned
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to Defender
              • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
        • Then - Actions
          • Set Units = (Triggering unit)
          • Set Ability[(Player number of (Owner of Units))] = Mortal Strike
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 1
            • Then - Actions
              • Unit - Add Ability[(Player number of (Owner of Units))] to Units
              • Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: Mortal Strike Learn...
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 3
                • Then - Actions
                  • Unit - Increase level of Ability[(Player number of (Owner of Units))] for Units
                  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (Mortal Strike's Level + ( is + ( + (String((Level of Mortal Strike for Units))))))
                • Else - Actions
                  • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: This spell is alrea...
                  • Player - Add 1 to (Owner of Units) Current lumber
        • Else - Actions
          • Game - Display to (All players) for 5.00 seconds the text: |cff6d6d6dThis spel...
 
Last edited:
Level 13
Joined
Jun 3, 2011
Messages
1,058
still not working :(
  • Mortal Strike Learned
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Defender
          • (Item-type of (Item being manipulated)) Equal to [|cffffd700Q|r] - |cff90ee90Mortal Strike|r
    • Actions
      • Set Units = (Triggering unit)
      • Set Ability[(Player number of (Owner of Units))] = Mortal Strike
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 1
        • Then - Actions
          • Unit - Add Ability[(Player number of (Owner of Units))] to Units
          • Game - Display to (Player group((Owner of Units))) for 10.00 seconds the text: Mortal Strike Learn...
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Ability[(Player number of (Owner of Units))] for Units) Less than 3
            • Then - Actions
              • Unit - Increase level of Ability[(Player number of (Owner of Units))] for Units
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: (Mortal Strike's Level + ( is + ( + (String((Level of Mortal Strike for Units))))))
            • Else - Actions
              • Game - Display to (Player group((Owner of Units))) for 5.00 seconds the text: This spell is alrea...
              • Player - Add 1 to (Owner of Units) Current lumber
 
Status
Not open for further replies.
Top