Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Difference between revisions of "QuakeC Fields"

From Quake Wiki

m (System Fields)
m (Reverted edits by Boondorl (talk) to last revision by 172.222.10.58)
Line 1: Line 1:
Quake's fields are broken down into two main types: system fields and entity fields. When a field is declared, every entity in the game has their own version of that field. Valid field data types include <code>string</code>, <code>vector</code>, <code>float</code>, and <code>entity</code>. Function pointers are also allowed by specifying the return type and any parameters that need to be passed to it. The return type should be <code>void</code> if it doesn't return anything. Fields are declared via
+
Quake's fields are broken down into two main types: system fields and entity fields. When a field is declared, every entity in the game has their own version of that field. Valid field data types include <code>string</code>, <code>vector</code>, <code>float</code>, and <code>entity</code>. They are declared via
 
     .datatype variableName;
 
     .datatype variableName;
    .returntype(datatype param1) functionPointer;
+
Note the <code>.</code> as declaring a variable without this will make it global instead of entity-specific.
Note the <code>.</code> as declaring a variable without this will make it global instead of entity-specific. When setting a function pointer, only the name of the function is needed e.g. <code>entity.functionPointer = MyFunction;</code>. It can then be called like any other function by invoking the pointer.
 
  
 
System fields are fields defined within the engine itself and must be present for the game to work. These are always defined after the system global fields. The end of them is denoted by the <code>void end_sys_fields;</code> declaration. System fields must always be declared in the order defined within the vanilla QuakeC files as they are linked by memory offsets internally. Changing the order will break logic.
 
System fields are fields defined within the engine itself and must be present for the game to work. These are always defined after the system global fields. The end of them is denoted by the <code>void end_sys_fields;</code> declaration. System fields must always be declared in the order defined within the vanilla QuakeC files as they are linked by memory offsets internally. Changing the order will break logic.
Line 18: Line 17:
 
*''float'' '''[[Fields:Solid|solid]]''' - The type of collision the entity has. There are special rules for BSP entities regarding their '''movetype'''.
 
*''float'' '''[[Fields:Solid|solid]]''' - The type of collision the entity has. There are special rules for BSP entities regarding their '''movetype'''.
 
*''vector'' '''origin''' - The current world coordinate of the entity. Should be set by <code>setorigin()</code> since it involves relinking the entity to the world.
 
*''vector'' '''origin''' - The current world coordinate of the entity. Should be set by <code>setorigin()</code> since it involves relinking the entity to the world.
*''vector'' '''oldorigin''' - Used with <code>MOVETYPE_WALK</code> to determine if the entity is stuck when moving. Secret door entities also use this to record their spawn position.
+
*''vector'' '''oldorigin''' - Only used with <code>MOVETYPE_WALK</code> to determine if the entity is stuck when moving.
 
*''vector'' '''velocity''' - The movement direction and speed of the entity measured in map units/second.
 
*''vector'' '''velocity''' - The movement direction and speed of the entity measured in map units/second.
 
*''vector'' '''angles''' - The current direction as (pitch, yaw, roll) the entity's model is facing. Players use '''v_angle''' for their camera direction. Note that positive pitch values point up and negative pitch values down within this field. If you wish to pass it directly to <code>makevectors()</code>, you should negate the pitch before doing so. BSP entities should not use this field as their bounding box will not be aligned to their orientation.
 
*''vector'' '''angles''' - The current direction as (pitch, yaw, roll) the entity's model is facing. Players use '''v_angle''' for their camera direction. Note that positive pitch values point up and negative pitch values down within this field. If you wish to pass it directly to <code>makevectors()</code>, you should negate the pitch before doing so. BSP entities should not use this field as their bounding box will not be aligned to their orientation.
Line 69: Line 68:
 
*''entity'' '''enemy''' - For monsters, the entity it's currently chasing after. This is also the entity floating and swimming monsters will always try to align their height to.
 
*''entity'' '''enemy''' - For monsters, the entity it's currently chasing after. This is also the entity floating and swimming monsters will always try to align their height to.
 
*''float'' '''[[Fields:Flags|flags]]''' - The flags for the entity.
 
*''float'' '''[[Fields:Flags|flags]]''' - The flags for the entity.
*''float'' '''colormap''' - The current color map index for the entity's model. This is mostly for player corpses and should match the player number the entity is mimicking.
+
*''float'' '''colormap''' - The current color map index for the player's model.
 
*''float'' '''team''' - What team the player is on in team-based PvP modes.
 
*''float'' '''team''' - What team the player is on in team-based PvP modes.
 
*''float'' '''max_health''' - The maximum amount a player can heal from standard health pickups.
 
*''float'' '''max_health''' - The maximum amount a player can heal from standard health pickups.
Line 104: Line 103:
 
== Entity Fields ==
 
== Entity Fields ==
 
These can be defined anywhere in any order. Removing or changing them isn't advised since maps use field names to determine what values to set, and any field can be arbitrarily set from the map editor. Modifying these could cause vanilla maps to break due to incorrect initializing.
 
These can be defined anywhere in any order. Removing or changing them isn't advised since maps use field names to determine what values to set, and any field can be arbitrarily set from the map editor. Modifying these could cause vanilla maps to break due to incorrect initializing.
=== World Fields ===
+
*''string'' '''wad''' -
 +
*''string'' '''map''' - The current name of the level. This is the actual file name and not the presentable one.
 
*''float'' '''worldtype''' - Used across various entity types to determine what type of level it is and what assets should be used e.g. keys.
 
*''float'' '''worldtype''' - Used across various entity types to determine what type of level it is and what assets should be used e.g. keys.
*''string'' '''wad''' - Unused.
+
*''string'' '''killtarget''' - The '''targetname''' id of the entities to remove from the world when activated. Contrary to its name, this will delete them and not kill them. This takes precedence over '''target''' by default.
=== Map Entity Fields ===
+
*''float'' '''light_lev''' -  
*''string'' '''map''' - Used by level changing entities to store what the next map to go to is.
+
*''float'' '''style''' -  
*''float'' '''style''' - The id of the light style layer to use for the light entity.
+
*''void()'' '''th_stand''' -  
*''float'' '''light_lev''' - The intensity of the light entity.
+
*''void()'' '''th_walk''' -  
*''float'' '''bubble_count''' - The number of bubbles for a bubble spawner to create.
+
*''void()'' '''th_run''' -  
*''string'' '''mdl''' - Used by items to store their current model name so it can be reset when respawned.
+
*''void()'' '''th_missile''' -  
*''float'' '''aflag''' - The amount of ammo an ammo pickup gives.
+
*''void()'' '''th_melee''' -  
*''float'' '''healamount''' - The amount of health a health pickup restores.
+
*''void(entity attacker, float damage)'' '''th_pain''' -  
*''float'' '''healtype''' - The type of pickup a health item is. Can be one of the following:
+
*''void()'' '''th_die''' -  
:0 - Small (15 HP)
+
*''entity'' '''oldenemy''' -  
:1 - Standard (25 HP)
+
*''float'' '''speed''' -  
:2 - Megahealth (100 HP)
+
*''float'' '''lefty''' -  
*''vector'' '''dest''' - Unused.
+
*''float'' '''search_time''' -  
=== BSP Entity Fields ===
+
*''float'' '''attack_state''' -  
*''float'' '''speed''' - Used by various entity types to determine how fast it moves towards its goal in map units/second.
+
*''float'' '''walkframe''' -  
*''vector'' '''mangle''' - Used by certain entity types to store their map editor angles before resetting it to <code>VEC_ORIGIN</code>. This is often used to create directional movement.
+
*''float'' '''attack_finished''' -  
*''float'' '''t_width''' - Used by secret door entities to calculate how far to move to get to their first destination. Also used as a time stamp for when the [[Thunderbolt]] can play its sound again.
+
*''float'' '''pain_finished''' -  
*''float'' '''t_length''' - Used by secret door entities to calculate how far to move to get to their final destination.
+
*''float'' '''invincible_finished''' -  
*''vector'' '''dest1''' - Used by secret door entities to record their first destination's position.
+
*''float'' '''invisible_finished''' -  
*''vector'' '''dest2''' - Used by secret door entities to record their final destination's position.
+
*''float'' '''super_damage_finished''' -  
*''float'' '''wait''' - Used by various entity types to determine how long to wait before moving again e.g. buttons and doors. Also used by traps to determine their fire rate.
+
*''float'' '''radsuit_finished''' -  
*''entity'' '''trigger_field''' - Stores the trigger a door uses to open itself.
+
*''float'' '''invincible_time''' -  
*''string'' '''noise4''' - Sound to play for locked doors.
+
*''float'' '''invincible_sound''' -  
*''float'' '''dmg''' - Stores the amount of damage various entity types do when blocked or triggered. Also stores how much drowning damage to deal to the player.
+
*''float'' '''invisible_time''' -  
*''void()'' '''think1''' - The function to call when an entity reaches its movement or rotation destination.
+
*''float'' '''invisible_sound''' -  
*''vector'' '''finaldest''' - The final calculated position of the entity's movement.
+
*''float'' '''super_time''' -  
*''vector'' '''finalangle''' - The final calculated angles of the entity's rotation. This shouldn't be used with BSP entities since their bounding box will not match their orientation.
+
*''float'' '''super_sound''' -
*''float'' '''count''' - Used by triggers to determine how many more times they must be activated.
+
*''float'' '''rad_time''' -  
*''float'' '''lip''' - Distance in map units that doors and buttons stick out from the wall.
+
*''float'' '''fly_sound''' -  
*''float'' '''state''' - Stores the current state of various entity types. Can be one of the following:
+
*''float'' '''axhitme''' -  
:<code>STATE_TOP</code>
+
*''float'' '''show_hostile''' -  
:<code>STATE_BOTTOM</code>
+
*''float'' '''jump_flag''' -  
:<code>STATE_UP</code>
+
*''float'' '''swim_flag''' -  
:<code>STATE_DOWN</code>
+
*''float'' '''air_finished''' -  
*''vector'' '''pos1''' - Records the spawn position of various entity types.
+
*''float'' '''bubble_count''' -  
*''vector'' '''pos2''' - Records the destination position of various entity types.
+
*''string'' '''deathtype''' -  
=== General Entity Fields ===
+
*''string'' '''mdl''' -  
*''string'' '''killtarget''' - The '''targetname''' id of the entities to remove from the map when activated. Contrary to its name, this will delete them and not kill them. This takes precedence over '''target''' by default.
+
*''vector'' '''mangle''' -  
*''float'' '''attack_finished''' - Time stamp for when the entity is allowed to attack again.
+
*''vector'' '''oldorigin''' -  
*''float'' '''pain_finished''' - Time stamp for when the entity can enter its pain state again.
+
*''float'' '''t_length''' -  
*''float'' '''fly_sound''' - Time stamp for when the wind sound effect can be played again from an entity when it walks into a push trigger.
+
*''float'' '''t_width''' -  
*''float'' '''delay''' - If activated, wait this long before actually activating other entities.
+
*''vector'' '''dest''' -  
*''float'' '''cnt''' - Counter that tracks various behaviors e.g. monster refiring, Spawn jumping, and bubble splitting.
+
*''vector'' '''dest1''' -  
*''float'' '''distance''' - Unused.
+
*''vector'' '''dest2''' -  
*''float'' '''volume''' - Unused.
+
*''float'' '''wait''' -  
*''float'' '''hit_z''' - Unused.
+
*''float'' '''delay''' -  
=== Monster Entity Fields ===
+
*''entity'' '''trigger_field''' -  
*''void()'' '''th_stand''' - The function to call when a monster starts to idle.
+
*''string'' '''noise4''' -  
*''void()'' '''th_walk''' - The function to call when a monster starts walking towards its patrol points.
+
*''float'' '''pausetime''' -  
*''void()'' '''th_run''' - The function to call when a monster begins to chase its '''enemy'''.
+
*''entity'' '''movetarget''' -  
*''void()'' '''th_missile''' - The function to call if a monster has a ranged attack.
+
*''float'' '''aflag''' -  
*''void()'' '''th_melee''' - The function to call if a monster has a melee attack.
+
*''float'' '''dmg''' -  
*''void(entity attacker, float damage)'' '''th_pain''' - The function to call when the monster is damaged.
+
*''float'' '''cnt''' -  
*''void()'' '''th_die''' - The function to call when a monster dies.
+
*''void()'' '''think1''' -  
*''entity'' '''oldenemy''' - Stores the last valid enemy a monster had before switching targets.
+
*''vector'' '''finaldest''' -  
*''float'' '''lefty''' - Boolean used by strafing monsters to determine which direction they're strafing (if <code>TRUE</code>, moves left).
+
*''vector'' '''finalangle''' -  
*''float'' '''search_time''' - Time stamp used in co-op modes as a cool down for monsters looking for a new target to attack.
+
*''float'' '''count''' -  
*''float'' '''attack_state''' - The current attacking state of the monster. Can be one of the following:
+
*''float'' '''lip''' -  
:<code>AS_STRAIGHT</code>
+
*''float'' '''state''' -  
:<code>AS_SLIDING</code> (currently strafing)
+
*''vector'' '''pos1''' -  
:<code>AS_MISSILE</code>
+
*''vector'' '''pos2''' -  
:<code>AS_MELEE</code>
+
*''float'' '''waitmin''' -  
*''float'' '''pausetime''' - Time stamp for when a monster can start walking towards its patrol points.
+
*''float'' '''waitmax''' -  
*''entity'' '''movetarget''' - The patrol point entity a monster is trying to walk towards.
+
*''float'' '''distance''' -  
*''float'' '''waitmin''' - Time stamp for when [[Scrag|Scrags]] can play their idle sound.
+
*''float'' '''volume''' -  
*''float'' '''inpain''' - Used by [[Zombie|Zombies]] to determine what pain state they're in. Can be one of the following:
+
*''float'' '''dmgtime''' -  
:0 - No pain state
+
*''float'' '''healamount''' -  
:1 - Flinching
+
*''float'' '''healtype''' -  
:2 - Knocked down
+
*''float'' '''hit_z''' -  
*''float'' '''waitmax''' - Unused.
+
*''float'' '''inpain''' -
=== Player Entity Fields ===
 
*''float'' '''walkframe''' - The current frame of the player's idle and running animations.
 
*''float'' '''invincible_finished''' - Time stamp for when the [[Pentagram of Protection]] powerup wears off.
 
*''float'' '''invincible_time''' - Time stamp that controls the sound and screen flash from the Pentagram of Protection wearing off.
 
*''float'' '''invincible_sound''' - Time stamp for when the protection sound can be played again when taking damage.
 
*''float'' '''invisible_finished''' - Time stamp for when the [[Ring of Shadows]] powerup wears off.
 
*''float'' '''invisible_time''' - Time stamp that controls the sound and screen flash from the Ring of Shadows wearing off.
 
*''float'' '''invisible_sound''' - Time stamp for when the Ring's whispering sound effect is played.
 
*''float'' '''super_damage_finished''' - Time stamp for when the [[Quad Damage]] powerup wears off.
 
*''float'' '''super_time''' - Time stamp that controls the sound and screen flash from the Quad Damage wearing off.
 
*''float'' '''super_sound''' - Time stamp for when the Quad firing sound effect can be played again.
 
*''float'' '''radsuit_finished''' - Time stamp for when the [[Biosuit]] powerup wears off.
 
*''float'' '''rad_time''' - Time stamp that controls the sound and screen flash from the Biosuit wearing off.
 
*''float'' '''axhitme''' - Signifies that the player was hit by another player's axe that frame.
 
*''float'' '''show_hostile''' - If greater than '''time''', nearby monsters will wake up without needing to see the player.
 
*''float'' '''jump_flag''' - Stores the player's z velocity when not on the ground.
 
*''float'' '''swim_flag''' - Time stamp for when the swimming sound should be played again while jumping underwater.
 
*''float'' '''air_finished''' - Time stamp for when the player runs out of air when under a liquid and begins to drown.
 
*''string'' '''deathtype''' - Used to determine if the player fell to their death by setting it to "falling".
 
*''float'' '''dmgtime''' - Time stamp for when a harmful liquid can damage a player again.
 

Revision as of 21:40, 30 July 2023

Quake's fields are broken down into two main types: system fields and entity fields. When a field is declared, every entity in the game has their own version of that field. Valid field data types include string, vector, float, and entity. They are declared via

   .datatype variableName;

Note the . as declaring a variable without this will make it global instead of entity-specific.

System fields are fields defined within the engine itself and must be present for the game to work. These are always defined after the system global fields. The end of them is denoted by the void end_sys_fields; declaration. System fields must always be declared in the order defined within the vanilla QuakeC files as they are linked by memory offsets internally. Changing the order will break logic.

Entity fields are standard fields that have no internal linkage and can be defined freely anywhere. Declaring it will automatically give all entities access to their own version.

System Fields

The following fields should be defined in the exact order of this list, otherwise memory offset errors can occur.

  • float modelindex - The index for the entity's current model within the cache. Setting this to 0 will remove the entity's model. Otherwise this is best set via setmodel().
  • vector absmin - The world coordinate of the bottom left corner of the entity's axis-aligned bounding box. Both setorigin() and setsize() will set this. For BSP entities, setmodel() will also set this.
  • vector absmax - The world coordinate of the top right corner of the entity's axis-aligned bounding box. Both setorigin() and setsize() will set this. For BSP entities, setmodel() will also set this.
  • float ltime - The local time for the entity. This is used in place of the global time variable if the entity has the move type MOVETYPE_PUSH since BSP entities that get blocked will pause their timer.
  • float movetype - The type of movement the entity has. There are special rules for what entities should have what move type.
  • float solid - The type of collision the entity has. There are special rules for BSP entities regarding their movetype.
  • vector origin - The current world coordinate of the entity. Should be set by setorigin() since it involves relinking the entity to the world.
  • vector oldorigin - Only used with MOVETYPE_WALK to determine if the entity is stuck when moving.
  • vector velocity - The movement direction and speed of the entity measured in map units/second.
  • vector angles - The current direction as (pitch, yaw, roll) the entity's model is facing. Players use v_angle for their camera direction. Note that positive pitch values point up and negative pitch values down within this field. If you wish to pass it directly to makevectors(), you should negate the pitch before doing so. BSP entities should not use this field as their bounding box will not be aligned to their orientation.
  • vector avelocity - The angular velocity as (pitch, yaw, roll) of the entity measured in degrees/second. BSP entities should not use this field as their bounding box will not be aligned to their orientation.
  • vector punchangle - The view angle offset as (pitch, yaw, roll) to apply to the player's camera e.g. weapon recoil.
  • string classname - The type the entity is. Quake uses this to determine what spawn function to call for a given entity when it's first created while loading (the class name will match its spawn function's name).
  • string model - The name of the entity's current model. Setting this to empty will remove the entity's model. Otherwise this is best set via setmodel(). For BSP entities, this field is automatically populated with the name of their internal BSP model on spawn.
  • float frame - The current frame index for the entity's model.
  • float skin - The current skin index for the entity's model.
  • float effects - Flags that store which effects to apply to an entity e.g. muzzle flash.
  • vector mins - The size of the entity pointing towards its bottom left. These should be negative values. Should be set by setsize() since it involves relinking the entity to the world. For BSP entities this is set by setmodel().
  • vector maxs - The size of the entity pointing towards its top right. These should be positive values. Should be set by setsize() since it involves relinking the entity to the world. For BSP entities this is set by setmodel().
  • vector size - The total size of the entity on all 3 axes. Should be set by setsize() since it involves relinking the entity to the world. For BSP entities this is set by setmodel().
  • void() touch - The function to run (if any) when a collision occurs with another entity, both on the collider and collidee respectively. Only runs if the entity is considered a form of solid. If an entity is a trigger only its touch() will be called.
  • void() use - Unused.
  • void() think - The next function to perform on the entity. Only gets called if nextthink is a positive value.
  • void() blocked - Function called by BSP entities when they are unable to push an entity out of the way.
  • float nextthink - The time stamp for when to perform the next think() action. If a non-positive number, does nothing. After an entity thinks this is automatically set back to 0. For standard entities time should be used to set the time stamp while for BSP entities the ltime field should be used instead.
  • entity groundentity - The entity currently being stood on top of, if any. Often used to denote standing on top of a BSP entity.
  • float health - The current health of the entity. This should use rounded numbers as imprecisions can cause bugs at low health values.
  • float frags - The number of kills the player currently has in PvP modes.
  • float weapon - The item bit for the player's currently selected weapon.
  • string weaponmodel - The name of the model to use for the player's HUD weapon.
  • float weaponframe - The current frame index for the player's HUD weapon.
  • float currentammo - The amount of ammo to display in the HUD for the player's currently selected weapon.
  • float ammo_shells - The amount of shells the entity currently has.
  • float ammo_nails - The amount of nails the entity currently has.
  • float ammo_rockets - The amount of rockets the entity currently has.
  • float ammo_cells - The amount of cells the entity currently has.
  • float items - Tracks the items an entity currently has. Usage can vary depending on type of entity, but common usage is for players, backpacks, and locked doors. Note: For players, this has special interactions with the HUD.
  • float takedamage - The type of damage the entity is capable of taking. Can be the following:
    DAMAGE_NO
    DAMAGE_YES
    DAMAGE_AIM (signifies that the entity can be autoaimed at)
  • entity chain - Used with findradius() to create a linked list of entities that were found. This should not be used outside this purpose or modified manually. Nested findradius() calls can break this functionality without special precautions.
  • float deadflag - Used with players to denote their current respawn state. Can be the following:
  • DEAD_NO
  • DEAD_DYING
  • DEAD_DEAD
  • DEAD_RESPAWNABLE
  • vector view_ofs - The amount to shift from the origin of the entity to get its eye point.
  • float button0 - Boolean that determines if the fire button is pressed.
  • float button1 - Unused.
  • float button2 - Boolean that determines if the jump button is pressed.
  • float impulse - The command a client is sending to the server. This is used for changing weapons and certain cheats. Only one impulse can be sent at a time.
  • float fixangle - If set to TRUE, the player's camera angle is updated instantly based off their angles field. This is automatically cleared.
  • vector v_angle - The direction the player's camera is facing as (pitch, yaw, roll). Negative pitch values point up while positive pitch values point down.
  • float idealpitch - If walking on a slope, the calculated pitch to align the player's camera with it. This is disabled if mouse input is active.
  • string netname - The name of the entity, be it the player's name or a printable name for messages.
  • entity enemy - For monsters, the entity it's currently chasing after. This is also the entity floating and swimming monsters will always try to align their height to.
  • float flags - The flags for the entity.
  • float colormap - The current color map index for the player's model.
  • float team - What team the player is on in team-based PvP modes.
  • float max_health - The maximum amount a player can heal from standard health pickups.
  • float teleport_time - If greater than time, ignore movement inputs from the player. This is set immediately after teleporting to make sure the player can't run off into the abyss.
  • float armortype - The fraction of damage to absorb. This only stores up to two decimal places by default.
  • float armorvalue - How much armor the entity currently has.
  • float waterlevel - The current liquid level of the entity. For players:
0 - Out of liquid
1 - Below waist
2 - Above waist
3 - Above camera view height
For other entities, this is only 0 (out of liquid) or 1 (in liquid).
  • float watertype - The CONTENT_* type of the liquid the entity is standing in.
  • float ideal_yaw - For monsters, this is the yaw they want to turn towards.
  • float yaw_speed - How quickly the monster should turn towards ideal_yaw. Measured in degrees per 0.1 seconds by default.
  • entity aiment - Unused.
  • entity goalentity - The entity monsters are trying to move towards, usually while patrolling. For floating and swimming monsters, they won't try to put themselves at level with it.
  • float spawnflags - The flags set for the entity within the map editor itself. What spawn flags are available differs from entity type to entity type.
  • string target - The targetname id that an entity will try and activate when it gets used. Different entity types have different use conditions.
  • string targetname - The id of the entity for use in being activated.
  • float dmg_take - How much modified damage the player took on a given frame.
  • float dmg_save - How much damage was mitigated by the player's armor on a given frame.
  • entity dmg_inflictor - The last entity to deal damage to the player on a given frame.
  • entity owner - Which entity is considered the owner of this entity. Entities will automatically pass through their owner instead of colliding with them.
  • vector movedir - Used by various entity types to determine which way to move e.g. doors.
  • string message - What message to display when certain entity types are activated.
  • float sounds - What type of sounds an entity uses. Often used for setting sound types on BSP entities from the map editor.
  • string noise
  • string noise1
  • string noise2
  • string noise3
- Sound names that various BSP entities use to play audio during certain interactions.

Entity Fields

These can be defined anywhere in any order. Removing or changing them isn't advised since maps use field names to determine what values to set, and any field can be arbitrarily set from the map editor. Modifying these could cause vanilla maps to break due to incorrect initializing.

  • string wad -
  • string map - The current name of the level. This is the actual file name and not the presentable one.
  • float worldtype - Used across various entity types to determine what type of level it is and what assets should be used e.g. keys.
  • string killtarget - The targetname id of the entities to remove from the world when activated. Contrary to its name, this will delete them and not kill them. This takes precedence over target by default.
  • float light_lev -
  • float style -
  • void() th_stand -
  • void() th_walk -
  • void() th_run -
  • void() th_missile -
  • void() th_melee -
  • void(entity attacker, float damage) th_pain -
  • void() th_die -
  • entity oldenemy -
  • float speed -
  • float lefty -
  • float search_time -
  • float attack_state -
  • float walkframe -
  • float attack_finished -
  • float pain_finished -
  • float invincible_finished -
  • float invisible_finished -
  • float super_damage_finished -
  • float radsuit_finished -
  • float invincible_time -
  • float invincible_sound -
  • float invisible_time -
  • float invisible_sound -
  • float super_time -
  • float super_sound -
  • float rad_time -
  • float fly_sound -
  • float axhitme -
  • float show_hostile -
  • float jump_flag -
  • float swim_flag -
  • float air_finished -
  • float bubble_count -
  • string deathtype -
  • string mdl -
  • vector mangle -
  • vector oldorigin -
  • float t_length -
  • float t_width -
  • vector dest -
  • vector dest1 -
  • vector dest2 -
  • float wait -
  • float delay -
  • entity trigger_field -
  • string noise4 -
  • float pausetime -
  • entity movetarget -
  • float aflag -
  • float dmg -
  • float cnt -
  • void() think1 -
  • vector finaldest -
  • vector finalangle -
  • float count -
  • float lip -
  • float state -
  • vector pos1 -
  • vector pos2 -
  • float waitmin -
  • float waitmax -
  • float distance -
  • float volume -
  • float dmgtime -
  • float healamount -
  • float healtype -
  • float hit_z -
  • float inpain -