-
Notifications
You must be signed in to change notification settings - Fork 1
Console Commands
Parameters wrapped in square brackets are [optional] Parameters with 3 dots mean you can supply as many as you want...
Syntax: print_all_ents [propertyPattern...]
Prints all entities in the map, along with any supplied property patterns.
A property pattern is the name or name-part that the command will search for on each entity to get its value. The property must be a variable or function which takes no arguments and returns a value.
'SetOrigin' is invalid because it takes an argument and does not return a value. 'GetContext' is invalid because it takes an argument. 'GetOrigin' is valid because it takes no arguments and returns a printable value.
A name-part is a segment of the name that the command will search for, if you don't know the full name or just want to reduce typing.
For example, a pattern of 'name' might find 'GetName' or 'GetClassname' depending on which it finds first.
Child entities display their parent as an index number and classname so you can easily find it in the list.
This command also works for any variables and functions added to entities through scripts, including the AlyxLib entity classes.
Example usage:
print_all_ents
print_all_ents getname getorigin
print_all_ents Gethealth CustomVariable
Example output:

Syntax: print_diff_ents [propertyPattern...]
Prints all new entities in the map since print_all_ents was last called, along with any supplied property patterns (see print_all_ents for a description of property patterns).
This command can be used to quickly check which entities have been spawned since print_all_ents was called, as long as they are still alive.
Syntax: `print_nearby_ents [radius] [propertyPattern...]
Prints all entities within a given radius around the player, along with any supplied property patterns (see print_all_ents for a description of property patterns).
If no radius is supplied a default value of 256 is used.
Example usage:
print_nearby_ents
print_nearby_ents 100
print_nearby_ents 2000 getname getorigin
Syntax: print_ents pattern [propertyPattern...]
Prints any entities if its 'target name', 'class name', or 'model name' contains the pattern parameter, along with any supplied property patterns (see print_all_ents for a description of property patterns).
For example, a pattern of "physics" might match all 'prop_physics', 'prop_physics_override' and any entity with "physics" in the name.
Example usage:
print_ents grenade_frag getname getorigin
print_ents "my model.vmdl" getclass
Syntax: ent_show name
Shows the position of an entity in the world by drawing a line to it from the player.
name must be the exact target name of the entity.
Syntax: ent_mass name
Prints the mass of the entity to the console.
name must be the exact target name of the entity.
Syntax: sphere [x] [y] [z] [radius]
Draws a sphere in the game world at given position with a given size.
Syntax: `print_ent_criteria