Toggle "projectile should bounce" in BP

I can’t get to a node of the Should Bounce setting.
It would be for toggling between sticky projectiles and bouncy projectiles with the B key.
How could it be done?


Grab your Projectile component and drag it onto the graph then drag of it and use setter. In regards to toggling I would do it inside the character itself, just use two different projectile types. You could use a flip flop to set a variable (Actor:Class)

You might want to read [this][1] topic too.

Cool! What are the two purple Set nodes called?


Is your last picture in the FirstPersonCharacter?

What is this called?


That’s how I toggle between the projectile type. One of them is a default one the other one has bounce disabled. So I just toggle (set) Current Projectile variable and use that in my fire projectile script. (last screenshot)
Edit: You can create this variable simply by dragging of class from your spawn actor from class and promote it to variable. Then use the setters from 2nd screenshot. That way you will have the right type of variable. It has to be Actor → Class Reference.

In the first pic: You drag out “Get Should Bounce” twice, right?

Is this purple variable a Name? How do I define Current Projectile?

I could only pull out these nodes:


Also I don’t get the purple Set nodes :slight_smile:

I drag out from Class on SpawnActor Node and promote it to variable. Then I use the setter.

Your toggle (B) FlipFlop defines current projectile. Just select class for each of them (first one should be your Sticky Projectile BP and 2nd one should be the default one).

Got that now.
What’s happening here?

Just showing you how to get the node. :slight_smile: Use it once or set it in the properties of the projectile component, up to you. You were looking for the node so that’s how you get it.

Ah! Almost there. The Prints toggle fine, but both projectiles are bouncing!

Is everything right for a last check?

Set default value for CurrentProjectile to FirstPersonProjectile then Sticky for A and FPS one again for B. You can also add a print string after spawning actor and just plug current projectile there to see which one is spawning.

Jeez I had to set the integrated Spawn Projectile feature with a class!

Now it works!


Happy to help. :slight_smile: You might want to play with Initial Life Span or something like that inside a projectile to keep it in the world for a bit longer or indefinite.

Oh I did that already! :smiley:

Edit: All good! I fixed detonating these projectiles by improvising new connections which are the following:

Part 1

Part 2

Destroys all projectiles by releasing middle mouse button.


Hey man I extended the Flip Flop through a MultiGate to have a multitude of projectiles which works fine. However, how can I destroy them seperately with an own particle emitter ? You know I destroy the current projectile, but every one of those have the same particle emitter.

I have created a new question just in case it’s radical work. Would be great to hear from you.