Copy and Pasting Blueprint Nodes

We’ve been supplied a blueprint to create a functioning Sentry Gun (University Project). However it only accommodates one barrel when I have made my gun with two.

I’ve placed the sockets (where the gun’s projectile would be fired from) onto my model and named them _01 and _02. Then I went into the blueprint and renamed the blueprint function to do with shooting the gun with the _01 socket’s name, and that worked.

I then tested it with the _02 name, and then the other gun fired.

I then would have thought, copying and pasting the collection on nodes to do with firing the guns, naming one _01 and one _02 would solve my problem, but it doesn’t. Only the original function worked leaving the copy and pasted function not working.

I’m not sure what to try, any advice?

Hi man ,
When you grab and copy a selection of nodes in blueprint , most of them work fine.
The function are just duplicated, and the collapsed graphs get a copy_N .
The only thing i now is not duplicated completely , are the some event like the tick.
That tick will never fire anything.

You can easily create a spawning function to call and shoot from A, or B with a variable.
There should be also that you didnot changed all the variable to shoot in B if you did it by yourlself.
try to check what is not working , maybe you are shooting always in A ?
Your copy get fired?
If you cant rigure out post a screenshot.

Hey man, thanks for the response. I have to be honest with you though, I’m not quite sure what you mean. I have some screen caps to try and explain my problem better.

This is my Sentry Gun, the barrels are on the side and I’m trying to get it to fire projectiles from both.

I’ve placed the sockets roughly where I want them (Still need tweaking) and have named them _01 and _02.

Here’s the original set of blueprint nodes we were given to allow the gun to fire. In this image I’ve set it to the socket _01, and that barrel fires fine. If I was to set these nodes to _02, the other barrel fires perfectly fine. However if I copy and paste this collection of nodes:

The set up is exactly the same, it’s literally just copied and pasted, however when I set the socket to either _01 or _02, it doesn’t change a thing and nothing happens.

I’m not quite sure what to do, as I thought as long as I have the sockets different in each set of nodes, each barrel would fire. Does copy and pasting nodes make the new set of nodes useless? If so, what’s the point of copying them?

Anyways, any advice would be great.
Thanks

I’ve tried recreating the collection of nodes from scratch with all the new inputs and that doesn’t work either. Still having the problem of getting the second gun to fire.

The first thing i see : its the event node “Fire_Weapon_Copy” That event will never Fire.

Plus suggest you to add an imput to the fire_weapon event. A string or a boolean.
that you can plug in the Socket name.
So you just fire the Event Fire Weapon and add the imput of the socket you want to fire.
Or you just set the bool on or off, to shoot from the 01 or the 02.

Thanks for your response,

I’ll try your suggestions later on tonight when I get the chance.
I tried recreating the nodes from scratch which still didn’t work, and that wouldn’t have had the ‘_Copy’ part in the event, unless that’s not why it wouldn’t fire?

I’m not too clued in with blueprints as this was supplied to us rather than made by me, so I don’t know much about a string or Boolean that you’re talking about. But I’ll play around and see if I can figure something out.

Thanks.

Hi man ,
Here how it should be done.

When i call the fire event i say to the name of the socket.

Thank for the example. It’s kind of confusing me, being new to blueprints and all, sorry for not understanding completely.

I may have to remake that part of the blueprint though like you’ve done it. And that will have both sockets fire at the player when he comes into range of the gun? Because I notice you don’t have an ‘enemy in range’ node or ‘fire interval’ node.

Also, where does the bottom node chain (in your screenshot) link to?

Sorry for all the newby questions. We were just supplied a whole load of blueprints for pitch, yaw, fire and all of that with no guidance so it’s been a difficult task trying to figure things out.

Hi man ,
I have just attached that to my monster to show you a working example , so ignore the other links.

Question : why my duplicated “Weapon_Fire_event” dont work ?

Answer : Only 1 node for event is allowed. you can duplicate but it will never get called.

Tips: You can avoid this just putting in the node_ “sequence” you can pin out more action.

Question: I am doing it right?

Answer: Clone all that nodes was a waste of work.You can call an event with different inputs.

Question : I have to remake my blueprint?

Answer: Take some moments to think what you really need. here my tips.

Tips: To, fire with both the cannon with a delay . So you should just call Fire_event once. And then the fire event will fire with the left cannon, and then after a delay , with the second cannon.
To do this you should not use my last blueprint, but rearrange your first.
You sure, can check if the enemy is at right distance before call the event fire ! ( not in the fire event )

Otherwise if you want use the cannons separately. Like…
Of is a human , shoot with the left rifle… no its a tank shoot with the right cannon!
You can use my last blueprint. selecting a event on the right there is a setting where you can add inputs.
When you call the Fire_event you write in the name of the socket , and so many other things like the type of bullett.
Then in the event you pin out that input to full the specs of the spawn.

I hope its clear enough :slight_smile:

Sorry it took me so long to get back.

I finally managed to have a play around with what you suggested and I finally managed it! Thank you so much.

It took me a while to figure out what you meant, what was what and what went where but with some common sense I finally managed it.

I did want both of the barrels to fire so you advice about the sequence and delay was very helpful. Then I was just able to copy and paste the final part of the blueprint, figure out the delay time and I was golden.

Thanks again so much for your help.

Nice !
Could you take a moment to hit the button "Accept answer " ? :stuck_out_tongue_winking_eye: