Setting up Shop (cliff notes) - prereq: Inventory Tutorial

Setting up Shop (cliff notes)

Prerequisite: Inventory Tutorial

Install

Shop Package

  • search for shop
  • check Crayta Packages
  • click Install
Shop Package

Configure

Player template

  • drag and drop Player Shop View template onto Player template
  • (optional) rename to ShopView
Player Template

Shop Creation

  • drag shop template on world
  • change Shop Name
shop World Tree shopScript

Buying Items

  • add shopPageScript to shop from Shop Creation
  • Name = Buy
  • preview game and interact with shop using E (keyboard) or X (controller)
  • prompts will not display to interact (prompts package not installed)
shopPageScript Shop Display
  • add shopBuyItemScript for each item to be sold
  • these are the defaults from the adventure starter game
shopBuyItemScript - buy 1 item shopBuyItemScript - buy 10 item

Selling Items

  • configured on Item Template
  • add inventorySellableScript
  • set Sell Currency
  • set Sell Price
item Template inventorySellableScript

note: if using multiple currencies, double check buy items on shop

3 Likes

Very helpful, thanks :slight_smile:

1 Like