Main Setup

Setup Video:

General Setup Steps:

NOTE: You can get a quick start using the “Valve System Scene Prefab” object and drag that straight into your scene. This will everyone to be already setup, you can delete the art assets as required but checkout the demo scene if you’re confused!
  1. 1.
    When starting your new project please import an “FPSController” into your project. Add an “FPSController” prefab to your scene. (Unless you’re using the demo which will already have one added but the package will be required to be imported before use). You can add the “Raycast” script to either the main camera or the main player object.
2. Now drag the “InputManager”, “ValveUIManager”, “AudioManager”, ValveInventory, from the “Prefabs” folder into the hierarchy. NOTE: Only drag this prefab into the hierarchy, not the scene.
3. Select the “ValveUIManager” script and make sure all the items are connected as below:
4. Select the “ValveInventory” – This item shouldn’t need editing at all, just make sure it’s on an empty gameobject
5. Select the “InputManager” and make sure you choose button commands that you wish, from the dropdowns
6. Select the “AudioManager” and add the ScriptableObjects for sounds you will have created. (The ScriptableObjects folder will have some examples)
7. Creating a Valve Pickup (Wheel Object)
a. Add a coloured valve of your choice to the scene
b. Add a “ValveItemController” script to the object and set the “ItemType” to “Valve”
c. Add a “ValveCollectable” script and add the appropriate ScriptableObjects and your desired ScriptableObjects audio clip (Found in the ScriptableObjects folder)
d. Make sure this object has a “Box Collider” component added
8. Adding the valve slot component
a. Add a box collider in place of where you would like your slot to be (Where the valve will fit)
b. Make sure to add a “Box Collider”
c. Add the “ValveItemController” script and set this to “Slot”
d. Add the “ValveSlot” script and add the appropriate ScriptableObjects, the ValveWheel object (Which should be parented to this object but hidden) and the question mark object which will also be hidden for now.
e. Add the appropriate audio ScriptableObjects for attaching the valve to the slot
9. The Valve Wheel Object
a. Add a box collider to this object
b. It should be hidden or inactive by default
c. Add the “ValveItemController” script and make sure it’s set to “Wheel”
d. Add the “ValveWheelController” script and look at the settings below:
10. How to create ScriptableObjects for sounds: Just duplicate one of the sound ScriptableObjects from the “Sounds” folder and edit the parameters as below: