Skip to content

ax.mapscene

Client-side map scene behavior.

Documented functions: 48  ·  Realm: client, server, shared

Functions


ax.mapscene:ApplyView(client, patch)

Update and return the map scene view override.

Realm: client

Parameters

Name Type Description
client Player -
patch table -

Returns

  • table|nil

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:591


ax.mapscene:BeginScene(scene, index)

Start transitioning to a scene.

Realm: client

Parameters

Name Type Description
scene table -
index number -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:562


ax.mapscene:ClearPreview()

Clear preview override.

Realm: client

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:100


ax.mapscene:GetMusicDuration(path)

Get music duration in seconds.

Realm: client

Parameters

Name Type Description
path any -

Returns

  • number

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:180


ax.mapscene:NormalizeMusicPath(path)

Normalize a music path string.

Realm: client

Parameters

Name Type Description
path any -

Returns

  • string|nil

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:108


ax.mapscene:PickNextScene()

Choose the next scene based on config.

Realm: client

Returns

  • table|nil,: number|nil

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:518


ax.mapscene:ResetMusic()

Reset music state and stop playback.

Realm: client

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:252


ax.mapscene:ResetState()

Reset scene transition state.

Realm: client

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:75


ax.mapscene:ResolveMusicPath(defaultPath)

Resolve the active music path (supports overrides).

Realm: client

Parameters

Name Type Description
defaultPath string -

Returns

  • string,: boolean, boolean

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:124


ax.mapscene:SendPVS(origin, bForce)

Send PVS origin to the server (or clear it).

Realm: client

Parameters

Name Type Description
origin Vector\|nil -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:684


ax.mapscene:SetMusicVolume(volume)

Set music volume and cache it.

Realm: client

Parameters

Name Type Description
volume number -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:200


ax.mapscene:SetPreview(identifier)

Apply a preview override.

Realm: client

Parameters

Name Type Description
identifier number\|string\|nil -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:94


ax.mapscene:ShouldPlayMusic(pathOverride)

Determine if music should currently play.

Realm: client

Parameters

Name Type Description
pathOverride string\|nil -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:338


ax.mapscene:ShouldRenderMapScene(client)

Determine if map scenes should render.

Realm: client

Parameters

Name Type Description
client Player -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:63


ax.mapscene:StartMusic(path)

Start map scene music.

Realm: client

Parameters

Name Type Description
path string -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:269


ax.mapscene:StopMusic(fadeOut, bForce)

Stop map scene music.

Realm: client

Parameters

Name Type Description
fadeOut number -
bForce boolean -

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:212


ax.mapscene:UpdateMusic()

Update music playback state.

Realm: client

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:392


ax.mapscene:UpdateMusicFades()

Update fade-in/out transitions.

Realm: client

Source: gamemode/modules/mapscene/libraries/cl_mapscene.lua:355


ax.mapscene:FindByName(name)

Find a scene by name (case-insensitive).

Realm: shared

Parameters

Name Type Description
name string -

Returns

  • table|nil,: number|nil

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:183


ax.mapscene:GetCount()

Returns the number of stored scenes.

Realm: shared

Returns

  • number

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:27


ax.mapscene:GetScenes()

Returns all stored scenes.

Realm: shared

Returns

  • table

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:21


ax.mapscene:IsFiniteNumber(value)

Check if a number is finite and non-NaN.

Realm: shared

Parameters

Name Type Description
value any -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:34


ax.mapscene:IsPair(scene)

Check if a scene entry is a paired scene.

Realm: shared

Parameters

Name Type Description
scene table -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:130


ax.mapscene:IsValidAngle(ang)

Validate an Angle.

Realm: shared

Parameters

Name Type Description
ang any -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:54


ax.mapscene:IsValidVector(vec)

Validate a Vector.

Realm: shared

Parameters

Name Type Description
vec any -

Returns

  • boolean

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:45


ax.mapscene:NormalizeName(name)

Normalize a name string.

Realm: shared

Parameters

Name Type Description
name any -

Returns

  • string|nil

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:63


ax.mapscene:NormalizeTags(tags)

Normalize tags to a cleaned list of unique, lowercase strings.

Realm: shared

Parameters

Name Type Description
tags table -

Returns

  • table

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:93


ax.mapscene:OnConfigChanged(key, oldValue, value)

Handle config changes relevant to map scenes.

Realm: shared

Parameters

Name Type Description
key string -
oldValue any -
value any -

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:270


ax.mapscene:PackScene(scene)

Pack a scene for JSON export (convert vectors/angles to tables).

Realm: shared

Parameters

Name Type Description
scene table -

Returns

  • table

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:218


ax.mapscene:ParseTags(tagString)

Parse a tag list from a string.

Realm: shared

Parameters

Name Type Description
tagString string -

Returns

  • table

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:75


ax.mapscene:ResolveScene(identifier)

Resolve a scene by index or name.

Realm: shared

Parameters

Name Type Description
identifier any -

Returns

  • table|nil,: number|nil

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:200


ax.mapscene:SanitizeScene(scene)

Validate and sanitize a scene entry.

Realm: shared

Parameters

Name Type Description
scene table -

Returns

  • table|nil,: string|nil

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:137


ax.mapscene:UnpackScene(data)

Unpack a scene from JSON export format.

Realm: shared

Parameters

Name Type Description
data table -

Returns

  • table|nil,: string|nil

Source: gamemode/modules/mapscene/libraries/sh_mapscene.lua:240


ax.mapscene:AddScene(scene)

Add a scene to the registry.

Realm: server

Parameters

Name Type Description
scene table -

Returns

  • boolean,: string|nil

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:143


ax.mapscene:ExportToJSON()

Export scenes to JSON for sharing.

Realm: server

Returns

  • string|nil

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:202


ax.mapscene:GetDataKey()

Build the persistence key for map scenes.

Realm: server

Returns

  • string

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:23


ax.mapscene:GetScope()

Get the configured persistence scope.

Realm: server

Returns

  • string

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:29


ax.mapscene:HandlePairCapture(client, scene, bPair)

Queue or complete a paired scene capture.

Realm: server

Parameters

Name Type Description
client Player -
scene table -
bPair boolean -

Returns

  • boolean,: string|nil

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:260


ax.mapscene:ImportFromJSON(json)

Import scenes from JSON.

Realm: server

Parameters

Name Type Description
json string -

Returns

  • boolean,: string|nil

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:218


ax.mapscene:Load()

Load scenes from disk.

Realm: server

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:40


ax.mapscene:RemoveScenesNear(position, radius)

Remove scenes near a position.

Realm: server

Parameters

Name Type Description
position Vector -
radius number -

Returns

  • number

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:169


ax.mapscene:Save()

Save scenes to disk.

Realm: server

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:72


ax.mapscene:SendPreview(client, identifier)

Send a preview target to a specific client.

Realm: server

Parameters

Name Type Description
client Player -
identifier number\|string\|nil -

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:283


ax.mapscene:SerializeScenes()

Serialize scenes for network sync using sfs + compression.

Realm: server

Returns

  • string|nil

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:84


ax.mapscene:SetupPlayerVisibility(client)

Add map scene origin to the PVS.

Realm: server

Parameters

Name Type Description
client Player -

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:290


ax.mapscene:Sync(target)

Send a scene sync to a player or broadcast.

Realm: server

Parameters

Name Type Description
target Player\|table\|nil -

Source: gamemode/modules/mapscene/libraries/sv_mapscene.lua:110


ax.mapscene:ApplyPayload(payload)

Apply a decoded payload to client state.

Realm: client

Parameters

Name Type Description
payload table -

Source: gamemode/modules/mapscene/networking/cl_networking.lua:20


ax.mapscene:HandleSyncPayload(compressed)

Handle a compressed sync payload.

Realm: client

Parameters

Name Type Description
compressed string -

Source: gamemode/modules/mapscene/networking/cl_networking.lua:29