Flashlight with cone tracer

to duplicate the functionality in the video of healing players in the cone of light i would use a cone shaped mesh to get actors then use a line trace to ensure that they are in visual contact (make sure they arent on the other side of a wall). then have all of this on a timer so that the script can happen many times.

in the picture below youll see how i implemented all of this. on input Q pressed begin a looping timer that fires the check for players event, when the input is released the timer stops. the check for players event get all the actors overlapping the cone mesh, of the type specified in the filter (optional). then it runs each through a for each loop which checks is the target is in visual range via the line trace. then i just added health to the target if it was of a certain type.