• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Issue Move Item in Inventory Slot problem

Status
Not open for further replies.
Level 2
Joined
Mar 13, 2015
Messages
7
Hi; when I use this trigger the triggering unit ends up stopping (the command). I.e. if i had a unit on move command and then this trigger activates, the unit will stop in addition to moving the item. Is there any (preferably simple) way I can avoid this?
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
Apprently items can easly being moved to any slot you want by using the function " move item to slot " if I remember correct, btw do what Legal_Ease said above ^^ and make sure the triggering unit works properly.
 
Level 2
Joined
Mar 13, 2015
Messages
7
  • Untitled Trigger 004
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (Triggering unit) Equal to Admiral Proudmoore 0138 <gen>
    • Actions
      • Set OrderBeforeBlink = (Current order of (Triggering unit))
      • Unit - Order (Triggering unit) to move (Item carried by (Triggering unit) in slot 1) to inventory slot 2
      • Custom script: call IssuePointOrderLocBJ( GetTriggerUnit(), "udg_OrderBeforeBlink", GetRectCenter(GetPlayableMapRect()) )
includes a failed workaround i was testing. the problem is the unit stops when >>Unit - Order (Triggering unit) to move (Item carried by (Triggering unit) in slot 1) to inventory slot 2<< activates. I want the unit to continue its previous order without interruption.

The overall context is that I'm trying to create a blink dagger/disabled blink dagger clone from dota.
 
Level 12
Joined
May 22, 2015
Messages
1,051
This function is probably the easiest way: UnitAddItemToSlotById
It creates a new item in the slot specified.

I don't know if you can do that in GUI, though. Perhaps this workaround may help:
Before removing the normal blink dagger, create 6 dummy items and give them to the unit. Remove the blink dagger, add the disabled blink dagger, then remove all 6 dummy items. Extra dummy items will appear on the ground, and the unit's entire inventory will be full, so the disabled blink dagger will appear in the correct slot. Then you remove the dummy items so they don't sit around everywhere forever.

I'd rather use a custom script or JASS though.
 
Status
Not open for further replies.
Top