Safe Sys - Setup
Safe System - Video Setup
VIDEO COMING SOON
Safe Controller Main Setup
How to add a trigger event to for this system?
Basic Steps
I'd recommend adding the "SafeSystem_Objects" from the "Prefabs > Individual_Prefabs > Single Objects" section this should include a:
Safe Controller Object
Safe Canvas Object (UI)
Safe Model Object
Safe Trigger Object (If applicable)
Safe_Controller should have a:
"SafeController" script attached
Safe_UI
Safe Model should have a:
"AKItemController" script attached
"SafeItemController" script attached
Box Collider attached
Tag of "InteractiveObject" and layer of "Interact"
The Trigger object or similar with your custom script or the "SafeTrigger"
Safe Objects Setup
I have created a basic setup for organising the system, an empty gameobject to hold all of the safe assets:
Safe_Controller
Safe_UI
Safe_Model
Safe Controller Setup
This object should be an empty GameObject and it will control everything that goes on for your flashlight system!
Make sure this object has a "SafeController" script attached
Safe Model References:
Animation References:
Safe UI:
Safe Solution 0-15:
UI Numbers:
UI Arrows:
Trigger Type - ONLY If using a trigger event:
Unlock Events:
You can use the "+" icon to add an event for when you get the correct code, you can add custom interactions if you create a new script with a public method to spawn objects, or some other type of interaction when the safe is opened.
Safe Model Item Controller
Add this script to a 3D Keypad model from the prefabs or one you may have created yourself
Make sure your object has a tag of "InteractiveObject" and a Layer of "Interact"
Add a "Box Collider" to your object
Add an "AKItemController" - Set the System Type to: "SafeSys"
Add a "SafeItemController" script to the object
SafeController variable: Add the connected "Safe_Controller" object
Safe - Canvas Setup
NOTE: This only needs to be done if you’re setting the canvas buttons yourself or if anything might be missing.
Select and open out your “Safe_UI” (In Hierarchy) to find all the elements.
Select any of the "SafeFirstNumberUI" within the "Numbers_BG_Container" and select the child which will be the "FirstArrowUI" (And Similar)
Add an "OnClick()" event (If not already) - Add the "Safe_Controller" to the empty slot and then select the "SafeController" script from the drop down and choose "UpKey" Set it's value to 1. Do the same for the other "ArrowUI's" and then set those to 2 and 3 respectively.
Select the "AcceptKey" UI and add the "Safe_Controller" - Choose the "SafeController" script from the dropdown on the "OnClick" event and select the accept key
Default Controls
Left Click to interact with a safe
Use the "Right Click" Key on each of the safes to exit the safe
Use the "Left Click" Key to interact with the UI indicator
You can change these in the "InputManager"
Last updated