RealDocs

APawn::IsControlled

function Engine Blueprint Deprecated Since 4.0
Deprecated: IsControlled is deprecated. To check if this pawn is controlled by anything, call IsPawnControlled. To check if this pawn is controlled only by the player, call IsPlayerControlled.
#include "GameFramework/Pawn.h"
Access: public Specifiers: BlueprintCallable

Description

Returns true if the pawn currently has a valid controller. Deprecated since 4.24 — use IsPawnControlled() to check for any controller, or IsPlayerControlled() to check for a human player specifically.

Caveats & Gotchas

  • Deprecated since UE 4.24. Calling this will produce a compile-time deprecation warning; migrate to IsPawnControlled() (any controller) or IsPlayerControlled() (human players only) depending on your intent.
  • The old function did not distinguish between AI and player controllers; the ambiguity is why it was replaced with two more explicit alternatives.

Signature

ENGINE_API bool IsControlled() const;

Return Type

bool

Examples

Branch on whether this pawn is controlled (deprecated — prefer Is Pawn Controlled) Blueprint
Event BeginPlay Branch Condition Condition True False Print String In String Pawn is controlled! Pawn is controlled! Is Controlled Target is Pawn Return Value Return Value
Edit Blueprint graph Branch on whether this pawn is controlled (deprecated — prefer Is Pawn Controlled)
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Migrating away from IsControlled C++
// Old (deprecated):
// if (MyPawn->IsControlled()) { ... }

// New — check for any controller (AI or player):
if (MyPawn->IsPawnControlled()) { /* has any controller */ }

// New — check for human player only:
if (MyPawn->IsPlayerControlled()) { /* controlled by a player */ }

Version History

Introduced in: 4.0

Version Status Notes
5.6 deprecated
4.24 deprecated Deprecated in 4.24. Use IsPawnControlled() or IsPlayerControlled() instead.

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.