Hi -
I'm trying have the loot dropped by defeated mobs displayed as an item box that the player can interact with to pick up the items. In my BattleEndVictory schematic I have the "Collect Battle Gains" action which currently automatically picks up loot at shows a notification of that + experience in a dialogue. I notice there is a "Use Item Box" option here which sound like it's what I want, but this requires that I enter an "Item Box ID." I don't know what this means. Would that be a reference to UI Box, or an Item Collecter in scene? Not sure.

Thanks!
-Mike
  • Item Collector components used in Box mode (i.e. for item boxes) use a Box ID to identify and store the content of it (similar to the scene ID for regular item collectors to mark things as collected).

    The battle gains being stored in a defined item box allows you to e.g. store all loot into an item box and be able to later pick up what you need (can also be done in the battle end schematic).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I was able to get roughly what I wanted with the Battles -> BattleEnd -> Battle Gains Collection -> Drop Items setting. I wasn't able to figure out how to use the Item Box though. The missing piece for me is: How can I spawn a unique Item Box at the end of a combat (or when an enemy dies) and then associate that specific reference with the Battle Gains action.

    Thanks!
  • The easiest way is to set up an item box prefab, spawn it and use a Change Item Box ID to make it use your battle gains box ID.

    You can even create unique item boxes for each combatant via their death schematic, e.g. something like this:
    - Change Variables node > set a local string variable to a GUID, this generates a random GUID
    - Collect Battle Gains node > use the GUID variable you created as the box ID
    - Spawn Prefab node > spawn your item box
    - Change Item Box ID node > change the spawned prefab's box ID to the GUID variable
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • The next ORK 3 update will also add some new features to make things easier. You can 'create' a new item box by adding the component to a game object with the new Create Item Box node and the Get Combatant Gains node allows storing the loot in item boxes (either via box ID or using a game object's Item Collector) or selected data.

    In short, you can e.g. turn the dead combatant's prefab into an item box and add the loot to it (if you don't destroy their prefabs). Otherwise just spawn a prefab and use that.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Cool. Yeah that sound like it will be easier/more intuitive.

    Thanks,
    -Mike
Sign In or Register to comment.