# _InitActivePlats
function _InitActivePlats()Lazily creates the fixed-size active-platform slot table expected by tagged control operations.
src/p_plats.mlDrives lift and perpetual-platform thinkers with active-slot tracking, waits, stasis, and sounds.
doomdef.ml → src/doomdef.mldoomstat.ml → src/doomstat.mli_system.ml → src/i_system.mlm_random.ml → src/m_random.mlp_local.ml → src/p_local.mlr_state.ml → src/r_state.mls_sound.ml → src/s_sound.mlsounds.ml → src/sounds.mlz_zone.ml → src/z_zone.mlfunction _InitActivePlats()Lazily creates the fixed-size active-platform slot table expected by tagged control operations.
inline function _PlatFrontSector(line)Resolves the sector on a line's front side for platform trigger calculations.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
inline function _PlatMakeThinker(fn)Creates a platform thinker with list links, movement callback, direction, speed, and wait-state defaults.
| Parameter | Type | Default | Description |
|---|---|---|---|
fn | dynamic | — | Fn value supplied to `_PlatMakeThinker`. |
function _PlatSetSlot(idx, v)Rebuilds the active-platform sequence with one validated slot replaced, preserving list compatibility.
| Parameter | Type | Default | Description |
|---|---|---|---|
idx | dynamic | — | Zero-based element or table index. |
v | dynamic | — | Value consumed by the operation. |
inline function _PlatSoundOrg(sec)Selects the sector's positional sound origin, falling back to the sector when no dedicated origin exists.
| Parameter | Type | Default | Description |
|---|---|---|---|
sec | dynamic | — | Sec value supplied to `_PlatSoundOrg`. |
inline function _PlatStartSound(origin, snd)Emits a positional platform sound only when the sound subsystem is available.
| Parameter | Type | Default | Description |
|---|---|---|---|
origin | dynamic | — | Origin value supplied to `_PlatStartSound`. |
snd | dynamic | — | Snd value supplied to `_PlatStartSound`. |
activeplatsStores the activeplats collection used by the p plats subsystem.
function EV_DoPlat(line, type, amount)Starts the requested platform behavior in each tagged inactive sector and records it in the active-platform set.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
type | dynamic | — | Type value supplied to `EV_DoPlat`. |
amount | dynamic | — | Amount value supplied to `EV_DoPlat`. |
function EV_StopPlat(line)Puts every moving platform with the trigger tag into stasis while preserving its status for later resume.
| Parameter | Type | Default | Description |
|---|---|---|---|
line | dynamic | — | Map line or text line affected by the operation. |
function P_ActivateInStasis(tag)Resumes tagged platforms in stasis by restoring their previous status and movement callback.
| Parameter | Type | Default | Description |
|---|---|---|---|
tag | dynamic | — | Zone-memory or resource-lifetime tag. |
function P_AddActivePlat(plat)Places a platform mover in the first free active slot, failing explicitly when the fixed table is exhausted.
| Parameter | Type | Default | Description |
|---|---|---|---|
plat | dynamic | — | Plat value supplied to `P_AddActivePlat`. |
function P_RemoveActivePlat(plat)Clears a completed platform's sector ownership, removes its thinker, and frees its active slot.
| Parameter | Type | Default | Description |
|---|---|---|---|
plat | dynamic | — | Plat value supplied to `P_RemoveActivePlat`. |
function T_PlatRaise(plat)Advances a platform through upward, downward, waiting, and stationary states and emits movement or stop sounds.
| Parameter | Type | Default | Description |
|---|---|---|---|
plat | dynamic | — | Plat value supplied to `T_PlatRaise`. |