Shooting a weapon after it's equipped

Hello,

Instead of using a key input in your gun, create a custom event (lets call it ‘Fire Gun’) that triggers the fire code. You’ll want to make sure the basic logic for firing a gun is in parent class for all of your gun child classes (P90, AK47, etc…)

In your Character BP, after you equip the gun, set it as a variable (lets call that one ‘Gun’). When you unequip it, set the ‘Gun’ variable to nothing.

Add the Left Mouse Button Key Input into your character and get a reference to the Gun reference variable. From the Gun reference, pull out the ‘Fire’ Custom Event Call and put it after the Left Mouse Button input event. Between the Input Event and Fire, add a ‘Is Valid Node’. That will make sure it only fires if you have a gun equipped.

Let me know if this makes sense!