Structure proxy (self.InWorldStructure)¶
Bound on script tables as self.InWorldStructure. Only these members are available; unknown names are rejected.
Source: Utils/Lua/LuaStructureApi.cs.
Properties¶
| Name | Lua type | Access | Notes |
|---|---|---|---|
CursorOverrideType |
string or nil |
Read/write | Loaded structure cursor-override name, or nil when unavailable. Writes are ignored on unsupported hosts. |
GlobalCenter |
Vector2 | Read/write | Center in world pixels. Returns a Vector2 value copy; assign the whole vector to move the center. Reads (0, 0) and ignores writes when the structure is absent. |
HasCursorOverride |
boolean |
Read/write | Whether the structure enables its cursor override. Reads false and ignores writes when the structure is absent. |
Height |
integer |
Read-only | Structure height in pixels, or 0 when the structure is absent. |
ReceivesMeleeCollisions |
boolean |
Read/write | Whether the structure receives melee collisions. Reads false and ignores writes when the structure is absent. |
State |
string or nil |
Read/write | Current authored state string, or nil when unavailable. Direct assignment sets local state; use SetStateFromLua for the host state-change message. Writes are ignored when the structure is absent. |
Width |
integer |
Read-only | Structure width in pixels, or 0 when the structure is absent. |
Methods¶
| Lua call | Arguments | Returns | Notes |
|---|---|---|---|
self.InWorldStructure:AddBoneTextureOverride(boneName, spriteName) |
boneName: string — Authored bone name.spriteName: string — Authored sprite name. |
no return value | Override a loaded structure bone sprite. Unsupported hosts do nothing. |
self.InWorldStructure:ApplyCharMap(charMapName) |
charMapName: string — Authored Spriter character-map name. |
no return value | Apply an authored loaded structure character map. Unsupported hosts do nothing. |
self.InWorldStructure:GetBonePosition(boneName, textureOffsetX, textureOffsetY) |
boneName: string — Authored bone name.textureOffsetX: number — Horizontal texture offset from the bone in pixels.textureOffsetY: number — Vertical texture offset from the bone in pixels. |
Vector2 — World position as a Vector2 value copy; (0, 0) on unsupported hosts. | Read a Demina-animated loaded structure bone position in world pixels. This host helper requires a Demina AnimationPlayer; it is not a Spriter bone-query helper. |
self.InWorldStructure:IsAtPoint(globalPoint) |
globalPoint: Vector2 — Point in world pixels. |
boolean — False when the host is absent or does not support this operation. |
Test a world point against the loaded structure precise bounds. |
self.InWorldStructure:Kill() |
None | no return value | Kill the loaded structure. Unsupported hosts do nothing. |
self.InWorldStructure:LoadSoundEffect(label, path) |
label: string — Authored sound or light label.path: string — Content sound asset path. |
no return value | Load a named sound clip for a loaded structure. Unsupported hosts do nothing. |
self.InWorldStructure:PlayParticleEffectDuration(particleEffectPath, emitPosition, durationMS) |
particleEffectPath: string — Content particle asset path.emitPosition: Vector2 — Emission position in world pixels.durationMS: number — Duration in milliseconds. |
no return value | Trigger a loaded structure particle asset for a duration at a world position. Unsupported hosts do nothing. |
self.InWorldStructure:PlayParticleEffectOnce(particleEffectPath, emitPosition) |
particleEffectPath: string — Content particle asset path.emitPosition: Vector2 — Emission position in world pixels. |
no return value | Trigger a loaded structure particle asset once at a world position. Unsupported hosts do nothing. |
self.InWorldStructure:PlaySoundEffect(label, volume, pitch, distanceFalloff) |
label: string — Authored sound or light label.volume: number (optional); default 1 — Volume multiplier from 0 to 1. Defaults to 1.pitch: number (optional); default 0 — Pitch adjustment from -1 to 1; 0 is unchanged. Defaults to 0.distanceFalloff: number (optional); default 1500 — Distance-falloff range in pixels. Defaults to 1500. |
no return value | Play a named positional loaded structure sound with distance falloff. Unsupported hosts do nothing. |
self.InWorldStructure:RegisterLight(label, locX, locY, range, simple) |
label: string — Authored sound or light label.locX: number — Light center X in world pixels.locY: number — Light center Y in world pixels.range: number — Range in pixels.simple: boolean — True to use simple lighting; false for line-of-sight-aware lighting. |
no return value | Register or replace a named loaded structure light at a world position. Unsupported hosts do nothing. |
self.InWorldStructure:RegisterLight(label, location, pixelRange, simple) |
label: string — Authored sound or light label.location: Vector2 — Light center in world pixels.pixelRange: number — Light range in pixels.simple: boolean — True to use simple lighting; false for line-of-sight-aware lighting. |
no return value | Register or replace a named loaded structure light at a world position. Unsupported hosts do nothing. |
self.InWorldStructure:SetDrawBounds(x, y, width, height) |
x: integer — Horizontal pixel coordinate.y: integer — Vertical pixel coordinate.width: integer — Width in pixels.height: integer — Height in pixels. |
no return value | Set loaded structure local draw bounds in pixels. Unsupported hosts do nothing. |
self.InWorldStructure:SetPrintingDrawBounds(x, y, width, height) |
x: integer — Horizontal pixel coordinate.y: integer — Vertical pixel coordinate.width: integer — Width in pixels.height: integer — Height in pixels. |
no return value | Set loaded structure printing draw bounds in pixels. Unsupported hosts do nothing. |
self.InWorldStructure:SetStateFromLua(state) |
state: string — Authored structure state string. |
no return value | Set loaded structure state and send its state-change message when running on the host. Unsupported hosts do nothing. |
self.InWorldStructure:SetTileData(additionalIndex) |
additionalIndex: integer — Non-negative zero-based TileDataList index. |
no return value | Select authored tile data by zero-based index. Indexes at or above the list length and unsupported hosts do nothing; negative indexes are invalid. |
self.InWorldStructure:ShakeScreen(magnitude, duration, distanceFalloff) |
magnitude: number — Screen-shake magnitude in pixels.duration: number — Duration in milliseconds.distanceFalloff: number — Distance-falloff range in pixels. |
no return value | Shake the local screen with distance falloff from this loaded structure. Unsupported hosts do nothing. |
self.InWorldStructure:StartAnimation(animationName) |
animationName: string — Authored animation name. |
no return value | Start a loaded structure animation immediately. Unsupported structure hosts do nothing. |
self.InWorldStructure:TransitionToAnimation(animationName, transitionTime) |
animationName: string — Authored animation name.transitionTime: number — Transition duration in seconds. |
no return value | Transition a loaded structure animation. Unsupported hosts do nothing. |
self.InWorldStructure:UnRegisterLight(label) |
label: string — Authored sound or light label. |
no return value | Remove the named registered loaded structure light. Missing labels and unsupported hosts do nothing. |
CLR declaration reference
These names identify the backing engine source declarations.
String CursorOverrideTypeVector2 GlobalCenterBoolean HasCursorOverrideint HeightBoolean ReceivesMeleeCollisionsString Stateint Widthvoid AddBoneTextureOverride(String boneName, String spriteName)void ApplyCharMap(String charMapName)Vector2 GetBonePosition(String boneName, float textureOffsetX, float textureOffsetY)Boolean IsAtPoint(Vector2 globalPoint)void Kill()void LoadSoundEffect(String label, String path)void PlayParticleEffectDuration(String particleEffectPath, Vector2 emitPosition, float durationMS)void PlayParticleEffectOnce(String particleEffectPath, Vector2 emitPosition)void PlaySoundEffect(String label, float volume = 1, float pitch = 0, float distanceFalloff = 1500)void RegisterLight(String label, float locX, float locY, float range, Boolean simple)void RegisterLight(String label, Vector2 location, float pixelRange, Boolean simple)void SetDrawBounds(int x, int y, int width, int height)void SetPrintingDrawBounds(int x, int y, int width, int height)void SetStateFromLua(String state)void SetTileData(int additionalIndex)void ShakeScreen(float magnitude, float duration, float distanceFalloff)void StartAnimation(String animationName)void TransitionToAnimation(String animationName, float transitionTime)void UnRegisterLight(String label)
Generated 2026-10-02T21:05:27.5090099Z · b8c9ae78 · 26 members.