• 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.

I need a trigger to restrict items

Status
Not open for further replies.
Level 2
Joined
Oct 11, 2008
Messages
6
Hi everyone, Im new and I heard that this website has a lot of people who knows a lot of world editor, well Im making a customized map and I need your help. here is my problem:

I had created items like weapons and armors, but I want them to be equiped by specific heros, for example:
item A can only be equiped by certains heros such mages and not warriors.
So in the case that one hero that is not supposed to have that item(player or computer owner) pick, buy or receive that specific item, losses it or in the instant he/she pick, buy or obtain it, the item is destroyed or removed from that hero.

I heard that it can be done with triggers but I dont know anything about triggers so I ask for your help.

Greetings to kitabatake, my map has a lot of models made by you, ty.
 
Level 12
Joined
Mar 16, 2006
Messages
992
An item is equipped.
Owner of unit equipping item is of type ____
Order unit to drop item and display message.

Or whatever.
 
Level 3
Joined
Feb 13, 2008
Messages
65
  • Events -
    • Unit - A unit acquires an item
  • Conditions -
    • And - All (Conditions) are true:
      • Conditions -
        • (Item-type of (Item being manipulated) Equal to Itemyouwant)
        • (Unit-type of (Hero Manipulating item)) Not Equal to Heroyouwanttohavethisitem
  • Actions -
    • Hero - Drop (Item being manipulated) from (Hero Manipulating item)
Basically just replace "Itemyouwant" with the item you want that certain unit to be able to pick up, and replace "Heroyouwanttohavethisitem" with the unit you want to be able to pick up this item.

In simple terms this trigger will do the following: Whenever a unit gets an item, it will check if that item is the item that you want only certain heros to have, then it will check if the hero/unit that got the item is equal to the Hero/unit that you wanted to have the item. If its not the correct hero, it will drop the item from the hero/unit's inventory

Note: This trigger will make it so no one except unit-type of "Heroyouwanttohavethisitem" can pick up that item.
 
Level 2
Joined
Oct 11, 2008
Messages
6
Thank you very much tiaan, your trigger was the correct, now my map is complete, I will post it in the correct section in a moment I hope all of you would like it.
 
Status
Not open for further replies.
Top