Good Day!
I have an issue with Enhanced Input system.
I have two types of wepons: a ranged and a melee type. Each type consumes same input (Right or Left mouse button) and triggers same base class function but each type consumes different InputEvent:
// For Range Weapon
void ABaseRangeWeapon::LeftClickAction(EInputEvent Event)
{
switch (Event)
{
case EInputEvent::IE_Pressed:
Load();
break;
case EInputEvent::IE_Released:
Release();
break;
}
}
// For Melee Weapon:
void ABaseRangeWeapon::LeftClickAction(EInputEvent Event)
{
Attack();
}
Is it possible to bind and remove action bindings dynamically based on the current type of weapon?
I want to change my weapon and code removes previous weapon type functions and bind the ones of the current one