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!
I've been searching the web for days and i still can't get the effin Hero - Use Item to work, does someone know how do i use it? your help is truly and gracefully appreciated
That link orders your unit to cast base on Spell String ID, whereas mckill told you the way the trigger by using Spell Integer ID.
Like if you want to cast wand of illusion-based spell, you should call IssueTargetOrderById(whichCaster, '852274', whichTarget) to order Dummy to cast it to Target.
Hero - Use Item does work but you should pick the action variant with the correct target type your item can be applied on.
Also, items are not ordered via ability orders, instead a unique id is assigned to each inventory slot and it's numeric only, they have no string variant. You can test-wise print them out on event.
Code:
Events
Unit - <unit> Receives an order targeting an object
Unit - <unit> Receives an order targeting a point
Unit - <unit> Receives an order without target
Actions
Custom script: call BJDebugMsg(I2S(GetIssuedOrderId()))
Then get the inventory slot of your item, find the belonging order id, insert it into one of the functions mckill2009 posted depending on the target type again. Those functions are not available in GUI.
@defskull: It's about using the item, not specific abilities as standalones that possess no order string. In addition, the 852274 is not to be written between apostrophes, those are for converting the ascii format, for example 'ABCD', to signalize that the expression is an integer in ascii system.
You can print out the parameters to see if they are right. Is the item usable without target? You should try another event/wait time because the unit is occupied while casting/executing another order.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.