llms.txt: machine-readable documentation index. Markdown version of this page is also available.

Ninja Bear Studio Plugins Help

Create a Handler and Switch Input Setups

Give the First Steps character an Inspect action that is available only while carrying a scanner. Keep movement on the controller. Toggle a second setup for the scanner so you can see precisely when its key starts and stops working.

Create the scanner input

  1. Create a Boolean Input Action named IA_Inspect with a Pressed trigger. Create a mapping context named IMC_Scanner and map an unused key to that action.

  2. In the Content Browser choose Ninja Bear Studio → Ninja Input → Input Handler. Select Ninja Input Handler as the parent and name the Blueprint IH_Inspect. In Class Defaults add IA_Inspect under Input Actions and Triggered under Trigger Events.

  3. Override Handle Triggered Event. For this test, call Get Pawn on the supplied Manager and print the pawn's display name followed by "inspected". In a game, use this same pawn to call your scanner component. Compile the handler.

Choosing an event override in an Input Handler Blueprint

Switch the controls on and off

  1. Create a second Input Setup, select IMC_Scanner and add IH_Inspect to its handler list. Leave the scanner setup out of the controller defaults.

  2. In the scanner equip event, get the player's Input Manager and call Add Input Setup Data with the scanner setup. In the unequip event, call Remove Input Setup Data with the same asset. To test without an equipment system, call those nodes from two temporary key events in the Level Blueprint.

Adding and removing the same setup on the Input Manager

Implement the Same Handler in C++

For a native handler, derive from UNinjaInputHandler. Declare this override in your class header, then configure IA_Inspect and Triggered on its entry in the Input Setup just as you would for the Blueprint version.

virtual void HandleTriggeredEvent_Implementation( UNinjaInputManagerComponent* Manager, const FInputActionValue& Value, const UInputAction* InputAction, float ElapsedTime) const override;

In the implementation file, include Components/NinjaInputManagerComponent.h and GameFramework/Pawn.h. For a first check, log the pawn receiving the press.

void UInspectInputHandler::HandleTriggeredEvent_Implementation( UNinjaInputManagerComponent* Manager, const FInputActionValue& Value, const UInputAction* InputAction, float ElapsedTime) const { if (APawn* Pawn = Manager->GetPawn()) { UE_LOG(LogTemp, Display, TEXT("%s inspected"), *Pawn->GetName()); } }

When Possession Should Switch Controls

For a drivable vehicle, implement Input Setup Provider Interface on the vehicle pawn and return the driving setup from Get Input Setups. With a controller-owned manager and Reset Setup for New Pawn enabled, possession handles adding and removing those controls. Keep shared actions on the controller.

Try It in Play

Press Inspect before equipping, while equipped, and after unequipping. Only the middle press should print the pawn name. Movement should work throughout. If Inspect still runs after unequipping, look for a second binding or a scanner context also registered at startup.

25 November 2026