ShaunM
(ShaunM)
1
I am attempting to set up enhanced input for my game to allow the following:
- Tap the E key and the player fires the weapon once.
- Tap and hold the E key to initiate automatic fire and cease when the key is released.
I am doing this in C++.
How can I make this happen with Enhanced Input?
SpecZynk
(SpecZynk)
2
Hi,
Hope you’re doing well.
-
Simple make a BindAction as Trigged type, e.g.
EnhancedInputComponent->BindAction(ShotAction, ETriggerEvent::Triggered, this, &AGameCharacter::Shot)
;
-
In the mapping context make the final ajustment adding two triggers, pressed
and hold
.
You can also set the Threshold
to adjust the time response.
Hope that helps - take care!