I’m setting up a button to make something turn on. in my DefaultInput.ini i put in this
+ActionMappings=(ActionName="Plight",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F)
then in my character file i put in this
void AUnrealCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
PlayerInputComponent->BindAction("Plight", IE_Pressed, this, &AUnrealCharacter::ToggleFlashlight);
}
Anyone whos done this before, is that all i need to activate the button? If it is, it does not seem to run ToggleFlashlight();
I logged the function ToggleFlashlight(); and it does not show nothing in logs that it even ran.
Just wondering if i missed something somewhere? Any help would be very appreciated.