arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

Containers & Items

Using traits and filters with containers and items.

Accepted Traits: Traits the items will need to be stored inside the container. Denied Traits: Traits that are denied, regardless or if the item has accepted traits. Must Have All: Check if the item must have all traits to be stored instead of just a single one.

hashtag
Adding traits and filter to items and containers

To add a trait to an item just go to it's prefab and add it to the Traits list:

To add a filter to a container just go to it's prefab and add it to the Container Descriptor's script in the inspector:

Traits

The traits system is a simple way of checking for basic properties in objects.

Ideas for Traits can be found herearrow-up-right.

Traits can be used to check for basic properties by name, like what category an item is part of or what permissions an ID Card holds, they can also be separated into categories, currently there are just two, "None" and ID Permission.

hashtag
Item Traits and Filters

You don't have to set anything up, just name the Trait, first be certain there are no other traits in the project with the same name.

To create a trait go to Assets/Content/Data/Traits, right click and go Create -> Inventory -> Traits -> Trait.

Filters are used by container to filter which items can be stored inside them, they check for traits in the items for that.

To create a filter go to Assets/Content/Data/Filter, right click and go Create -> Inventory -> Traits -> Filter.

Roles

Using traits for ID/role permissions

hashtag
ID Cards and ID Permissions

ID Cards also use the Traits system to check for a player's permissions, for more about that check

Roles