• 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!

How to change item position in inventory.

Status
Not open for further replies.
There is UnitAddItemToSlotById(unit, itemId, slot)

Ty. now is there a way to keep that item in that slot?
why would you want to do that? shouldn't the player have freedom to move items around their inventory as they wish?
Its for an inventory system, instead of making it a unit ability im making it an item and giving the item the ability
 
oh...is this one of those item systems that is like...armor goes in that slot, weapon goes in that slot and perishable in that slot, kindof thing?
if you make an item undroppable then you can't change the slot. you can use the function to remove an item if you need to remove it otherwise.
 
oh...is this one of those item systems that is like...armor goes in that slot, weapon goes in that slot and perishable in that slot, kindof thing?
if you make an item undroppable then you can't change the slot. you can use the function to remove an item if you need to remove it otherwise.

naa that sounds primitive...

also im pretty sure even if its undroppable you can still swap item spots with another item, i gotta test tho
 
hmm...well yeah i think simplest thing to do is make it undroppable(use the jass/custom text function) when you give it to the unit. doing it in the object editor would probably have the exact same effect, so you can either save yourself a function call or save yourself some object editing. either way, i suppose.
 
you might want to give every hero a 6th slot item when they are summoned which is undroppable and doesn't do anything except to serve as a placeholder until they unlock their item ability. this way you don't let players fill up their inventory and then get annoyed when an item gets removed from their inventory when they unlock their item ability.
 
you might want to give every hero a 6th slot item when they are summoned which is undroppable and doesn't do anything except to serve as a placeholder until they unlock their item ability. this way you don't let players fill up their inventory and then get annoyed when an item gets removed from their inventory when they unlock their item ability.

The unit will have the abillity 100% of the time..
 
then add the item[ability] and not use a placeholder anymore... just make it undroppable so that it cannot be moved...

You mean, do what I've been doing? lol. you guys are interpreting this wrong. But its already solved (just have to test, ig atm) so..
 
Status
Not open for further replies.
Back
Top