does anybody have an idea how to disable the use (!, not the drag and drop) of an item if it is in a certain slot.
if i disable the use of the item at all you cant use another item of the same kind in a different slot. if i disable the inventory button (hook and disable) i cant drag and drop the item anymore.
the only way i came up with is currently to replace the item with a dummy item which has a requirement which is always false. pretty dirty work around and alot of work.
the slot integers are abit messed up but dont change, so getting slot of item B will always return 2 if you dont move it, the index (!) of the item changes.
one big problem is that the slot number in UI-editor doesnt match with the slot number in triggers(you can find the slot integer with a simple trigger to show slot of triggering inventory item on item moved event).
besides that i have fixed my issue. it's possible to validate the behaviours on the item (! not the bearer) with location "source". now everytime an item is moved, just add or remove an dummy behavior to the item itself. now each item needs this validator on first effect. now active items cant be used in the slots you want.
way more harder and alot more messed up was the carry behaviour. the only way i came up with was to use the equip behaviour for passiv items and only let them equip on the active slots. this ofc fucks up special slots vs general slots equipping but i only have one special slot for a certain class of items.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
hello,
does anybody have an idea how to disable the use (!, not the drag and drop) of an item if it is in a certain slot.
if i disable the use of the item at all you cant use another item of the same kind in a different slot. if i disable the inventory button (hook and disable) i cant drag and drop the item anymore.
the only way i came up with is currently to replace the item with a dummy item which has a requirement which is always false. pretty dirty work around and alot of work.
ok i have found a nice way to disable the use on a certain slot, now only carry behaviours are still active
Could you explain how here? Years ago, I recall trying to mess with the built-in inventory system and I was always having an issue like such:
Items slots 1-4 have items A, B, C, D
1:A
2:B
3:C
4:D
If I dropped item A (slot 1) on the ground, and ran a loop to check what was in each slot index, it would then look like this:
1:B
2:C
3:D
4:
Has this problem since been fixed? I dont think I would ever go back from a dialog based system, but who knows with future projects.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
the slot integers are abit messed up but dont change, so getting slot of item B will always return 2 if you dont move it, the index (!) of the item changes. one big problem is that the slot number in UI-editor doesnt match with the slot number in triggers(you can find the slot integer with a simple trigger to show slot of triggering inventory item on item moved event).
besides that i have fixed my issue. it's possible to validate the behaviours on the item (! not the bearer) with location "source". now everytime an item is moved, just add or remove an dummy behavior to the item itself. now each item needs this validator on first effect. now active items cant be used in the slots you want.
way more harder and alot more messed up was the carry behaviour. the only way i came up with was to use the equip behaviour for passiv items and only let them equip on the active slots. this ofc fucks up special slots vs general slots equipping but i only have one special slot for a certain class of items.