PlaceholderGames / Gluten-Free-Waffles

Team 2 CS2S561 game
0 stars 2 forks source link

How To Use Vendors #45

Open SeanBrennan645 opened 6 years ago

SeanBrennan645 commented 6 years ago

So in the game there is currently an example vendor (big cube beside player in main map), the vendor can be opened by clicking on it with left mouse button.

The vendor has the script vendor supplies, the size should be set to 4 as it was easier to make a shop have a set max amount of items on one screen (can probably be modified later if we need to). The elements correspond to the item ids in the item database script with negative numbers being used to represent that no item should fill this slot.

vendor supplies

The character prefab has been updated to include the funds script which references and can be used to change how much money the player has.

funds

The only other requirement is that the VendorGUI prefab is added to the scene.

Currently the player can only buy items and an error message will come up if the player can't afford an item.