# How can I change the projectile I'm shooting, but switch back to the original projectile?

**URL:** <https://forums.unrealengine.com/t/how-can-i-change-the-projectile-im-shooting-but-switch-back-to-the-original-projectile/306899>\
**Category:** World Creation\
**Tags:** enumeration, unreal-engine, projectile, UE4, CPP, Blueprint, question\
**Created:** [February 13, 2015, 10:56pm UTC](https://forums.unrealengine.com/t/how-can-i-change-the-projectile-im-shooting-but-switch-back-to-the-original-projectile/306899 "2015-02-13T22:56:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnonAlexander\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AnonAlexander\_1](https://forums.unrealengine.com/u/AnonAlexander_1)\
**Post date:** [February 13, 2015, 10:56pm UTC](https://forums.unrealengine.com/t/how-can-i-change-the-projectile-im-shooting-but-switch-back-to-the-original-projectile/306899/1 "2015-02-13T22:56:14Z")

</div>

So I’m currently using the FPS template that unreal gives you and I started with the c++ version and not the blueprinting. In my game, I want to be able to shoot a projectile, but say if I get a powerup, I want to change my projectile(bullet) to a different projectile(rocket) but then still return back to bullets after a certain amount of time. Does anyone know of a good way to go about swapping just the projectiles the character shoots? Blueprint or code works fine. Thanks

---

<div class="post-metadata">

**Author:** ![SupDeity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupDeity](https://forums.unrealengine.com/u/SupDeity)\
**Post date:** [May 4, 2018, 10:35am UTC](https://forums.unrealengine.com/t/how-can-i-change-the-projectile-im-shooting-but-switch-back-to-the-original-projectile/306899/2 "2018-05-04T10:35:58Z")

</div>

i would mostly recommend for people who dont have a lot of knowledge in c++ and are still learning to start with a blueprint template. obviously u can add c++ classes in it if you want something c++ related. u can even if need be, create a utility/ essential class like player controller do what u want in the class and then just create a blueprint using that c++ class.  
C++ Can be extended by blueprints and thats a awesome thing to have. Thanks to Epic for that.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_6981ce8c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_6981ce8c](https://forums.unrealengine.com/u/anonymous_user_6981ce8c)\
**Post date:** [May 4, 2018, 12:57pm UTC](https://forums.unrealengine.com/t/how-can-i-change-the-projectile-im-shooting-but-switch-back-to-the-original-projectile/306899/3 "2018-05-04T12:57:23Z")

</div>

When you collect the powerup, use an on component begin overlap event to set a bool (e.g. “bHasPowerup?”) in the player to true. When you attack, check if the bool is true. If true, spawn a rocket, if else spawn a bullet. You can use a delay node to switch back to no powerup (start the delay in the powerup collectable after setting the powerup variable to true.
