Wx78 Gestalttrapper
Based on game build 722832 | Last updated: 2026-04-28
Overview
wx78_gestalttrapper.lua registers a spawnable inventory item entity designed for WX-78 character gameplay. The prefab's fn() constructor builds the physics body, attaches animation state, and configures socketable behavior. Server-side initialization sets the socket quality to SOCKETQUALITY.LOW and attaches inspectable and inventoryitem components. The prefab is referenced by its name "wx78_gestalttrapper" and instantiated with SpawnPrefab("wx78_gestalttrapper").
Usage example
-- Spawn at world origin:
local inst = SpawnPrefab("wx78_gestalttrapper")
inst.Transform:SetPosition(0, 0, 0)
-- Reference assets at load time:
local assets = {
Asset("ANIM", "anim/wx78_gestalttrapper.zip"),
}
-- Access socketable component on server:
if TheWorld.ismastersim then
inst.components.socketable:SetSocketQuality(SOCKETQUALITY.LOW)
end
Dependencies & tags
External dependencies:
MakeInventoryPhysics-- applies physics and floatable behavior for inventory itemsMakeInventoryFloatable-- configures item floating parameters in waterMakeItemSocketable_Client-- client-side socketable item setupMakeItemSocketable_Server-- server-side socketable item setupMakeHauntableLaunch-- registers hauntable behavior for ghost interactions
Components used:
socketable-- manages socket quality and socket interactionsinspectable-- enables player inspection textinventoryitem-- allows item to be picked up and carried
Tags:
- None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
assets | table | --- | Array of Asset(...) entries listing animation files loaded with this prefab. |
Main functions
fn()
- Description: Prefab constructor that runs on both client and server. Creates the entity, builds physics, attaches AnimState with bank and build, sets default idle animation, sets
inst.pickupsoundto"metal"for pickup sound effect, and configures socketable behavior with socket type"socket_gestalttrapper"viaMakeItemSocketable_Client. Server-side logic sets socket quality and attaches gameplay components. Returnsinstfor framework processing. - Parameters: None
- Returns: entity instance
- Error states: None — runs on every host (client and server) with appropriate guards.
Events & listeners
- Listens to: None identified in this file scope.
- Pushes: None identified in this file scope.
- World state watchers: None identified in this file scope.