Detailed Setup
NOTE: You can get a quick start using the ChessPuzzle - EntireDemoScene 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!
Player:
Layer of: Ignore Raycast
Any Interactable Object:
Tag InteractiveObject or as per the raycast script on the main camera, it will have the tag you need!
Adding a Player Character
When starting your new project please import an FPSController into your project. (Or 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 CPInteractor script to either the main camera or the main player object.
You can set:
Interact Distance: The distance the raycast will find an object
Interactive Tag: Whatever tag you use for interactive objects
Adding Managers
Now drag the:
InputManager
UIManager
AudioManager
InventoryManager
Disable Manager
Power Manager from the Prefabs folder into the hierarchy.
NOTE: Only drag this prefab into the hierarchy, not the scene.
UI Manager Setup
Select the UIManager, which will have the CPUIManager script and make sure all the items are connected as below:
All UI objects will be below this parent in the canvas
Inventory Manager Setup
Select the CPInventory – This item shouldn’t need editing at all, just make sure it’s on an empty gameobject
We don't need to do anything with this script, it will be updated automatically!
Input Manager Setup
Select the “CPInputManager” and make sure you choose button commands that you wish, from the dropdowns
Audio Manager Setup
Select the AudioManager and add the ScriptableObjects for sounds you will have created. (The ScriptableObjects folder will have some examples)
Adding AudioclipsDisable Manager Setup
Select the DisableManager and add your player script and CPInteractor script to the slots available.
Using Other Character Controller
NOTE: If you're using a different character controller, please edit the reference in the Disable Manager to reference your other script. See the page below for more details:
Power Manager Setup
Select the "Power Manager" and set:
Max Fuse Box Count - to the amount of fuse boxes you have for this puzzle
Disable Interaction - This is disables the tags and interaction after the puzzle is complete
Fuse Box List - This is all the fuse box objects in the system, add these to disable the tags when the power up happens.
Power Up event - Choose an event to happen when the event is activated
Fuse Pickup Setup
You can add one of these from the prefabs: Pickup Fuses
Tag: InteractiveObject
Add a Box Collider
Add a CPItem script to the object and set the ItemType to Chess Fuse
Add a CPFuseCollectable script and add the appropriate ScriptableObjects and your desired ScriptableObjects audio clip. (Found in the ScriptableObjects folder)
Interactive Fusebox Setup
You can add one of these from the prefabs: Fuse Boxes
Tag: InteractiveObject
Make sure to add a Box Collider
Add a CPItem script to the object and set the ItemType to Fusebox
Add a CPFuseBoxInteractable script and add the appropriate ScriptableObjects and settings:
Chess Piece Scriptable
This is the scriptable object that the fuse box will take as the CORRECT fuse when entering
Fuse Placed / Starter Fuse SO
Tick this and add a starter SO, if you want one to be inside the fuse box to start
Fuse Location
This is why the fuse will spawn as a visual aid, you can also set an offset if you add new fuses. More information on the support on the left hand bar of this document
Fuse Box Light
This is the fuse box light corresponding to the fuse box, it will be a child of this object
Power Manager
Add the power manager will controls this section. If you have multiple power managers, make sure to add the ones this is connected to
Insert Fuse Sound
This is the scriptable object sound that will play when you enter a fuse
Last updated