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

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 64
Joined
Aug 10, 2018
Messages
6,550
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