Functions
engine.inc
| Function | Type | Description |
|---|---|---|
| client_PostThink | forward | Called after each client think. |
| client_PreThink | forward | Called at the start of each client think. |
| client_cmdStart | forward | Called for CmdStart() on a client. |
| client_impulse | forward | Called when a client triggers an impulse. |
| client_kill | forward | Called when a client types kill in console. |
| pfn_keyvalue | forward | Called when a keyvalue pair is sent to an entity. |
| pfn_playbackevent | forward | Called when an event is played. |
| pfn_spawn | forward | Called when an entity is spawned. |
| pfn_think | forward | Called when an entity thinks. |
| pfn_touch | forward | Called when two entities touch. |
| server_frame | forward | Called at the start of every server frame. |
| DispatchKeyValue | native | Fires/sets a keyvalue on an entity. |
| DispatchSpawn | native | Calls the spawn function on an entity. |
| attach_view | native | Attaches a clients viewport to an entity. |
| call_think | native | Calls the DispatchThink() game DLL function on an entity, triggering it to think if applicable. |
| copy_keyvalue | native | Retrieves buffers from the keyvalue structure. |
| create_entity | native | Creates an entity. |
| drop_to_floor | native | Uses the DROP_TO_FLOOR() engine function on an entity, which attempts to put it down on the floor. |
| eng_get_string | native | Retrieves a string from the engine string table. |
| entity_count | native | Returns the current number of entities in the world. |
| entity_get_byte | native | Returns a bytearray type value from an entities entvar struct. |
| entity_get_edict | native | Returns an edict type value from an entities entvar struct. |
| entity_get_edict2 | native | Returns an edict type value from an entities entvar struct. |
| entity_get_float | native | Returns a float type value from an entities entvar struct. |
| entity_get_int | native | Returns an integer type value from an entities entvar struct. |
| entity_get_string | native | Retrieves a string type value from an entities entvar struct. |
| entity_get_vector | native | Retrieves a vector type value from an entities entvar struct. |
| entity_intersects | native | Returns if two entities bounding boxes intersect by comparing their absolute minimum and maximum origins. |
| entity_range | native | Returns the distance between two entities. |
| entity_set_byte | native | Sets a bytearray type value in an entities entvar struct. |
| entity_set_edict | native | Sets an edict type value in an entities entvar struct. |
| entity_set_float | native | Sets a float type value in an entities entvar struct. |
| entity_set_int | native | Sets an integer type value in an entities entvar struct. |
| entity_set_model | native | Sets the model of an entity. |
| entity_set_origin | native | Sets the origin of an entity. |
| entity_set_size | native | Sets the size of the entity bounding box, as described by the minimum and maximum vectors relative to the origin. |
| entity_set_string | native | Sets a string type value in an entities entvar struct. |
| entity_set_vector | native | Sets a vector type value in an entities entvar struct. |
| fake_touch | native | Forces an entity to touch another entity. |
| find_ent_by_class | native | Searches entities in the world, starting at a specified index and matching by classname. |
| find_ent_by_model | native | Searches entities in the world, starting at a specified index and matching by classname and model. |
| find_ent_by_owner | native | Searches entities in the world, starting at a specified index, matching by owner and a configurable entity field. |
| find_ent_by_target | native | Searches entities in the world, starting at a specified index and matching by target. |
| find_ent_by_tname | native | Searches entities in the world, starting at a specified index and matching by targetname. |
| find_ent_in_sphere | native | Searches for entities inside a sphere, starting at a specified index. |
| find_sphere_class | native | Searches for entities inside a sphere around a specified entity or origin, matching by classname. |
| force_use | native | Forces an entity (such as a player) to use another entity (such as a button). |
| get_decal_index | native | Returns the index of a decal. |
| get_global_edict | native | Returns a edict type value from the server globals. |
| get_global_edict2 | native | Returns a edict type value from the server globals. |
| get_global_float | native | Returns a float type value from the server globals. |
| get_global_int | native | Returns a integer type value from the server globals. |
| get_global_string | native | Retrieves a global string type value from the server. |
| get_global_vector | native | Returns a vector type value from the server globals. |
| get_grenade_id | native | Finds a grenade entity, matching by owner. |
| get_info_keybuffer | native | Retrieves keyvalue buffer from a client or the server. |
| get_keyvalue | native | Retrieves a value from an entities keyvalues. |
| get_speak | native | Returns the engine module speak flags currently set on a client. |
| get_usercmd | native | Retrieves a value from a usercmd struct. |
| halflife_time | native | Returns the game time based on the game tick. |
| is_in_viewcone | native | Returns if an origin is in an entities view cone. Derived from SDK. |
| is_valid_ent | native | Returns if an entity index is valid (as required by other engine natives). |
| is_visible | native | Returns if an entity is visible to another entity. Derived from SDK. |
| playback_event | native | Plays back an event on the client. Most prominently used for gun firing animations. |
| point_contents | native | Returns the contents value of an origin. |
| radius_damage | native | Hurts (and kills, if applicable) players in a sphere. |
| register_impulse | native | Registers a function to be called on a client impulse. |
| register_think | native | Registers a function to be called on entity think on all entities of a specified class. |
| register_touch | native | Registers a function to be called on a touch action between entities of specified classes. |
| remove_entity | native | Removes an entity from the world. |
| set_ent_rendering | native | Sets rendering options of an entity. |
| set_lights | native | Sets the map lighting level. |
| set_speak | native | Sets the engine module speak flags on a client. |
| set_usercmd | native | Sets a value in a usercmd struct. |
| set_view | native | Sets the engine module view mode on a client. |
| trace_forward | native | Attempts to describe an obstacle by firing trace lines in a specified direction, offset on the z-axis around an origin. |
| trace_hull | native | Fires a trace hull on a specified origin or between two origins. |
| trace_line | native | Fires a trace line between two origins, retrieving the end point and entity hit. |
| trace_normal | native | Fires a trace line between two origins, retrieving the trace normal. |
| traceresult | native | Retrieves a result from the global engine module trace handle. |
| unregister_impulse | native | Removes a previously registered impulse hook. |
| unregister_think | native | Removes a previously registered think hook. |
| unregister_touch | native | Removes a previously registered touch hook. |