| Home Page | Recent Changes | Preferences

NetMode

In replication, the NetMode property of the Level indicates what type of network game or standalone game is being played.

It is sometimes checked within functions or within the replication block when the code needs to behave slightly differently in a different network environment. It is most commonly used to differentiate whether an object with ROLE_Authority is in a botmatch/listen server or a dedicated server.

It will be different on clients and servers though other parts of the LevelInfo actor should be the same. The options are:

NM_Standalone
a botmatch or single player game
NM_DedicatedServer
a dedicated server
NM_ListenServer
a non-dedicated server (ie the Host Multiplayer Game in the menu)
NM_Client
a network client
simulated event Tick (float DeltaTime) {
  if ( Level.NetMode != NM_DedicatedServer ) {
    // Code here will only be executed on Listen servers and game clients.
  }
  if ( Level.NetMode == NM_DedicatedServer ) {
    // Code here will only be executed on a server.
  }
}

Related Topics


Category Enum

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

FAQs

Help Desk

Mapping Topics

Mapping Lessons

UnrealEd Interface

UnrealScript Topics

UnrealScript Lessons

Making Mods

Class Tree

Modeling Topics

Chongqing Page

Log In