Flashlight and pistol

Hi guys,

So I am working on a project and have this idea i want to add, the idea is basically if I have my flashlight out, then i can only use my pistol or another small weapon, and when i want to use a larger weapon IE shotgun, then i want him to either hide the flashlight or not be able to use the weapon until the flashlight is out of my hands.

any help would be good, as I am not sure how to implement this at the moment.

Thanks.

You can use boolean for that, one in your character blueprint like FlashlightEquipped which will toggle true/false when you equip your flashlight.

Then a 2nd boolean ‘SupportFlashlight’ in your parent weapon blueprint. This way we will know that x weapon support flashlight. Your list of weapons data can be made via DataAsset or DataTable.

You will use both boolean when you call the event SwitchWeapon.

I hope that points you in the right direction :innocent: