• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Need Help Setting Loot with Unit conditions

Status
Not open for further replies.
Level 4
Joined
Sep 6, 2012
Messages
19
Hello, I'm trying to set up some triggers that makes it so only certain units can pick up certain items. This is what I have.

  • Bryntroll
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • 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 Bryntroll, the Bone Arbiter) and ((Unit-type of (Hero manipulating item)) Equal to Arms Warrior)
              • ((Item-type of (Item being manipulated)) Equal to Bryntroll, the Bone Arbiter) and ((Unit-type of (Hero manipulating item)) Equal to Death Knight)
        • Then - Actions
        • Else - Actions
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 1 (Red)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 2 (Blue)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 3 (Teal)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 4 (Purple)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 6 (Orange)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 7 (Green)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 8 (Pink)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 9 (Gray)).) the text: That Item Belongs T...
          • Game - Display to (All players matching ((Owner of (Triggering unit)) Equal to Player 10 (Light Blue)).) the text: That Item Belongs T...
          • Hero - Drop (Item being manipulated) from (Triggering unit).

Sorry i dont know how to link the codes very well :/
 
Last edited:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,954
You almost had it.
  • Item Example 1
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to Arms Warrior
      • (Unit-type of (Triggering unit)) Not equal to Death Knight
      • (Item-type of (Item being manipulated)) Equal to Bryntroll, the Bone Arbiter
    • Actions
      • Hero - Drop (Item being manipulated) from (Triggering unit).
      • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: That item blah blah...
Triggering Unit and Triggering Player should refer to the unit that acquired the item/owner of that unit.

Same setup but with an If Then Else:
  • Item Example 2
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Not equal to Arms Warrior
          • (Unit-type of (Triggering unit)) Not equal to Death Knight
          • (Item-type of (Item being manipulated)) Equal to Bryntroll, the Bone Arbiter
        • Then - Actions
          • Hero - Drop (Item being manipulated) from (Triggering unit).
          • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: That item blah blah...
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: Don't drop
And to display a text message to a specific player you need to use Convert Player To Player Group
 
Last edited:
Status
Not open for further replies.
Top