• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Keep Item in same slot after moving/death

Status
Not open for further replies.
Level 4
Joined
Dec 5, 2011
Messages
75
Keep Item in same slot after moving item

Hi guys im having trouble making a trigger that move an item in slot x on a hero(A) to hero(B) in same slot(x) (with trigger)
I can move them but not in same slots

Do variables(item) store the item data on a hero in order?
Do i need to use variables(for items) with/without arrays?

im a GUI user!

Thanks!!

sorry wrong section!
 
Last edited:
the only thing i can think of is adding some dummy items into the other slots so when you add the item it goes into the correct slot then remove those dummy items

i know theres a condition that checks what slot an item is in so you can check if a slots filled or not
 
does dota revive uses trigger like create unit from variable or just a simple revive?
 
  • Untitled Trigger 016
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Far Seer 0022 <gen> // u is unit variable
      • Set ityp = Crown of Kings +5 // ityp is item type variable
      • Custom script: call UnitAddItemToSlotById(udg_u, udg_ityp, 3)
However if the item slot is not empty, the item will be created on ground at the position of the unit. You need to loop through the slots to find an empty one.
 
I made this system long time ago, hope it suits your demand.

Instructions:
1. Pick any item in any order
2. Once you have satisfied, press ESC to kill the unit
3. Go to the Circle of Power to the North
4. Ta-da! Your item is back on you at the same slot, same item

It works MUI as you can test it with 3 units in that test map, enjoy :)

This system meant for revival system, but it can be applied to your situation as well.
 

Attachments

Status
Not open for further replies.
Back
Top