How can I break a loop once a player leaves the volume of a certain area?
Hi! I'm relatively new to Blueprint (or game making in general xD) and I think I'm starting to get the hang of it. However, I'm being troubled by a few problems. The first one that I'm trying to fix is looping.
I'm using the Rolling Ball template, and inside it there's a variable that turns on (CanJump) and it enables the player to jump. By default it's enabled when the player hits something. What I'm trying to do is make it so that when the player steps into a certain area (A physics volume) the player can jump an unlimited number of times (it loops every 2 seconds).
Now, all that works. The issue that I'm facing is that I would like to break the loop as soon as the player leaves the volume.
Here's what I did:
It's most likely something trivial that I overlooked, but please help me solve this issue. What I tried doing was making a custom variable with a Boolean that turned on whenever the player steps into the physics volume, and I made the WhileLoop use that as the condition. Whenever I try playing it crashes, so I'm a bit confused.
Thank you for your time!
Oh. Could you explain why?
answered May 01 '14 at 10:49 AM
The WhileLoop is executing itself into an infinite loop?
You can put the Completed into your Set node and it will be fine, but the loop body is probably what is getting you.
answered May 01 '14 at 10:14 AM
"EndOverlap "Event for that physics volume will help you :)
try to break the loop when "EndOverlap" fires
answered May 01 '14 at 11:23 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here