• 🏆 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] Another Item Restriction Issue...

Status
Not open for further replies.
Level 6
Joined
Mar 6, 2006
Messages
169
I ran into yet another issue just now.

Until now, I've only tested the map myself, and only as a Knight, so when I tested the map just a few minutes ago with another player, the result were that the Guardian couldnt pick up axes (permanent)

For some reason, the Trigger works for the Knight, but not for the Guardian, and I would assume it doesnt work for the Librarian and Dragoon classes either.

Here's the trigger, I got it from the other Item restriction issue thread. What can I do to fix it?

Edit: Just to make it clear, All Class restricted items are PERMANENT, whilst all other items are Miscellaneous.

  • Item Restriction
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Permanent
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Knight
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Animators Blade
              • (Item-type of (Item being manipulated)) Equal to Broadsword
              • (Item-type of (Item being manipulated)) Equal to Crystalsword
              • (Item-type of (Item being manipulated)) Equal to Death's Will
              • (Item-type of (Item being manipulated)) Equal to Fierce Sword
              • (Item-type of (Item being manipulated)) Equal to Glimmering Sword
              • (Item-type of (Item being manipulated)) Equal to Knight's Blade
              • (Item-type of (Item being manipulated)) Equal to Patriarch Blade
              • (Item-type of (Item being manipulated)) Equal to Quick Blade
              • (Item-type of (Item being manipulated)) Equal to Reaper's Executioner
              • (Item-type of (Item being manipulated)) Equal to Ezkalibael, the Dead
              • (Item-type of (Item being manipulated)) Equal to Kabot, the Silencer
              • (Item-type of (Item being manipulated)) Equal to Immolator, the Reaper
              • (Item-type of (Item being manipulated)) Equal to Arcis, the World Bearer
              • (Item-type of (Item being manipulated)) Equal to Khall's Runed Blade
              • (Item-type of (Item being manipulated)) Equal to Death's Wall
              • (Item-type of (Item being manipulated)) Equal to Holy Shield
              • (Item-type of (Item being manipulated)) Equal to Mana Shield
              • (Item-type of (Item being manipulated)) Equal to Shadow Blocker
              • (Item-type of (Item being manipulated)) Equal to Spell Shield
              • (Item-type of (Item being manipulated)) Equal to Steel Shield
              • (Item-type of (Item being manipulated)) Equal to Orcish Shield
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You canno...
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Guardian
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Arc Axe
              • (Item-type of (Item being manipulated)) Equal to Broad Axe
              • (Item-type of (Item being manipulated)) Equal to Crushing Axe
              • (Item-type of (Item being manipulated)) Equal to Doom Blade
              • (Item-type of (Item being manipulated)) Equal to Evil Axe
              • (Item-type of (Item being manipulated)) Equal to Grunt's Axe
              • (Item-type of (Item being manipulated)) Equal to Heavy Blade
              • (Item-type of (Item being manipulated)) Equal to Jinxed Axe
              • (Item-type of (Item being manipulated)) Equal to Killing Blade
              • (Item-type of (Item being manipulated)) Equal to Luminous Axe
              • (Item-type of (Item being manipulated)) Equal to Raw, End of Days
              • (Item-type of (Item being manipulated)) Equal to Fleshrender
              • (Item-type of (Item being manipulated)) Equal to Earthshatterer
              • (Item-type of (Item being manipulated)) Equal to Death Cleaver
              • (Item-type of (Item being manipulated)) Equal to Orcish Battle Axe
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You canno...
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Librarian
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Arch Staff
              • (Item-type of (Item being manipulated)) Equal to Blunt Staff
              • (Item-type of (Item being manipulated)) Equal to Crystal Staff
              • (Item-type of (Item being manipulated)) Equal to Devilkin Staff
              • (Item-type of (Item being manipulated)) Equal to Flaming Staff
              • (Item-type of (Item being manipulated)) Equal to Glowing Stick
              • (Item-type of (Item being manipulated)) Equal to High Stick
              • (Item-type of (Item being manipulated)) Equal to Illuminating Staff
              • (Item-type of (Item being manipulated)) Equal to Jinxed Stick
              • (Item-type of (Item being manipulated)) Equal to Living Branch
              • (Item-type of (Item being manipulated)) Equal to Zul'Fan's Dreadful Staff
              • (Item-type of (Item being manipulated)) Equal to Ancestral Scroll
              • (Item-type of (Item being manipulated)) Equal to Cursed Ledger
              • (Item-type of (Item being manipulated)) Equal to Demonology Book
              • (Item-type of (Item being manipulated)) Equal to Librarian's Tome
              • (Item-type of (Item being manipulated)) Equal to Magical Scroll
              • (Item-type of (Item being manipulated)) Equal to Rho'Gall's Jinxed Tome
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You canno...
          • Skip remaining actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Dragoon
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Spear
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You canno...
          • Skip remaining actions
 
Level 6
Joined
Mar 6, 2006
Messages
169
You used Skip Remaining Actions in both 'Then' and 'Else' for the Knight, meaning that it will skip no matter what happens

I tried removing the first of the 'Skip Remaining Actions', and tested it, then removed the other and kept the first, and tested again.. And it still doesnt work.
 
Level 3
Joined
May 4, 2007
Messages
66
you can use the skip remaining actions in the "then" part but not in "else", looking at it, just removing the skips in the else part should make it work.

Actually no. Remove "skip remaining actions" from "then" and leave those in "else" cuz ure actions are in "else".
 
Level 5
Joined
Jun 23, 2004
Messages
126
Lol. IIRC I designed this trigger and it's kinda amusing listening to you guys arguing about the Skip Remaining Actions :wink:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Hero manipulating item)) Equal to Librarian
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Item-type of (Item being manipulated)) Equal to Arch Staff (All other items go here etc.)
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
          • Hero - Drop (Item being manipulated) from (Hero manipulating item)
          • Game - Display to (Player group((Triggering player))) the text: |cffff0000You canno...
          • Skip remaining actions
    • Else - Actions
Basically what's happening is the check for the item-type is included in the check for the hero-type which makes it go bonkers. If the two are divided it won't automatically make the hero drop the item just cause he's not a knight.
 
Level 3
Joined
May 4, 2007
Messages
66
Basically what's happening is the check for the item-type is included in the check for the hero-type which makes it go bonkers. If the two are divided it won't automatically make the hero drop the item just cause he's not a knight.
Hmm, i don't think thats a problem. As Carrigage said in his first post the trigger only works for knight because knight's "if then else" is first in trigger. But because he putted "Skip Remaining Actions" in "Then" and in "Else" trigger is going to stop from execution no matter what condition are. Ure trigger would work fine, thought u still don't need "Skip Remaining Actions" in "then" (it wouldn't bug in this case) and u are just adding another "if then else" that is going to make trigger more unefficient.
 
Level 6
Joined
Mar 6, 2006
Messages
169
Actually, the trigger seems to work now, if I put the Guardian's "If then else" under the Knight's "else" in "if then else".

For some reason it said "you cannot use axes" when the Guardian tried to pick up a Sword, but I guess it's easily fixed by changing all the texts to the same thing, like "You cannot use this weapon!" instead.

As far as I can tell, it works, but I dont know if its the most efficient way of doing it, seeing as it seems to fudge up about the texts.
 
Level 3
Joined
May 4, 2007
Messages
66
Well in this case u'll need to put Librarian's "if then else" in Guardian's one, and Dragoon's in Librarian's. This can be little messy ... especialy if u plaining to add more classes.
Anyway i suggest u to try first trigger without "Skip Remaining Actions" in "then".
 
Level 6
Joined
Mar 6, 2006
Messages
169
Well in this case u'll need to put Librarian's "if then else" in Guardian's one, and Dragoon's in Librarian's. This can be little messy ... especialy if u plaining to add more classes.
Anyway i suggest u to try first trigger without "Skip Remaining Actions" in "then".

I dont see how it'd get any messier by adding more classes? Not that I plan to do that, but would I want to do that, it'd be easy to do.

Beside, I tried removing the "Skip remaining actions", one at a time, and it fudged up completely then.

:)
 
Level 5
Joined
Jun 23, 2004
Messages
126
Hmm, i don't think thats a problem. As Carrigage said in his first post the trigger only works for knight because knight's "if then else" is first in trigger. But because he putted "Skip Remaining Actions" in "Then" and in "Else" trigger is going to stop from execution no matter what condition are. Ure trigger would work fine, thought u still don't need "Skip Remaining Actions" in "then" (it wouldn't bug in this case) and u are just adding another "if then else" that is going to make trigger more unefficient.

Heh, it's definitely the problem. Just look at it. If the hero is a knight and the item in question is a knight's weapon, nothing happens. Else drop the weapon and skip remaining actions.
 
Status
Not open for further replies.
Top