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 do I force the editor to play as ListenServer?

Hi, i've been dealing with some annoying NetNode states. Whenever, I Launch a game with 1 client and no dedicated server, the editor runs the game: NetNode = NM_Standalone.

The problem with this mode is that none of my OnRep_functions get called breaking my gameplay. My current workaround is to run 2 clients which gives me the Primary player as the NM_ListenServer and the other player as NM_Client. However, I'm stuck with always playing with 2 players. I'm unable to disconnect the 2nd player as it closes out both instances.

I'm also just starting to work on some networking profiling, but I really need to just run one player.

Recap of questions:

1) How do I force the editor to play a single client as a ListenServer?

2) Is there a way to force "OnRep_functions" to execute in Standalone games?

Thanks! :)

Product Version: Not Selected
Tags:
more ▼

asked Jul 24 '14 at 12:09 PM in C++ Programming

avatar image

Devero
2.3k 114 61 232

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

1 answer: sort voted first

1) You can add ?listen to the advanced settings for PIE and it should run as a listen server. I believe the value is LocalMapOptions

2) See your other thread

more ▼

answered Jul 24 '14 at 05:47 PM

avatar image

Crzyhomer STAFF
1.2k 34 26 103

avatar image Devero Jul 24 '14 at 06:12 PM

thanks for the quick response. I'm having difficulty finding that option.

I have tried to put "?listen" under the "Multiplayer Options->Server Game Options" and I have tried to put it under the "Play in Standalone Game->Additional Launch Parameter".

However, both do not start the ListenServer. I have looked for the "LocalMapOptions" but i'm not seeing that category or keyword.

avatar image Crzyhomer STAFF Jul 24 '14 at 10:35 PM

You can add it to your DefaultEngine.ini

 [/Script/EngineSettings.GameMapsSettings]
 LocalMapOptions=

Or it should be under the "map settings" or "world settings" in the editor. Sorry I forget which off hand.

avatar image Devero Jul 25 '14 at 12:33 PM

Hi Josh, Thank you for your continued support. I'm still having issues with making the editor start as ListenServer even after trying your suggestions. Let me recap on what I've done thus far:

I have put the "?listen" command in the following places besides the before mentioned places.

1) ProjectSettings->Maps&Modes->DefaultMaps->Local Map Options

2) DefaultEngine.ini -> "LocalMapOptions=?listen"

3) BaseEngine.ini -> "LocalMapOptions=?listen"

4) Engine.ini -> "LocalMapOptions=?listen"

In the code I'm running the following:

GetNetMode() which returns : "NM_Standalone"

Thanks again. I wanted to double check everything to make sure I wasn't newb'ing it up. ;)

avatar image Crzyhomer STAFF Jul 25 '14 at 02:23 PM

I'm looking into it. I know the ini setting will work when you launch your project outside the editor. Let me see what's going on in the editor.

avatar image Crzyhomer STAFF Jul 25 '14 at 03:01 PM

Looks like 1 client forces into standalone by design when launching in editor. If your main problem was OnRep, I think we've solved that in the other thread.

I'll see about adding a "force listen server" option, but it may be low priority because running listen server with only 1 instance doesn't seem to be that common. You either run dedicated + client or 2 clients (1 as listen).

avatar image Devero Jul 25 '14 at 03:53 PM

Thanks for verifying that I wasn't loosing my mind :) It would be a nice feature to have when you guys get the more important features done :)

The other thread fixed my main problem that spurred me into this issue :) I found a temporary workaround. I run a single client from the editor and then just "open map?listen" after it starts. It then restarts the map for me so I can debug the listenserver state.

I appreciate the patience and support!

(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