Basic in game inventory

Ok so this system is good for a few things.

click the cube, it’s now in your ‘Hand’

now own[‘Tank’][‘Holding’] = the game object your holding,

  1. This gives you access to trigger logic in the object, (this is how I use modular weapons in wrectified)

  2. The object can be moved, (with moving the player) and placed elsewhere

  3. The object can be converted into a string and stored in a container (inventory or crafting table or?)

Attachments

BasicInventoryAndUsableObjectSystem.blend (457 KB)

and to take it a step further, this illustrates how the game object can be a container for code

in this example it’s a weapon, but it could be a key, or ??

this removes the complexity from the player, allowing the object to be used contextually.

The same system could be used to select special moves, or you could cycle a inventory to the active slot or???

the possibilities are endless.

The power of oop is the complexity is distributed.

Attachments

WrectifiedInventoryAndUsableObjectSystem.blend (496 KB)