BreadBeard
BreadBeard

Reputation: 11

Is there a way to have a button held automatically?

I followed a tutorial to make a wallrun blueprint. The only problem with it is that I have to hold the space bar to stay on the wall rather than having it stick automatically. The effect I want is for it to stick to the wall automatically, and I'm not sure if there is another way to do it other than trying to make the spacebar held down for the duration of the run. I've searched this question online but I didn't find any answers I could understand (I'm a beginner). I've been scratching my head over this and can't find a good solution. Help is greatly appreciated. This is the Blueprint: Sorry if it's a bit messy

Upvotes: 0

Views: 217

Answers (2)

tooomg
tooomg

Reputation: 469

Instead of using the Spacebar (or W) input event, you can also use the Event Tick which happens every frame, and in there check if your On Wall boolean is true and do the wallrun logic. This way, it won't be depending on the player input to work properly.

Upvotes: 0

BreadBeard
BreadBeard

Reputation: 11

This took a while of head-scratching, but I've come up with a solution that provides the desired effect. By changing the input to the W key, the character will run as long as that is being held.

Upvotes: 1

Related Questions