223 posts If it was the same as yours, would you still wanna ask it? joined
#2
so do you mean a SPECIFIC item is picked up by any hero, or a specific hero picks up any item? (or maybe a specific item is picked up by a specific hero?)
WarlicHow do I have a trigger set so that when an item is picked up by a certain hero, it sets that hero as a variable?
If the item is unique (only 1 on the whole map) no problem :
Unique Item
Events
Unit - A unit Acquires an item
Conditions
(Item being manipulated) Equal to Celestial Orb of Souls 0050 <gen>
Actions
Set Owner = (Hero manipulating item)
Change Celestial Orb to whatever item you want and Oner to some variable of type Unit. If there has to many items of this type, a single variable will not work. If you want finding which heroes actually have the item, use :
Unit Group - Pick every unit in (Units in (Playable map area)(((Matching unit) has an item of type Celestial Orb of Souls) Equal to True)) and do (Actions)
Loop - Actions
If you want to use this variable for finding which hero casted the spell of an item, than there's no need of it. Simply use :
Events
Unit - A unit Uses an item
Then to refer to the unit that used the item use Event Responce - Hero Manipulating Item .[/code]