GetMonsterDimension

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 21:02, 11 October 2026 by QCherry (talk | contribs) (Release 0.1.8 / BUILD210 / Protocol 40: dimensions API availability, loading and UI fixes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getMonsterDimension

AVAILABLE FROM UPDATE 0.1.8
This function is available in G1R:MP 0.1.8 and later. The contract below includes the compatibility guarantees introduced in that update.

Reads the server-authoritative dimension of a monster.

Syntax

dimension = getMonsterDimension(monsterId)

Parameters

Name Type Required Description
monsterId string yes Decimal string returned by spawnMonster; preserve it as a string.

Returns

The integer dimension, including 0, or false for an invalid/missing entity.

Examples

local dimension = getMonsterDimension(monsterId)
if dimension ~= false then
    outputDebugString("Dimension: " .. dimension)
end

Notes

  • Available since 0.1.8 / Protocol 40. Both client and server must update together.
  • Server-side only. See Character dimensions for the complete scope, transition rules and character-creator example.
  • Dimension 0 is the default; the ordinary streaming distance still applies. World objects, doors, gates and items remain shared.
  • Use these exact lower-camel names; there is no client-side setter.
  • Getters do not grant mutation permission or change visibility. A valid dimension can be 0; test explicitly against false for missing entities.