🔏
APK - Doc - V1.5
  • Adventure Kit - V1.5
  • ⭐Getting Started
    • Main Setup
    • Managers Setup
      • Step 1 - Canvas Container
      • Step 2 - FPSController
      • Step 2.5 - Audio Manager
        • Audio Reference List
      • Step 3 - UI Manager
      • Step 4 - Input Manager
      • Step 5 - Disable Manager
    • Puzzles Setup
      • Chess Puzzle Sys - Setup
      • Letter & Note Sys - Setup
      • Lever Puzzle Sys - Setup
      • Themed Key Sys - Setup
      • Gas Mask Sys - Setup
      • Flashlight Sys - Setup
      • Generator Sys - Setup
      • Fuse Box Sys - Setup
      • Examine Sys - Setup
      • Padlock Sys - Setup
      • Keypad Sys - Setup
      • Phone Sys - Setup
      • Safe Sys - Setup
    • Interaction Options
  • URP / HDRP SETUP
    • URP/HDRP Setup
  • ❓Support
    • FAQ
    • System Namespace
    • Adding a Trigger Event
    • Using a different character controller
  • 🌀Development
    • Patch Notes - V1.5
    • Legacy Videos
  • 📧Contact Me
    • Request a feature
    • Contact Me
    • My Other Assets
Powered by GitBook
On this page
  • Flashlight System - Video Setup
  • Flashlight Controller Main Setup
  • Flashlight System - Basic Steps
  • Flashlight Controller Script
  • Flashlight Object - Setup
  • Battery Object - Setup
  • Default Controls

Was this helpful?

  1. Getting Started
  2. Puzzles Setup

Flashlight Sys - Setup

PreviousGas Mask Sys - SetupNextGenerator Sys - Setup

Last updated 4 years ago

Was this helpful?

Flashlight System - Video Setup

Flashlight Controller Main Setup

Make sure to have a "Flashlight_Canvas" object in your scene which will have all the UI elements. This will be a child of the "AK_CanvasContainer" if you've already imported it from the initial setup

Flashlight System - Basic Steps

  1. Make sure you have the Flashlight Canvas added

  2. Make sure your FPSController is a child of a parent object, this parent object should also have a child of "FlashlightSwing" attached. See below.

  3. Make sure the "FlashlightSwing" GameObject has a "Flashlight_Spot" as a child, including:

    1. FlashlightMovement script

    2. Spotlight component

  4. Add a "Flashlight Controller" prefab or script to an empty GameObject

  5. Make sure the "FlashlightController" script is UNTICKED by default or you will be able to interact as if you had a flashlight at the start

  6. Add a PBR flashlight or Battery object to your scene and do have the following:

    1. Set the tag to "InteractiveObjects"

    2. Set the layer to "Interact"

    3. Add a "Box Collider"

    4. Add an "AKItemController" and set the value to "FlashlightSys"

    5. Add the "FlashlightController" (Or Manager) depending on the naming conventions you use to the empty slot!

    6. Add the "FlashlightItemController" script and set it to "Flashlight" or "Battery" depending on the item you wish to use.

    7. Do the same for the battery object but change the settings accordingly.

See more details below:

Flashlight Controller Script

This object should be an empty GameObject and it will control everything that goes on for your flashlight system!

Flashlight Parameters:

Infinite Flashlight

Tick this if you don’t want to pickup batteries

Battery Deg

Set to 0.01 for slow, rate. Higher for a faster burn rate

Battery Count

How many batteries you have at the start and currently

Max Flashlight Intensity

The maximum intensity of the flashlight

Flashlight Rotation Speed

The speed the flashlight will follow the camera

UI References:

Battery Level

Add the “UI_BatterySlider” from the canvas

Battery Count UI

Add the “UI_BatteryCount” from the canvas

Flashlight On UI

Add “Flashlight_Indicator_On” from the canvas

Flashlight Off UI

Add “Flashlight_Indicator_Off” from the canvas

Main Flashlight UI

Add “MainFlashlightUI” from the canvas

Flashlight References:

Flashlight Spot

Add “Flashlight_Spot” gameobject from “FlashlightSwing”

Flashlight Movement

Add “Flashlight_Spot” to the “FlashlightMovement”

Flashlight Object - Setup

Flashlight Object setup - You can add a PBR Flashlight Object to your scene

  • Make sure your flashlight 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: "FlashlightSys"

  • Add a "FlashlightItemController" script to the object

    • Add the "FlashlightController" gameobject - Which will have the "FlashlightController"

    • Choose the object type: Flashlight

Battery Object - Setup

Battery Object setup - You can add a PBR Battery Object to your scene

  • Make sure your flashlight 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: "FlashlightSys"

  • Add a "FlashlightItemController" script to the object

    • Add the "FlashlightController" gameobject - Which will have the "FlashlightController"

    • Choose the object type: Battery

Default Controls

  • Left Click to interact with a pickup

  • Press “F” to turn the flashlight On / Off

  • Press “Q” to replace a battery

  • Press “TAB” to open the inventory

NOTE: The flashlight manager does have an option to include an "Infinite battery option, so the flashlight will never run out of power!

These can be edited in the "InputManager"

⭐
Basic FPSController setup for including the flashlight