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"

Open Level after character select screen puts player in own world(should be Multiplayer)

Hello.

I created a character select screen, theres 4 characters. This is on its own level. If I sumulate multiplayer on this level, all players start at the char select screen in the same "world" so this is fine.

After a selection is made, - I set a variable in game instance to log the character choice - then open the starting level using 'open level' - in the blueprint of the starting level, the variable in game instance is got and using that it spawns the actor then possess the actor

This works for all players, except once they get to the next level... they cant see each other anymore. Its like it loads 4 different instances of the level rather than all of them into the same one.

If I start the game from the new level (not using char selection) all characters start together(as the same default skin set in default pawn). But they can shoot and kill each other as per expected.

In the spawn and possess functions, I've tried running on server, multicasting, separating the functions and trying variations and they all give the same result... correct character spawning and possessing in their own world.

Hopefully someone can help. Let me know if anymore information would help.

CharSelect Widget

Result

LevelBP

Product Version: Not Selected
Tags:
widget.png (184.4 kB)
chars.png (467.3 kB)
levelbp.png (251.1 kB)
more ▼

asked May 08 '15 at 11:28 PM in Blueprint Scripting

avatar image

thankstipscom
644 38 37 70

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Thanks Nyu. I think you're on the right track.

I found this recent tutorial which is good start. I went through it. I'll attempt to merge it with my char select screen. IF I'm successful I'll post results and mark this answered for others

https://forums.unrealengine.com/showthread.php?68965-Blueprint-Youtube-Tutorial-Multiplayer-Lobby&p=288096#post288096

more ▼

answered May 09 '15 at 11:06 PM

avatar image

thankstipscom
644 38 37 70

(comments are locked)
10|2000 characters needed characters left

Just using Open Level for each individual player making their selection will load into their own levels.

For multiplayer one player has to start the game as a server and there are multiple ways you can do that in blueprint.

The easiest way to start a server is to use the Execute Console Command node. The command you would want to execute to load the level as a server is: open MapName?listen. This will create a listen server that other users will be able to join. For a user to join that server they will have to use the Execute Console Command node with the command: open ipoftheserver. ipoftheserver should be the IP of the hosts computer. You would have to modify your menu for players to specify if they want to start as host or join an existing server.

The other way would be to use Online Session Nodes which you can read about here. https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/OnlineNodes/index.html

more ▼

answered May 09 '15 at 12:21 AM

avatar image

nyu
21 1 2 2

avatar image thankstipscom May 09 '15 at 12:45 AM

hey nyu,

thanks for the prompt reply.

I didnt know about the OnlineNodes. I'll have a read on that. Few things though.

For testing now, do I have to create a build everytime then and run three instances? I thought adding players and dedicated server check mark, simulates that.

Also: After the player makes their selection, instead of opening the level, I'm assumign thats where the host or join session comes into play, assuming join... do I still spawn and possess the actor from the level blueprint as I'm doing already?

avatar image nyu May 09 '15 at 02:36 AM

You should be able to continue testing without having to build each time. If one window starts a server as host, the other windows open should still be able to connect.

You will most likely have to change how you handle your character select menu now. You should turn your selection menu into some form of lobby. Players all start a separate menu where they can choose to host or join. If a player hosts they will open the server and load into the character selection level. From there others will be able to join the host on that level and pick their characters.

After the character selections menu the host should be able to load into the level where characters will spawn and they can start playing. The host can initiate a console command called ServerTravel which allows the host and clients to load a new level without any disconnects and saving player info. https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/UWorld/ServerTravel/index.html

(comments are locked)
10|2000 characters needed characters left
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