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"

4.6 Preview and Create Session

I setup the node to accept 4 connections, and when I fire it in game, the function simply fails and I have no information as to why. Is this expected behavior for the preview and to be fixed in the official release? Or should this work?

Product Version: Not Selected
Tags:
more ▼

asked Dec 03 '14 at 06:04 PM in Blueprint Scripting

avatar image

TheFoyer
171 9 16 30

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

1 answer: sort voted first

This should work in the preview. Session creation failures should also be printed to the log, so providing the log output would be helpful, if possible.

Also note that currently you can only have one session active at a time - if a Create Session succeeded, you have to call Destroy Session before you'll be able to create another one successfully.

more ▼

answered Dec 03 '14 at 06:38 PM

avatar image

Ryan Gerleve STAFF
1.1k 25 12 49

avatar image TheFoyer Dec 04 '14 at 06:45 AM

Thanks So I have use lan set to true. And the log states:

 LogScript:Warning: CreateSession - Invalid or uninitialized OnlineSubsystem
 Warning: CreateSession - Cannot map local player to unique net ID
avatar image Ryan Gerleve STAFF Dec 04 '14 at 03:40 PM

Thanks, that's helpful! There are a couple setup steps you may have to perform as well - we're working on adding them to the official documentation. I'll use OnlineSubsystemNull as an example here, it will suffice for connecting multiple instances on the same computer or across a LAN.

If your project is a code project with a *.Build.cs file, you'll need a dependency on the "OnlineSubsystemNull" module.

For both code and blueprint projects, you also need to set the DefaultPlatformService in your DefaultEngine.ini file, like this:

 [OnlineSubsystem]
 DefaultPlatformService=Null

We hope to expose this setting in the editor in the future.

avatar image TheFoyer Dec 04 '14 at 03:51 PM

Awesome can't wait to try this! Now another related question I have and I think a lot of people have is: During development and testing, how do I test multiplayer over the internet? Or is that an option?

avatar image Ryan Gerleve STAFF Dec 04 '14 at 04:10 PM

You can still bypass the session-related blueprint nodes and connect directly to an IP address, using command-line parameters at launch or the "open <ip address>" console command. You'll probably have to open up the game port (default 7777) on any routers along the way, though.

To use the session functionality over the internet, you'll need to use a different OnlineSubsystem service implementation, such as Steam on PC (you'll need access to the Steam SDK to do so).

OnlineSubsystemNull won't be able to find games over the internet because it just uses simple UDP broadcast packets for discovery.

avatar image TheFoyer Dec 04 '14 at 04:20 PM

Perfect! Thanks for your help!

avatar image Genova Aug 27 '15 at 06:36 AM

Hey Ryan

If your project is a code project with a *.Build.cs file, you'll need a dependency on the "OnlineSubsystemNull" module.

What exactly do you mean ? I'm no programmer, and only added a C++ Blueprint following a tutorial, so I suppose I need to follow what you mentioned but if you could describe it step by step, that would help a lot !

Thanks

(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