Gas Mask Sys - Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
Make sure to have a "GasMask_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
Make sure the "MainCamera" has the "Vignette and Chromatic Abberation" and "Blur Optimized" scripts. These should a ready be attached to your FPSController - MainCamera (If you imported from the prefabs folder.
In the "FPSController" script, will need to make sure the WalkSpeed and RunSpeed are both public to access them within the Gas Mask Controller, this will be automatically done if you're using the FPSController prefab from the prefabs
Max Equip Mask Timer
The time in seconds, it takes to equip the gas mask using the held button press
Default: 1
Mask Equipped Color
The equipped colour of the mask UI
Default: Green
Mask Normal Color
The normal colour of how the mask in the UI
Default: White
Walk Norm
The normal walk speed of the FPSController
Default: 5
Walk Gas
The speed of the FPSController inside Gas
Default: 2
Run Norm
The normal running speed of the FPSController
Default: 10
Run Gas
The speed of the FPSController running inside gas
Default: 4
Max Filter Timer
The maximum timer value
Default: 100
Filter Fall Rate
The speed at which the filter percentage falls, increase for more speed
Default: 2
Warning Percentage
At what percentage should we show the UI warning?
Default: 20
Default Vignette
The default value of the vignette
Default: 0.28
Mask Filters
How many filers does the player currently have?
Default: 0
Mask Icon UI
Add the “Mask Icon UI” from the CanvasManager
Filter Icon UI
Add the “Filter Icon UI” from the CanvasManager
Filter Collected UI
Add “Filters Collected UI” from the CanvasManager
Filter Percentage UI
Add “Filter Percentage UI” from CanvasManager
Vignette Effects
Add the "Main Camera" to this slot
Blur Effect
Add the "Main Camera" to this slot
Visor Image UI
Add the "VIsor_Mask_Overlay" image from the Gas Mask canvas
Can Breath?
A check to see if the player is inside the gas or not
Player Health
The normal player health
Default: 100
Health Fall
This is the health fall rate
Default: 2
Max Health
The Maximum health the player can have
Default: 100
Health UI Reference
Add the "HealthUI" from the "GasMaskCanvas"
N/A
Death Event()
You can add a script and reference a public method to do something when your health becomes zero
N/A
You can now add one of the “Mist_Green_Particle_Prefab” to your scene, or you can create your own inaccessible area by creating a collider, and adding the “GasDamage” script to it. Remember to set this collider to “isTrigger”