I think I might've asked this before but I never got a good answer. I'm currently trying to figure out how I can mock using an item in my inventory. I want to have it setup so that when a player uses a reload ability (that does nothing but activate the trigger) he uses one charge of the item in his inventory, it applies the reload effect, and if that's the last charge the item is removed from the inventory. I'm a trigger noob so any help here would be awesome.
Maybe try reading the whole post before you start posting links. None of those will work for what I'm trying to do. My issue here is referencing the actual inventory item and all your solutions would also require the same reference.
Edit: I solved everything but the removing item from inventory when it his 0 charges. My only issue was that the reference to the item wasn't being used and kept resetting.
Edit Edit: Now the other item it accounts for won't work and they're setup 100% the same.
so, i posted this in team chat, but you are offline, and i am outta town for a few days.
When you reference an item slot.... well.. dont. Never. It is stupid. blizzard is stupid.
...Every time you drop an item, it resets your item slot count; despite whichever slot the item may be in. Say you have items A, B, and C in slots 1, 2, and 3 respectively. you drop item B (slot 2) on the ground, and you pick it back up. It will be displayed in slot 2, but it will be slot 3. your item C, still in slot 3, will now be slot 2, for trigger purposes.
I had this problem with my game, and used triggers to automatically organize the inventory; which was a pain in the ass. What may work well is to create a different container for the ammo units you pick up. an "ammo" backpack so to say, and cause the items in that backpack to be undroppable; then when an item is used up and removed; remove and re-add all items to the backpack, to refresh the triggers.
dialog based inventories are so much easier to work with than the garbage they gave us. SC2 was never intended to have items and the sorts.
I appreciate your help but again if you'd looked at the way I currently have it setup I'm already using the unit group and what not. Maybe I don't get what or how to use custom values and that could be my problem. If not I seriously have no idea how to go about this.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I think I might've asked this before but I never got a good answer. I'm currently trying to figure out how I can mock using an item in my inventory. I want to have it setup so that when a player uses a reload ability (that does nothing but activate the trigger) he uses one charge of the item in his inventory, it applies the reload effect, and if that's the last charge the item is removed from the inventory. I'm a trigger noob so any help here would be awesome.
@JacktheArcher: Go
search? http://www.sc2mapster.com/forums/development/triggers/64586-use-inventory-item-via-triggers/
http://www.sc2mapster.com/forums/development/triggers/66224-use-inventory-item-via-trigger/
@FunkyUserName: Go
Maybe try reading the whole post before you start posting links. None of those will work for what I'm trying to do. My issue here is referencing the actual inventory item and all your solutions would also require the same reference.
Edit: I solved everything but the removing item from inventory when it his 0 charges. My only issue was that the reference to the item wasn't being used and kept resetting.
Edit Edit: Now the other item it accounts for won't work and they're setup 100% the same.
so, i posted this in team chat, but you are offline, and i am outta town for a few days.
When you reference an item slot.... well.. dont. Never. It is stupid. blizzard is stupid.
...Every time you drop an item, it resets your item slot count; despite whichever slot the item may be in. Say you have items A, B, and C in slots 1, 2, and 3 respectively. you drop item B (slot 2) on the ground, and you pick it back up. It will be displayed in slot 2, but it will be slot 3. your item C, still in slot 3, will now be slot 2, for trigger purposes.
I had this problem with my game, and used triggers to automatically organize the inventory; which was a pain in the ass. What may work well is to create a different container for the ammo units you pick up. an "ammo" backpack so to say, and cause the items in that backpack to be undroppable; then when an item is used up and removed; remove and re-add all items to the backpack, to refresh the triggers.
dialog based inventories are so much easier to work with than the garbage they gave us. SC2 was never intended to have items and the sorts.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
@JacktheArcher: Go
use the unitgroup, items beared by unit and use custom values on the item itself to do whatever you please to do.
@FunkyUserName: Go
I appreciate your help but again if you'd looked at the way I currently have it setup I'm already using the unit group and what not. Maybe I don't get what or how to use custom values and that could be my problem. If not I seriously have no idea how to go about this.