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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

GameMode is NULL after game starts

Using 4.3.0

I am unable to reference the GameMode using GetWorld()->GetAuthGameMode(); It returns a NULL address AFTER the game has started. However, it returns a proper value before the map is loaded.

The game mode is set in my DefaultEngine.ini document as follows:

 [/Script/EngineSettings.GameMapsSettings]
 EditorStartupMap=/Engine/Maps/Templates/Template_Default
 EditorStartupMap=/Game/Maps/Example_Map
 bUseSplitscreen=True
 TwoPlayerSplitscreenLayout=Horizontal
 ThreePlayerSplitscreenLayout=FavorTop
 GameDefaultMap=/Game/Maps/Example_Map
 ServerDefaultMap=/Game/Maps/Example_Map
 GlobalDefaultGameMode=/Script/TimeIsUp.TimeIsUpGameMode
 GlobalDefaultServerGameMode=/Script/TimeIsUp.TimeIsUpGameMode

How can I make sure the GameMode is properly set when the map is loaded?

Product Version: Not Selected
Tags:
more ▼

asked Aug 03 '14 at 08:25 PM in C++ Programming

avatar image

orbv
48 1 4 7

avatar image orbv Aug 03 '14 at 10:58 PM

After further investigation, it looks like the player client is also calling for the GameMode which will result in NULL.

avatar image donggas90 Aug 03 '14 at 11:09 PM
 GetWorld()->GetAuthGameMode(); 

Where did you call?

avatar image gmpreussner STAFF Aug 19 '14 at 06:23 PM

GameMode is only valid on the server. Are you calling this on the client?

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

0 answers: sort voted first
Be the first one to answer this question
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