CrimsonInput · Lesson 6 of 8
Bind the Actions
Before you start
- Completed: Author the Input Config
Chapters
Bind in Blueprint
The tag-based binders are C++ templates with no Blueprint node — and that's fine: in a pawn Blueprint you place one Enhanced Input Action event per action (IA_Move, IA_Ability1) exactly as in vanilla Enhanced Input, and forward ability presses to your ability system with the tag from the config.
Bind native input (C++)
// In SetupPlayerInputComponentUCrimsonInputComponent* CIC = CastChecked<UCrimsonInputComponent>(PlayerInputComponent);CIC->BindNativeAction(InputConfig, CrimsonGameplayTags::InputTag_Move,ETriggerEvent::Triggered, this, &AMyCharacter::Input_Move);
Bind ability input (C++)
BindAbilityActions binds every entry in the ability list at once — press fires on Triggered, release on Completed and Canceled — and hands your callbacks the tag:
CIC->BindAbilityActions(InputConfig, this,&AMyCharacter::AbilityInputTagPressed,&AMyCharacter::AbilityInputTagReleased,/*out*/ AbilityBindHandles);void AMyCharacter::AbilityInputTagPressed(FGameplayTag InputTag){// Forward to your ASC — e.g. CrimsonAbilitySystem's AbilityInputTagPressed(InputTag)}
Wire both release events
Release must handle Completed AND Canceled —
Canceled fires when a hold-style trigger was still Ongoing. Wiring only Completed leaves abilities stuck 'held' after an aborted hold.Grant abilities on the server
Abilities activated by tag need that tag on their spec — add it via
GetDynamicSpecSourceTags().AddTag(Tag) when granting, and grant only under HasAuthority().