How do i fix my wall jump so you can't infinitely jump on the same wall?

I would like to make it so you can only jump once on the same wall but im not sure how to do so, my current code makes it so the player jumps of the wall but they can just continue pressing space to repeatedly jump from the same wall.



Any advice is appreciated.

I used a counter to count the number of times the player had jumped, then prevent input actions until the player lands on the ground again. If you don’t want to limit the number of wall jumps the player can do, I think you would have to store the wall you hit from your line trace in an array, then disable wall jumping whenever the player hits any object in that array, resetting the array when the player lands on solid ground again.

I’m still relatively new and don’t exactly know how to implement that into the code, by any chance would you be able to show me? Thanks.

Wall Jump Array posted by anonymous | blueprintUE | PasteBin For Unreal Engine

Note that there are two events, Hit and On Landed.

image
What do i need to set the array property as?

Did you set the variable type to array? It should be in the details panel, the colored blob next to the variable name

I made the variable an array but it still doesn’t work, which one of these do i need to make the variable as?
image

Search for Actor

Actor doesn’t work so i tried what my character file was called which is BP_PlatformerCharacter, this allowed me to correct the array to the other piece of code but it created a new error.

Where is this logic being implemented? Are you using a specific blueprint type to wall jump off of? The blueprint I provided runs on the character blueprint, if that makes a difference.

i don’t really know what you mean but the blueprint is inside of the character if that’s what you mean?