# How do I remove a split-screen player?

**URL:** <https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, split-screen, unreal-engine, local-multiplayer, Multiplayer, Blueprint, question\
**Created:** [June 11, 2014, 4:39pm UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621 "2014-06-11T16:39:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tarwine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tarwine](https://forums.unrealengine.com/u/Tarwine)\
**Post date:** [June 11, 2014, 4:39pm UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/1 "2014-06-11T16:39:34Z")

</div>

I’m trying to implement a multiplayer mode with splitscreen. The menu only contains 1 menu pawn. When the player presses the “Multiplayer” button, a new map is loaded and on begin play I call “Create Player” three times.

Everything works great, but when I return to the main menu by hitting escape and opening that map, the screen is still split with 4 player controllers active. I’ve tried destroying the extra controllers, un-possessing each of them, and trying to call “Quit Game” on each, none of these work and calling quit game crashes the editor.

How can I remove or destroy these players?

---

<div class="post-metadata">

**Author:** ![Twrmois](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Twrmois](https://forums.unrealengine.com/u/Twrmois)\
**Post date:** [July 28, 2014, 5:04pm UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/2 "2014-07-28T17:04:37Z")

</div>

Destroying the extra controllers?  
Also in most cases returning to the main menu and then typing debugremoveplayer 3, then debugremoveplayer 2, then debugremoveplayer 1 in that order can fix the issue and restore it back to one player. When it comes down to “Quitting” depending on if that means quitting the session or the game itself, it shouldn’t be used on players 2 3 and 4.

If that suggestion doesn’t work, you may have to add a extra bit of code to your “multiplayer” code, such as telling the game to remove the three players upon the first player leaving that session.

---

<div class="post-metadata">

**Author:** ![Tarwine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tarwine](https://forums.unrealengine.com/u/Tarwine)\
**Post date:** [August 17, 2014, 3:53am UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/3 "2014-08-17T03:53:53Z")

</div>

Sorry for the late response but I figured it out - with help from the ShooterGame example. At the time - it had to be done in C++ it seems.

```
void AMultiplayerGameMode::RemoveSplitscreenPlayers()
{
	const int MaxSplitScreenPlayers = 4;
	ULocalPlayer* PlayersToRemove[MaxSplitScreenPlayers];
	int RemIndex = 0;

	for (FConstPlayerControllerIterator Iterator = GEngine->GameViewport->GetWorld()->GetPlayerControllerIterator(); Iterator; ++Iterator)
	{
		// Remove only local split screen players
		APlayerController* Controller = *Iterator;
		if (Controller && Controller->IsLocalController() && !Controller->IsPrimaryPlayer())
		{
			
			ULocalPlayer* ExPlayer = Cast<ULocalPlayer>(Controller->Player);
			if (ExPlayer)
			{
				PlayersToRemove[RemIndex++] = ExPlayer;
				Controller->PawnPendingDestroy(Controller->GetPawn());
			}
		}
	}

	for (int i = 0; i < RemIndex; ++i)
	{
		
		GEngine->GameViewport->RemovePlayer(PlayersToRemove[i]);
	}
	
}
```

---

<div class="post-metadata">

**Author:** ![StomachBug](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StomachBug](https://forums.unrealengine.com/u/StomachBug)\
**Post date:** [October 14, 2014, 7:41pm UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/4 "2014-10-14T19:41:15Z")

</div>

Hi Tarwine,

I was wondering if since this point if you have found a way to do it within blueprint. If not then where would I put the code that you have posted above?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![WaveParadigm](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WaveParadigm](https://forums.unrealengine.com/u/WaveParadigm)\
**Post date:** [December 1, 2014, 6:57am UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/5 "2014-12-01T06:57:23Z")

</div>

Actually, I have a stupid way to solve this problem: there’s a blueprint node for “Execute Console Command” so I used it to execute “DebugRemovePlayer 1”. This removes the player exactly how it should. Using string concatenation and a for loop I’d imagine anyone who needs to remove x many local players from their game will be able to do so, but I can’t imagine this is good practice.

Since people who work on the engine read these sometimes, why have a “Create Player” blueprint node if you’re not going to have a corresponding “Remove Player” one? It seems awfully inconvenient.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [January 1, 2015, 10:14pm UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/6 "2015-01-01T22:14:29Z")

</div>

The Console Command doesn’t work in a Shipping Build.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcd0d281](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcd0d281](https://forums.unrealengine.com/u/anonymous_user_bcd0d281)\
**Post date:** [January 2, 2015, 4:32am UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/7 "2015-01-02T04:32:50Z")

</div>

Thank you for posting this code. I was having a similar issue and this code allowed me to resolve it. Thanks again.

---

<div class="post-metadata">

**Author:** ![Peuce\_1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Peuce\_1](https://forums.unrealengine.com/u/Peuce_1)\
**Post date:** [January 19, 2015, 9:30am UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/8 "2015-01-19T09:30:04Z")

</div>

Hey!  
There is a non-coding way to do that too. Go to Edit-\> Project Settings-\> Project section-\> Maps&Modes-\> uncheck the Enable split screen box.  
Hope this helps (worked for me)  
Cheers

---

<div class="post-metadata">

**Author:** ![JGwinner](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JGwinner](https://forums.unrealengine.com/u/JGwinner)\
**Post date:** [August 13, 2019, 3:30am UTC](https://forums.unrealengine.com/t/how-do-i-remove-a-split-screen-player/285621/9 "2019-08-13T03:30:18Z")

</div>

Perfect! Thank you. The non-coding way is usually the best! Otherwise, you’re fighting the engine. Thanks for your response.
