Skip to content

Utils

Helpers available as Utils:method(...).

Source: Content/Lua/Utils.lua.

Methods

Lua call Arguments Returns Notes
Utils:angleRadToVector2(angle) angle: number — Angle in radians. Vector2 — Unit direction vector. Convert a clockwise angle in radians to a unit vector; zero points upward in world coordinates.
Utils:countList(listData) listData: QueryList<T> or nil — Readonly host list; the C# helper returns 0 for nil. integer — Declared host count; the current Lua call raises a binding error instead of returning a count. Count a host query list; this legacy generic host method currently fails to bind in the bundled NLua runtime, so read listData.Count instead.
Utils:isWithin(posX, posY, posX2, posY2, distance) posX: number — First world X position in pixels.
posY: number — First world Y position in pixels.
posX2: number — Second world X position in pixels.
posY2: number — Second world Y position in pixels.
distance: number — Radius in pixels.
boolean — True when the squared distance is less than the squared radius. Test whether the distance between two world positions is strictly less than a radius.
CLR declaration reference

These names identify the backing engine source declarations.

  • MiscUtils.AngleRadToVector2
  • MiscUtils.CountList
  • MiscUtils.IsWithin

Generated 2026-10-02T21:05:27.5090099Z · b8c9ae78 · 3 members.

Official modding overview · Signs of Life on Steam