# Why is there no on possessed event for client?

**URL:** <https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [July 31, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355 "2016-07-31T21:58:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Commander\_Shepard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Commander\_Shepard](https://forums.unrealengine.com/u/Commander_Shepard)\
**Post date:** [July 31, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/1 "2016-07-31T21:58:21Z")

</div>

There is this big gap in ue4 framework due to which there is no way to know when a pawn is possessed on a client reliably at that exact moment!

I want to run a function on client as soon as the pawn is possessed by a player on start of the game.

The PossessedBy event is fired only on the server that too long before the client version is even spawned on the client , if you make any RPC to the owning client to notify at this time you’ll get a null controller since its not possessed on the client yet.

On the other hand there seems to be no event on the controller to notify it has possessed a pawn either.

If you put a timer you either make miss it if loading takes too long or keep the player waiting if the game loads too fast. This is really bad scenario

---

<div class="post-metadata">

**Author:** ![Prototype6143](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Prototype6143](https://forums.unrealengine.com/u/Prototype6143)\
**Post date:** [July 31, 2016, 11:35pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/2 "2016-07-31T23:35:18Z")

</div>

I believe you can create a bool for _bIsPosessed_ and set replication to be repNotify to get your desired outcome. You can set bIsPossessed on the server side and once each client receives the update, they will call the repNotify function and you can then call the event or further functionality from there.

---

<div class="post-metadata">

**Author:** ![Commander\_Shepard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Commander\_Shepard](https://forums.unrealengine.com/u/Commander_Shepard)\
**Post date:** [November 11, 2016, 12:04pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/3 "2016-11-11T12:04:09Z")

</div>

> [@Prototype6143;573786](#):
>
> I believe you can create a bool for _bIsPosessed_ and set replication to be repNotify to get your desired outcome. You can set bIsPossessed on the server side and once each client receives the update, they will call the repNotify function and you can then call the event or further functionality from there.

Nah mate! The solution is to override the restart function in APawn

---

<div class="post-metadata">

**Author:** ![lotodore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lotodore](https://forums.unrealengine.com/u/lotodore)\
**Post date:** [November 12, 2016, 7:11pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/4 "2016-11-12T19:11:47Z")

</div>

> [@Commander Shepard;622016](#):
>
> Nah mate! The solution is to override the restart function in APawn

Could you please explain this in more detail? I also have the problem that I get a null controller in that case.

---

<div class="post-metadata">

**Author:** ![Commander\_Shepard](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Commander\_Shepard](https://forums.unrealengine.com/u/Commander_Shepard)\
**Post date:** [November 13, 2016, 9:45am UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/5 "2016-11-13T09:45:33Z")

</div>

> [@lotodore;622552](#):
>
> Could you please explain this in more detail? I also have the problem that I get a null controller in that case.

Please see the following:

> **[APawn::Restart](https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/GameFramework/APawn/Restart/)**
>
> Called when the Pawn is being restarted (usually by being possessed by a Controller).

the function restart is called on client when it’s possessed atleast when it’s spawned for the first time by game mode. I can’t say if it’s called when it’s unpossessed by a controller and then possessed by another but when it’s spawned by AGameMode it is definitely called on the client and when it is called you’ll have a controller available on it

---

<div class="post-metadata">

**Author:** ![lotodore](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@lotodore](https://forums.unrealengine.com/u/lotodore)\
**Post date:** [November 13, 2016, 9:42pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/6 "2016-11-13T21:42:44Z")

</div>

I tested this and it works fine. Thank you.

---

<div class="post-metadata">

**Author:** ![MaxPower42](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MaxPower42](https://forums.unrealengine.com/u/MaxPower42)\
**Post date:** [March 8, 2017, 2:21am UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/7 "2017-03-08T02:21:33Z")

</div>

Yo. I am having a problem with OnRep\_Pawn. It triggers immediately when the game starts, but when I change a client’s pawn later by calling possess on the server, OnRep\_Pawn doesn’t get called anymore. I checked the Pawn-variable of the client’s controller on both server and the client itself: it changes to the new pawn correctly. And there is no call to OnRep\_Pawn…

edit: just noticed this wasn’t the topic I wanted to reply to… but since it’s also pretty much on-topic, i’m gonna leave this here as well.

---

<div class="post-metadata">

**Author:** ![drew767](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@drew767](https://forums.unrealengine.com/u/drew767)\
**Post date:** [February 8, 2022, 12:54am UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/8 "2022-02-08T00:54:55Z")

</div>

No need to override APawn::Restart

just get notified directly in player controller method  
virtual void AcknowledgePossession(class APawn\* P) override;

---

<div class="post-metadata">

**Author:** ![Bionic\_Ape](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bionic_ape/32/1090124_2.png) [@Bionic\_Ape](https://forums.unrealengine.com/u/Bionic_Ape)\
**Post date:** [July 26, 2022, 6:49pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/9 "2022-07-26T18:49:05Z")

</div>

Hi,

EDIT: my answer only works for controller changed, not as a substitute of OnPossessed. For that you should use Restart as mentioned.

There are several options to let the client know when a Pawn has been possessed.

You can either use the BlueprintImplementableEvent “ReceiveControllerChanged”, bind to the Delegate “ReceiveControllerChangedDelegate” or override “NotifyControllerChanged”.

```auto

	/** Event called after a pawn's controller has changed, on the server and owning client. This will happen at the same time as the delegate on GameInstance */
	UFUNCTION(BlueprintImplementableEvent)
	void ReceiveControllerChanged(AController* OldController, AController* NewController);

	/** Event called after a pawn's controller has changed, on the server and owning client. This will happen at the same time as the delegate on GameInstance */
	UPROPERTY(BlueprintAssignable, Category = Pawn)
	FPawnControllerChangedSignature ReceiveControllerChangedDelegate;

	/** Call to notify about a change in controller, on both the server and owning client. This calls the above event and delegate */
	virtual void NotifyControllerChanged();

```

---

<div class="post-metadata">

**Author:** ![Subressor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/subressor/32/1112012_2.png) [@Subressor](https://forums.unrealengine.com/u/Subressor)\
**Post date:** [September 11, 2025, 2:06pm UTC](https://forums.unrealengine.com/t/why-is-there-no-on-possessed-event-for-client/70355/10 "2025-09-11T14:06:45Z")

</div>

For anyone looking at this in the future, there’s a much more straightforward method, but you need C++.

There’s a OnRep\_Pawn method that is called whenever Possession changes, defined in AController. I would recommend just adding the override to be BP Implementable and extend from it there. Not sure why this isn’t default behavior tbh.

Using this, I call my character-specific UI construction after a “islocallycontrolled” check.

**Property itself (header and cpp)**

```cpp
ACharacter.h

UPROPERTY(replicatedUsing=OnRep_Pawn) TObjectPtr Pawn;

ACharacter.cpp

/** Replication Notification Callbacks */
UFUNCTION()ENGINE_API virtual void OnRep_Pawn();AController Codevoid AController::OnRep_Pawn(){APawn StrongOldPawn = OldPawn.Get();
// Detect when pawn changes, so we can NULL out the controller on the old pawn
if ((StrongOldPawn != nullptr) && (Pawn != StrongOldPawn) && (StrongOldPawn->GetController() == this))
{
// Set the old controller to NULL, since we are no longer the owner, and can’t rely on it replicating to us anymore
StrongOldPawn->SetController(nullptr);
if (UE::Gameplay::CVars::bAlwaysNotifyClientOnControllerChange)
{
// This will notify other systems like the game instance
StrongOldPawn->OnRep_Controller();}}OldPawn = Pawn; SetPawn(Pawn);  
if (StrongOldPawn != Pawn) 
{ 	
   OnPossessedPawnChanged.Broadcast(StrongOldPawn, Pawn); }
}

```

Soo… Just create a BP Event from this Rep, and your gamin. Add in a GetPawn if you want for basically a RepNotify OnPossess (or unpossess)

```cpp
protected:
/** This is the standard override on the replicated Pawn variable 
(UPROPERTY) */
virtual void OnRep_Pawn() override;

/* BP Event triggered by OnRep */
UFUNCTION(BlueprintNativeEvent, Category = “Pawn”)
void K2_OnRep_Pawn();

virtual void K2_OnRep_Pawn_Implementation();
void ABGPPlayerController::OnRep_Pawn()
{
Super::OnRep_Pawn();
// Custom event for BP
K2_OnRep_Pawn();
}

void ABGPPlayerController::K2_OnRep_Pawn_Implementation()
{
// This is the base C++ implementation.
// You can leave this empty if you want all logic to be in Blueprint.
}

```
