• 0

    posted a message on Combining different types of items with full inventory

    Thanks for your answer. I will try this approach and see if I can get it working without making it visible that the item gets picked up and then dropped.

     

    Edit: Will we not lose the ability to use hotkeys for inventory slots in that case? The number of item slots seems to be maxed out already - attempting to add an item slot would require some of the slots to be converted to a container, no?

    Posted in: Triggers
  • 0

    posted a message on Combining different types of items with full inventory

    Hello,

     

    I am sorry if this was answered before. I could not find a response that handles my case. The only thread that seems to touch a similar subject seems to be this.

     

    I have decided to do some maintenance work for UA3 map and am rewriting/improving some sections of it. UA3 has a Data-backed inventory system with some extra triggers for handling things such as item combining.

     

    I am currently trying to do add the functionality for being able to combine different types of objects when your inventory is full. Concretely, there are two different types of ammunition in the game: Ammo cases and magazines. Ammo cases can hold up to 10 units while magazines can only hold up to 3. Combining magazines into ammo cases work fine without any issues when the inventory is not full. The problem starts when I attempt to pick up magazines with a full inventory that contains an empty ammo case. Since they are different types of items, SC2 does not seem to handle these automatically and the player receives "Can't hold any more items" error.

     

    There seems to be a validator that prevents any events from firing for this case. I have attempted to use the inventory events, but they do not even seem to fire as the item is simply not picked up, meaning that there is no change in inventory at all. Another approach that I have taken is attempting to intercept pick-up orders, but that also failed: The type of smart command detected in event seems to be "move" instead of the inventory ability if the inventory is already full.

     

    How can I bypass that validator, or intercept the pick-up order before the validator is processed?

     

    A hack might be having an invisible inventory slot that is kept empty at all times. I am not sure if this is actually possible, but I would prefer to do something else even if it is the case.

     

    I am new to Galaxy, but I am not new to programming.

     

    Thanks in advance.

    Posted in: Triggers
  • To post a comment, please or register a new account.