My weapon blueprint is not working

Ok. Second try, I already wrote this down once but for some reason when I registered it did not save in a session as I was told when I pressed the button.

Been using unreal engine 4 for about a week now and the blueprint editor/system is a fantastic thing so I decided to give it a try and I got to a point were I am pretty much stuck.
So I made a weapon blueprint inside of the MyCharacter blueprint that comes with the first person shooter template and it works very well, I can shoot, sound effects play, particle effects play,… But I am still stuck with those blue arms and the basic “ball shooter shotgun”. So I dug into my hard drive and found a handgun I made a while ago. I followed some tutorials and gave it a bone. So it;s just 1 mesh with a skin and inside of the skin it has 1 bone, named Root.

I dropped it in the editor as a skeletal mesh and turned it into a blueprint. I then dropped it into my level and pointed it at a wall. It doesn’t have any physics or anything it’s just floating there in mid air facing a wall. Then copied the parts I needed from my character blueprint into my gun blueprint. I made the needed changes and attached my “B” key to trigger the entire thing. To my disappointment the gun did not fire. It does not even show a tracer even when I put the trace to visible for duration.

I have attached both my character blueprint(it works 100%) and my weapon blueprint so you can take a look. I have been stuck on this for 2 days now and I can’t seen to figure out why it doesn’t work.

Thanks in advance!

(blueprint looks quite messy because I have not separated it into classes yet)

Character blueprint:

Weapon blueprint:

(it looks quite small but when you open the attachment and zoom in a bit it becomes very readable)

I made it so the weapon can be picked up by following a tutorial online, now most of the people replied that it helped them but in my case nothing happened. I am really wondering if the blueprint is actually working but there is a different issue somewhere…

Hey ,

Your gun blueprint might not be receiving input from your player, which would explain why pressing ‘B’ did nothing.

If you go to the “Class Defaults” tab up the top of your gun blueprint, and make sure that “Auto Receive Input” is set to player zero.

By default, actor blueprints in unreal do not receive input, whereas your character blueprint will, which explains why it worked before. What you probably want to do is keep the Keyboard event in your character, which then tells the gun to fire through a custom event.

Also, you’ll want to make sure your “trace end” in the line trace is GetActorLocation + GetForwardVector * 2000, instead of GetForwardVector + GetForwardVector * 2000

Cheers,
Francis

you are problay right and my answer wroung when i tried aswering this i did not know mutch at all about blueprint

You guys do realise this question is about 2 years old?