HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Item Slots

01-14-2005, 11:48 PM#1
Rising Evil
How would I change the slot an item is in.
Like if a unit picks up a certain item the item is moved to slot 6.
01-15-2005, 12:01 AM#2
iNfraNe
dunno, there is prolly just a simple function for it, but first thing that comes 2 my mind is make him drop all his items, make 5 dummy items, let him take them, let him take the item that must be moved, remove the dummy items, make him take the dropped items.
01-15-2005, 12:04 AM#3
Bibendus
You can:

Events
Unit takes an item

Actions
-Store the item you got into a variable
-Drop it near the hero
-If slot 1,2,3,4,5 are empty, add a custom "empty slot" item until you fill all slots before the slot you want to move your item IN.
-Disable this trigger (that's needed because when you re-equip the item, the trigger fires again and you get an infinite loop making the map crash)
-Give the item stored, back to the hero
-Re-enable this trigger
-Remove all "empty slot" items