HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

How to Manipulate a Hero "Giving" Item?

04-13-2005, 11:35 PM#1
MercyfulJester
Is there any command or trigger system that can manipulate or effect a unit which gives an item directly to another unit? My trigger so far is basically this:

Event:
Unit acquires item

Condition:
Hero manipulating item is x

Events:
----------------


If I use "Hero Manipulating Item" it of course means the unit receiving the item. Triggering Unit seems to also mean the receiver. How could make it work?
04-13-2005, 11:39 PM#2
johnfn
I can't honestly say if this will work or not, but just try

Code:
Hero - Give (Item being manipulated) to (Triggering unit)

;failing that, try
Code:
        Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
        Item - Remove (Item being manipulated)
04-13-2005, 11:57 PM#3
MercyfulJester
Quote:
Originally Posted by johnfn
I can't honestly say if this will work or not, but just try

Code:
Hero - Give (Item being manipulated) to (Triggering unit)

;failing that, try
Code:
        Hero - Create (Item-type of (Item being manipulated)) and give it to (Triggering unit)
        Item - Remove (Item being manipulated)

Wow, what a fast reply. I don't compeletely understand what you mean, but that did give some idea. Thank you.

*Edit* I solved the problem by making another trigger and a variable:

Event:
Unit loses an item

Condition:
Item-type of item being manipulated - xxx
Unit manipulating item - xx

Action:
set UnitVariableX(1) = triggering unit


Then when the unit "gives" the item to a certain unit the trigger can "target" the giver by using the variable.
04-16-2005, 07:34 AM#4
Guest
But that trigger will run when a player tells the hero to drop an item as well as if they sell it. Just to keep that in mind. :-)