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

Move an item from one inventory slot to another?

Status
Not open for further replies.
Level 6
Joined
Dec 9, 2014
Messages
176
So I have this system: http://www.hiveworkshop.com/forums/spells-569/equipment-system-version-2-2a-123336/?prev=of%3Ddownloads%26o%3DDESC%26u%3DFlood%26d%3Dlist%26r%3D20 and I got it working pretty much fully. The only difference between my map and it is which slot I have the equipment menu (item) in when the game starts. The item is undroppable to prevent players from dropping the thing they need to access the menu. The problem is that my hero spawns after a few intro events I have setup which means I can't just set the slot the equipment menu is in from the editor. So what I have done is made a simple trigger that when the hero is made add the equipment menu item to their inventory. Of course the default slot for this is slot 1. In the map that I got the equipment system from, the hero has it in the 6th slot. This is the only difference between my map and it which is why I think that could be causing a bug in my map that is creating duplicates of anything that is in the 5th slot. I know this all sounds confusing but my aim here is fixing that duplication bug. I have extinguished all ideas on what could be causing this problem and I have come to the conclusion that the only thing left to try is matching the same slot the equipment menu item is in my map, with the one from the example map. I can't seem to find a trigger anywhere that will move an item from one slot to another though, any help here would be very appreciated. Thanks!
 
Level 6
Joined
Dec 9, 2014
Messages
176
I suppose one weird way to fix this would be to give the hero 5 items. This would make it so that the only slot avaliable is the 6th slot which the equipment menu will be forced to go to. Afterwards I remove the 5 items and the game begins. I think that would work, what do you guys think?
 
I suppose one weird way to fix this would be to give the hero 5 items. This would make it so that the only slot avaliable is the 6th slot which the equipment menu will be forced to go to. Afterwards I remove the 5 items and the game begins. I think that would work, what do you guys think?

Correct, that is the only way to do this or well only way me and Chaosy seem to know.


EDIT:
Lol! Chaosy we are so blind...... You too aussj5link =P

[trigger=]
Untitled Trigger 001
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Crown of Kings +5
Actions
Unit - Order (Triggering unit) to move (Item being manipulated) to inventory slot 6
Item - Make (Item being manipulated) Undroppable
[/trigger]
 
Last edited:
Level 6
Joined
Dec 9, 2014
Messages
176


Correct, that is the only way to do this or well only way me and Chaosy seem to know.


EDIT:
Lol! Chaosy we are so blind...... You too aussj5link =P

[trigger=]
Untitled Trigger 001
Events
Unit - A unit Acquires an item
Conditions
(Item-type of (Item being manipulated)) Equal to Crown of Kings +5
Actions
Unit - Order (Triggering unit) to move (Item being manipulated) to inventory slot 6
Item - Make (Item being manipulated) Undroppable
[/trigger]

lol nice! I can't believe I missed that after all that time of searching lol! The way I have currently is working fine so I don't know if I should switch to that or not. :/
 
Status
Not open for further replies.
Top