-
Notifications
You must be signed in to change notification settings - Fork 0
1. Basic Usage

(MUST BE (U)GameItem child class)
In my example I just added weight and volume variables, but nobody limits you to create anything you want. Just remember that all items with equal stats are one item in engine logic. So if you're doing item-specific logic (like Event Dispatchers) you have to explicitly specify the context.

You can use the default "ItemStruct" structure, but if you need to overload item properties, you must represent them in your structure. You always need "ItemClass" (U)GameItem class-reference property in your struct.
This is my TestItem example:

Just get the "GUIS" subsystem and call the "Create Item" function. As a result, you will get an object that has the class you specified with the variable values you specified.

Now you can do whatever you want with your object! You can add it to your inventory (just add InventoryComponent to your actor), remove it from your inventory, or transact it from one to another!
