Reset JumpCurrentCount after stomping enemy?

anonymous_user_f472eca2
Mon, 05 Dec 2016 00:57:46 +0000
Blueprint

I’m using a Character with a CharacterMovementComponent as my player in a game where the player can perform multiple jumps (limited by Max Jumps) before hitting the ground.

I’m able to detect when the player lands on an npc, and I want that to count as “hitting the ground” so they are able to jump again after bouncing off an npc’s head in order to chain jumps.

Problem is, using the CharacterMovementComponent, I see no way to reset the JumpCurrentCount back to 0 so the player can start jumping fresh.

JumpCurrentCount is a read only integer variable in Blueprint and I see no way to reset it, set it to 0, or have the character think it is back on ground for a frame from within Blueprint. My Character.h file is also read only, so it doesn’t appear that just changing that var to BlueprintReadWrite will work, and I’d rather not change a core header file anyways.

Any thoughts? I have the rest of my jump mechanics working well within the Movement Component setup but wasn’t expecting this to be an issue. Thanks in advance for your help!

7 posts - 6 participants