Flashlights have been man's best friend to combat darkness since the invention of electricity. A flashlight can even be turned into a weapon, as we saw with 2010's release of Remedy's Alan Wake.
In the following recipe, we'll be creating a flashlight that can attach to the pawn, as well as a weapon, and be toggled on and off with any key of your choice.
Start by creating a new class
WeaponFlashlight and have it extend from
SpotLightMovable. Also make it non placeable. Non placeable means that it cannot be dropped onto the map. Essentially it's there to keep things clean for the level designers, and avoid confusion as to how something should or should not be used.
For this recipe, we'll have to ...