Objects
Objects passed to callbacks or returned by the API: entities, events, commands, console handles, Panorama values and trace types.
Object methods are called with : unless documented otherwise. Each object type has its own page.
The engine-backed object types are globals named after their type: base_entity_t, table_t, array_t,
utl_vector_int and its siblings, chat_message_t, user_cmd_t, hitbox_t, trace_t, trace_filter_base_t,
rn_collision_attr_t, font_t, texture_t, hud_texture_t, esp_element_t, hud_style_t, locale_t and
menu_object_t. None of them constructs (base_entity_t.new is nil): the API hands them out. Only ray_t(...) and
trace_filter_t(...) construct, besides the FFI value types. gameevent, view_setup, particle,
console.variable, console.command and panorama.object have no global at all.
| Object | Purpose |
|---|---|
Entities (base_entity_t) | base_entity_t: schema field access, entity methods and entity lifetime. |
gameevent | Game event object passed to events.<event name> callbacks; fields are read by key name. |
chat_message_t | Mutable HUD chat message passed to the player_chat callback. |
view_setup | Mutable view setup passed to the override_view callback. |
user_cmd_t | Read-only snapshot of the user command passed to the createmove callback. |
console.variable | Console variable handle returned by console.<name> and console.variables(): reading and setting values. |
console.command | Console command handle returned by console.<name> and console.commands(). |
panorama.object | Lua wrapper around a JavaScript value from Panorama. |
ray_t | Ray shapes for trace.shape: a line, an offset line, a sphere, a box or a capsule. |
trace_filter_t | Trace filter: interaction mask, collision group, entity iteration and an optional should_hit predicate. |
trace_t | Result of trace.line and trace.shape. |
hitbox_t | The game's hitbox record (CHitBox) returned by e:hitbox(index) and tr.hitbox. |
rn_collision_attr_t | Collision attributes exposed by trace_t.shape_attributes. |
font_t, texture_t and hud_texture_t | Opaque font and texture handles: where each one comes from, which functions take it and how long it lives. |
