Backpack Item

An element that displays a backpack item with a specific tag on a user slot.

ohyay allows users to take elements with them by putting them in their backpacks. Usually, users will take image elements.

To allow a user to take an item, you can enable the Takeable property under the Interaction category.

Once you enable Takeable, you will be given the ability to have users be notified they have taken an item, or to enable Take Clone.

Now, when a user hovers over the element, they will have the ability to take the element into their backpack by clicking the hand icon:

It can be useful to display items from a user's backpack. You can do this by setting up a Badge or using a Backpack Item.

To set up a Badge, add a User Slot to your Room and then look for the Badge from Backpack Tag setting under the Backpack category:

Now, if an item in a user's backpack is tagged with a matching tag (in the example above, the tag would be 'pet'), it will display on the user. You can control the position of the badge using the Badge Alignment setting and the size using the Badge Height and Badge Width settings.

If you want to show the total number of items in a user's backpack that match the tag, enable the Badge Show Count setting (this can be useful for things like Easter Egg hunts).

If you want to have even more control over how an item from a user's backpack is displayed, you can use a Backpack Item element:

This creates a new element that you can independently position and style that will display a backpack item with a specific tag. To use it, first pick the User Slot whose backpack you want to target by setting the User Slot property under the Backpack category:

Then you can set Tag Filter to specify one or more tags that can be matched (comma-separate multiple tags) and Show Count to display the count of items in the backpack that match.

📘

Examples of Backpack Items

Check out this workspace to see how badges work: https://ohyay.co/space_gallery?itemId=ws_8Nw2NTF4. You can also import the Animal Friends room from the Room Gallery.


What’s Next

Curious what else you can do with Backpack elements? Check out some of our demo workspaces, chat with our creators in the discord, or head over to the community forums to ask!

Did this page help you?