Flashlight
Overview
This is a guide on how to use the flashlight using the functionalities provided by the GunnerGirlComponent.
On the example GunnerGirl_Character blueprint, the default input is set to
Properties
If you select the GunnerGirlComponent on your character, there will be 2 properties that can be modified from the Details panel.
This will affect the status of the flashlight at the beginning of the game.
IsFlashlightEquipped is used to tell the system whether the character starts off by carrying a flashlight item or not.
The lights can only be turned on/off if the value ofIsFlashlightEquipped is set totrue
.IsFlashlightOn is used to tell the system whethern the lights should be on or off.
This property will only have an effect ifIsFlashlightEquipped have been set to true.
For further usage of the flashlight during runtime, please use the functions listed in the Functions section below.
Functions
There are 4 functions that can be used related to the flashlight.
1. Equip Flashlight
Used to tell the system that the character is carrying a flashlight item.
A call to
The parameter
2. Unequip Flashlight
Used to tell the system that the character is not carrying a flashlight item.
Any call to
3. Activate Flashlight
Used to turn on/off the flashlight once equipped, depending on the value given for parameter
4. Toggle Flashlight
Toggle the flashlight.
Turn the lights on when its off, and off when it's on.
OnFlashlightUpdated Event
Whenever
In the default setup, this event is used to sync the status of the flashlight on the GunnerGirl_Component with the ones available on the equipped guns.
The usage is not mandatory, as you can also control each of the flashlights manually if you want, as long as you have access to the required FlashlightComponent.