• 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] Weapon Check

Status
Not open for further replies.
Level 3
Joined
Jul 29, 2008
Messages
34
  • Swords
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-class of (Item being manipulated)) Equal to Swords
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Item-class of (Item carried by (Triggering unit) in slot 1)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 1)) Equal to DualSwords
          • Item-class of (Item carried by (Triggering unit) in slot 2)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 2)) Equal to DualSwords
          • Item-class of (Item carried by (Triggering unit) in slot 3)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 3)) Equal to DualSwords
          • Item-class of (Item carried by (Triggering unit) in slot 4)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 4)) Equal to DualSwords
          • Item-class of (Item carried by (Triggering unit) in slot 5)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 5)) Equal to DualSwords
          • Item-class of (Item carried by (Triggering unit) in slot 6)) Equal to Swords
          • Item-class of (Item carried by (Triggering unit) in slot 6)) Equal to DualSwords
        • Then - Actions
          • Item - Remove (Item being manipulated)
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to (Matching player))) the text: No having two Sword...
        • Else - Actions
          • Do Nothing
Swords: Permanent (Item-class)
DualSwords: Campaign (Item-class)

This trigger is supposed to:
When you pick up / buy an item it starts.
Checks if it's a Sword-class, if it is:
Checks you hero's inventory if it has a Sword-class / Dual Swords-class item, if it does:
Deletes the Sword-class item and displays message.

It doesn't work, and I don't know why.
 
Level 4
Joined
Jul 24, 2008
Messages
108
Well, look at your IF/THEN statements.

If (All Conditions are True) then do (Then Actions) else do (Else Actions)

Key word here is ALL CONDITIONS ARE TRUE.

looking at your conditions, its impossible
  • Item-class of (Item carried by (Triggering unit) in slot 1)) Equal to Swords
    • Item-class of (Item carried by (Triggering unit) in slot 1)) Equal to DualSwords
You cannot have both of these being true at the same time along wtih a bunch of other ones.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
in your trigger ALL conditions must be true
you need one of them true so put them under
Or Multiple Conditions
 
Status
Not open for further replies.
Top