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

Is there a way to give a hero a tome?

Status
Not open for further replies.
Level 19
Joined
Aug 8, 2007
Messages
2,765
title is kinda misleading, but i want to put a tome in a heros inventory as if "Use Upon Pickup" was off but if you drop it and pick it up it will use it
 
then create a trigger which detects when a unit is ordered targeting an item, check if the order is to pick it up and check if the target item is a tome, if yes, put it into the inventory and make the hero use it...

or you can just make a trigger which runs when the unit picks up an item, check if it was a tome and order him to use it... now on the trigger where you give the unit a tome, disable the use trigger first before giving tome, then enable it afterwards

or you can create two versions of tome, one with the use auto turned on, one with it turned off... you give the hero the turned off version, then create a trigger such that when he drops it, you change it into the turned on version...

@SonofJay - if you read his post, he already knows that... but he wants it such that if he drops it and picks it up, it will be like the use automatically is on again
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Adikutz, your right and wrong

For technical reasons, i need the object editor to have Use on Pickup : True. This will be true for all items, even if they cant be used. If you try to pickup an item that has use on pickup true and actively used as false, than it will do nothing (yet the unit is ordered targeting an item will still function) but if i try to UnitAddItem(GetTriggerUnit(), GetOrderTargetItem()) than it puts the item at the heroes foot
 
Status
Not open for further replies.
Top