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

Order to use item?

Status
Not open for further replies.
Level 12
Joined
Sep 11, 2011
Messages
1,176
Is there a way to make a hero use an item via triggers?

  • Hero - Order (Triggering unit) to use (Last created item)
  • Hero - Order (Triggering unit) to use (Last created item) on (Triggering unit)
  • Hero - Order (Triggering unit) to use (Last created item) on (Center of (Playable map area))
  • Hero - Order (Triggering unit) to use (Last created item) on (Picked destructible)
 
Level 4
Joined
Oct 4, 2012
Messages
80
you can do it many ways, could you describe more, when you want to order hero to use item[when he enters region, when he picks item(its used automaticly), when his health is low....]
Edit: i see TwoVenomous already showed few ways...
 
Level 7
Joined
Nov 18, 2012
Messages
272
  • Hero - Order (Triggering unit) to use (Last created item)
  • Hero - Order (Triggering unit) to use (Last created item) on (Triggering unit)
  • Hero - Order (Triggering unit) to use (Last created item) on (Center of (Playable map area))
  • Hero - Order (Triggering unit) to use (Last created item) on (Picked destructible)

Thanks.

Does it have to be last created item? Or can it be item of type, etc.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Does it have to be last created item? Or can it be item of type, etc.
You can test that yourself quite easily.

To answer the question: The script takes an item. If you can use "last created item", you are always able to use any other item you like, no matter what.
The easiest comparison I have in mind is with integers. If I give you the example "Set current gold to 500", you wouldn't ask whether '500' is the only possible integer you can use with that, right?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Apocalypse, i think he ment if you could use "Item of type" specifically, not just use any other item. Your post felt kinda harsh.
You're right. After re-reading my comment, it does indeed sound harsh. That wasn't my intention, so I apologize (for the harsh tone, not for the message itself).
It's just that there are plenty of people asking "can I do that?"-questions, which are very easy to answer for yourself within 5 minutes of experimenting.
The reason I get annoyed by that, is because I believe that experimenting is the key to learning: if you only learn what others have taught you, you will never discover anything and you're never able to surpass your teachers.

Again, sorry for the harsh tone, but do try to experiment a little yourself before asking others next time :).
 
Status
Not open for further replies.
Top