Looping issue / Reducing the shots available.

I recently followed a tutorial about a shooting range.

I have got that working, but have 2 things I would like to add.

  1. I want the person to be able to only shoot one shot until the ball is destroyed by shot or hits the ground.

  2. I have hijacked SpaceBar to initiate the projectile to shoot. I only want to hit space once and then it to repeat until the timer runs out. But the end is tied up in it’s own loop.



1 : Use a bool as condition for a branch at start of your shoot event. when you shoot on true you set it false and do your shoot. On false nothing. In your projectile bp : Before destroy : cast to character set bool true.
2 : Not sure about what you want when you say "and then it to repeat " ? Do you want that hit space bar is ignored for a delay or that you have to hit it, something else ?

Thank you - I am guessing that since I have a VAR that checks if ball is alive. I could just run it of that and of the Destroy Actor node?

I currently use space bar to fire the projectile. Hit is quickly enough and tons of balls come out. I would like to hit space to set off a 60 second timer (Already running) then for the projectiles to fire at random intervals, not defined by hitting the space bar. I may change the timer to like 10 shots or something like that is that is easier for now.

I am currently using a flip flop to get the balls to come out at different location to throw things up a little.

Thanks for replying.


This is what I have added. for the one shot case.

Check Start/Stop. If true, shot then set to false.

When calculating Score - Set Start/Stop back to true.

If Ball is not hit, destroy Ball and set Start/Stop to yes.

As a back up, check if Skeet/Ball is alive, if not set Start/Stop to Yes

When hitting space bar, Set Start/Stop to yes.

Are these all necessary, or have I gone over board.


I didn’t see the double set needed at first, my bad.
Like this you will have situations with issues : you hit floor : “start fire” true : you can fire. you fire. “start fire” false you can’t fire. Then first actor is destroyed : “start fire” true again : you can fire again but the other projectile is in level and its modifications will create new troubles.

I would add a second bool “done” set to false with the set of “start fire” and set it true on “skeet alive” “start fire” set true. Then check it on destroy actor “start fire” set. If true do nothing, false : set “start fire” true. Also, i would set the destroy actor at the end, to be sure that destroying doesn’t block the end of the event.

I am not sure about the need of your control but

Took a little, got the loop thing going.

Getting there

It works ! Cheers ! ^^