Download

create button mashing mechanic?

How would I create a button mashing mechanic using blueprint in UE4 ?

Basically I want the play to key press the space bar for the door to open

Thanks !

make variable in door blueprint.

When player pushes space button, increase this var by lets say 100. Make this working only when player is inside trigger volume. Right after button press do test if player is inside volume (then add 100) and branch exec to nothingness when he is outside.

then inside door bp, decrease it by 2 every thick,

if player gets over 9000 open the door.

PS.

Experiment with values to make it possible to open. And do printing that value for debugging.
Also you need to place that variable inside door, and make player communicate with door bp. But this is topic of some tutorials, google them.

You can calculate position of door mesh and rotate/slide it accordingly to value of that player pushing.
Even better add small delay (move door every seconds (or in random time intervals from .5sec to 1sec to updated position, then interpto this value, so door will slowly move to current value.

No need to create duplicate threads: https://forums.unrealengine.com/showthread.php?50104-create-button-mashing-mechanic