x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to remove a player in splitscreen multiplayer?

I'm working on a splitscreen multiplayer game and I'm having a problem. I start with a player select menu that lets you choose 2, 3, or 4 players. If you choose a 4-player match and then go back to the menu when the game is done, it always loads 4 players even when you select 2 or 3 player. Those players stay in existence even on the menu screen. I looked at this post and it sounds like there isn't any solution other than a custom C++ script that doesn't work any more.

I tried using Destroy Actor on the player controller and the get controlled pawn of player controller. Didn't work.

Is there really no way to remove players after they're created? That's incredibly weird. We're making a multiplayer game but if you can't select a 3-player match after a 4-player one that's a big problem. Does anyone know a way to remove players?

Product Version: Not Selected
Tags:
more ▼

asked Mar 01 '15 at 08:55 PM in Blueprint Scripting

avatar image

JStancil1
26 1 3 5

avatar image MikeGameDev Mar 31 '15 at 01:44 AM

Hi, did you end up finding a solution to this problem?

avatar image JStancil1 Apr 01 '15 at 02:36 PM

No. I can't find a way. We had to just make it so you can't go back to the menu once the game starts. The players are created in the level blueprint, so if you load a different level, they stay in existence, and if you load the level again it creates more players so there's suddenly 5, 6 or 7 players, which is obviously not good. We just made it so that when you select start game (after choosing number of players) in the menu, it loads the level and never goes back to the menu until you exit the game. I just made a "Play again" option in a pop-menu that appears in the actual level when a winner is announced that resets everything in the level manually.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I solved this by having it remove (in reverse order from 3 going down to 0 in a for loop) the players that I saved in a savegame object file as "Not Joined". This seems to work pretty well.

Thing is, I needed 4 players before the game starts in earnest and they enter the level with Pawns, but I need to remove those players that are no longer involved once they get into the arena. I think players persist between levels is the reason.

more ▼

answered Jan 02 '18 at 12:21 AM

avatar image

mightyenigma
3.8k 18 24 21

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question