Skip to content

hasInterface

ffredyk edited this page Jul 23, 2026 · 1 revision

hasInterface

Category

Multiplayer

Arity

NularhasInterface.

hasInterface

Description

Returns true if the current host has a player UI (graphical interface). Returns false for dedicated/headless servers. The host sets this via HasInterface property.

Registered by DeclareMultiplayerCommands(). NOT called automatically — host must invoke explicitly.

How It Works

Reads the host's HasInterface flag. Controls whether UI-related code should execute.

Usage

if (hasInterface) then {
    // Initialize UI, HUD, menus
    createHUD();
    showIntro();
};

if (!hasInterface) then {
    // Headless — do server work only
    startHeadlessAI();
};

Thread Safety

ReadOnly — pure query.

See Also

SQ# Wiki

Home

Engine Docs

Migration

Commands

Value Constructors

Arithmetic

Comparison

Logic

Array

String

Math

Random

Type & Introspection

HashMap

Code Execution

Concurrency

Scheduler

Thread Safety

Error

Output

Time

Multiplayer

Compiler

Clone this wiki locally