• 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.
  • It's time for the first HD Modeling Contest of 2025. Join the theme discussion for Hive's HD Modeling Contest #7! Click here to post your idea!

[Trigger] Making a following equipment dummy

Status
Not open for further replies.
Level 30
Joined
Jul 23, 2009
Messages
1,033
I am trying to have an additional inventory system in my map and I have made a dummy unit that is moved to the location of the hero every 1 second. The hero is supposed to be able to give items to the dummy to store more than 6 items and that works fine but I found a problem when the player wants the dummy to give the item to the hero. If the unit is ordered to give the item to the hero and then the 1 sec move intrevall strikes it will be moved and the order will be nullified.

If I change the move timer to a higher number this will occur less seldom but that means the hero can walk further away from the equipment and then it will take longer time for the dummy to move to the hero's location and thetefore it will not work.

Does anyone have a solution please?
 
Level 23
Joined
Feb 6, 2014
Messages
2,466
I think ordering a unit to give an item cannot be detected by triggers. Try changing the Item dropping/giving range in Gameplay Constant and see if it helps.
If not, the only way I can think of to solve this problem is to Add an ability to the dummy with names "Give Item in Slot1" and trigger the effect. Of course you have to make 6 of these so I suggest putting all of these in 1 spell book.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
  • Custom Script : call SetUnitX(udg_tempUnit, GetUnitX(udg_yourHero))
  • Custom Script : call SetUnitY(udg_tempUnit, GetUnitY(udg_yourHero))
i dont think the setunitx/y natives cancel orders
 
Status
Not open for further replies.
Top