Projectile Limiter

Good Afternoon,

I’m trying to create a simple (or what I thought was simple) mechanic that only allows the player to shoot a single projectile at a time. Sounds easy enough right? I have blueprints for the character, the projectile, and an interface that allows communication between the two.

First up in the Character blueprint:

http://www.tunnel-vision.net/storage/Proj_limiter_Char.JPG

I’ve setup the blueprint to set the “Can Shoot” bool contained in my interface (Projectile Limiter) to True at Event Begin Play. Next there is a check for whether the “Can Shoot” bool is set to True. If it is, go to the gate and wait for key press to open said gate. Once the gate is opened, spawn projectile and set the “Can Shoot” bool in the Projectile Limiter to False.

Second is the Projectile blueprint:

http://www.tunnel-vision.net/storage/Proj_limiter_Proj.JPG

In here we see that once the projectile is destroyed, an explosion particle spawns and we set the “Can Shoot” bool in the Projectile Limiter interface to True

Lastly we behold the majesty of the Projectile Limiter interface itself:

http://www.tunnel-vision.net/storage/Proj_limiter_Interface.JPG

How majestic!

Okay with all that, you should have a pretty good idea of what I’m trying to achieve. When I play the game, I am cannot shoot at all. Any help you masterminds can muster would be greatly appreciated. I’ve gone through all the documentation and blueprint tutorials I can find.

Bonus Question: Documentation states “To specify a Blueprint that exists within the level, it is best to make a Public variable of type ‘Actor’, and assign the appropriate Blueprint in the value for that variable using the Details tab of the Level Editor.” However in my case, the player nor the projectiles they spawn appear in the level until the game starts. I am unable to select them in the Level Editor and thus can’t adjust their details. How would I set these as the target in a blueprint interface?

Sorry for all the text. Please let me know if I’m approaching this whole thing all wrong and there’s a simple checkbox that does this exact thing.

Thanks in advanced!

I noticed that a lot of the examples and tutorials I’m seeing have blueprint interfaces that are editable. As you can tell in the above image, it’s all grayed out. Could that be part of the problem?

The Blueprint Interface functions are declared in the interface class itself, basically the ins and outs. What you want to do from there is add the interface to the class you want to manipulate and create the inter workings of the function there.

So for example, if you wanted an outside class to change a players health. You create the function in the Interface, then add that interface to the custom player class with the variables. Look within the custom player class BluePrint Properties to find how to add the interface. Then you’ll notice your functions being derived from the interface, and double click them. That will allow you to create the functionality to set the players health.