# Spectator - automatically switch to the next player

**URL:** <https://forums.unrealengine.com/t/spectator-automatically-switch-to-the-next-player/453445>\
**Category:** Multiplayer & Networking\
**Tags:** death, spectator, unreal-engine, respawn, Multiplayer, CPP, question\
**Created:** [August 6, 2019, 1:52pm UTC](https://forums.unrealengine.com/t/spectator-automatically-switch-to-the-next-player/453445 "2019-08-06T13:52:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_4e16c584](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4e16c584](https://forums.unrealengine.com/u/anonymous_user_4e16c584)\
**Post date:** [August 6, 2019, 1:52pm UTC](https://forums.unrealengine.com/t/spectator-automatically-switch-to-the-next-player/453445/1 "2019-08-06T13:52:50Z")

</div>

Hello,

I would like to implement following feature:

1.Player A just died and now he is spectating Player B.

2.Player B dies

3.Player A is automatically switched to spectate another Player

Instead of point 3 my spectator just goes into FreeCam state.

I am using standard code to start spectating:

```
	PlayerState->bIsSpectator = true;
	PlayerState->bOnlySpectator = true;

	ChangeState(NAME_Spectating);
	ClientGotoState(NAME_Spectating);

	ServerViewNextPlayer();

```

Is there an UE4 built-in mechanism to use to have Player A automatically switched to spectate another Player?

Can I somehow listen for event when player, which I am spectating, dies?
