Using an air-based input without a prior grounded input?
I couldn't think of a better way to word this, but now that it's come up in at least two of my mechanics / player inputs, I can see it's going to cause a lot of problems down the road if I don't get it taken care of soon. I'm in the process of building an FPS using the Blank template and have followed some basic tutorials to get a rudimentary suite of mechanics going. That's all fine, but I'm running into a problem with two of my mechanics: a double jump and a hover or "Stabilizers" mechanic (based on the function of the same name from Halo 5: Guardians).
Currently, they use both use Booleans in the Controller section and a number of sequences / branches / DoOnce nodes in the Character section, with the actual actions (such as "air jump" versus "grounded jump") being put into their own functions. At the core of both the double-jump mechanic and now the stabilizers mechanic, I'm using Is Falling / Is Moving On Ground to apply the appropriate actions on inputs, so as to avoid firing off multiple jump types at once, stabilizing while the player is on the ground, etc.
With the double jump, it's not a huge issue assuming the player can only double jump after having jumped off the ground, but I'm also trying to get a double jump to fire off in the air even without an initial grounded jump (think Smash Bros, where if a character walks off a platform they can immediately use their second jump even if they've lost their first). I have that part working, but only if the player uses their ground jump and then lands and falls off of something in order to use the second jump. If the player hasn't jumped before (or the last type of jump they used was their double jump), the double jump can't be used in the air.
You can see the consequences of this setup with the Stabiliziers in the video here: https://twitter.com/gravitygauntlet/status/738588851518595075
As you can see, the stabilizers will activate if the player presses the necessary button (in this case the same button as Crouch) the very first time the player jumps, but afterwards stabilizing won't be enabled - the player has to crouch on the ground, and then they'll be able to use the stabilizers again. I was thinking of using something involving flip-flops, but I'm really not sure how to go about it.
asked Jun 03 '16 at 04:51 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here