Does anyone know if you can order a hero to collect a certain item? I'm working on a top-down shooter map with WASD controlled movement, and so I need an alternate means of collecting items for my hero. I'm also wondering if you can detect when a unit has been issued a 'drop item' order?
These kinds of things would be no problem in wc3, but as far as I can see, there are no ability commands relating to items, but maybe I've been looking in all the wrong places?
First you have to edit your inventory ability.
You have to give the order drop a button, maybe create your own one, it is not visible, but it is needed to get it with the editor.
When you added a button like "drop" to the order drop of your inventory ability
create a trigger:
any unit is issued an order drop - inventory
and thats all.
For your other skill i am not sure, but i think you have to add a button to the order take.
Then lets say A user presses spacebar
condition a unit of type item is in radius of unit x
then set item = random item of units in radius around unit x
order unit x to do take - inventory targeting item
I hope it works!
I am searchign for the event how to get when a unit pawns an item, because there you cant add a button, anyone knows?
Does anyone know if you can order a hero to collect a certain item? I'm working on a top-down shooter map with WASD controlled movement, and so I need an alternate means of collecting items for my hero. I'm also wondering if you can detect when a unit has been issued a 'drop item' order?
These kinds of things would be no problem in wc3, but as far as I can see, there are no ability commands relating to items, but maybe I've been looking in all the wrong places?
I was told how to do it yesterday.
First you have to edit your inventory ability. You have to give the order drop a button, maybe create your own one, it is not visible, but it is needed to get it with the editor. When you added a button like "drop" to the order drop of your inventory ability
create a trigger:
any unit is issued an order drop - inventory
and thats all.
For your other skill i am not sure, but i think you have to add a button to the order take.
Then lets say A user presses spacebar
condition a unit of type item is in radius of unit x
then set item = random item of units in radius around unit x
order unit x to do take - inventory targeting item
I hope it works!
I am searchign for the event how to get when a unit pawns an item, because there you cant add a button, anyone knows?
Couldn't have worked better! Thanks for this!