Ent create: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:ent_create}} <code>ent_create</code> is a console command that creates an entity of the given type where the player is looking. ==Usage== Additional parameter...")
 
No edit summary
Line 11: Line 11:
=== Examples ===
=== Examples ===
* <code>ent_create player_speedmod; ent_fire player_speedmod ModifySpeed 3</code>  
* <code>ent_create player_speedmod; ent_fire player_speedmod ModifySpeed 3</code>  
*: This is a helpful way to make the player faster ingame, without needing to recompile the map or using <code>host_timescale</code>
*: Handy way to make the player faster ingame, without needing to recompile the map or using <code>host_timescale</code>
* <code>ent_create env_explosion targetname newexp iMagnitude 100; ent_fire newexp explode</code>
* <code>ent_create env_explosion targetname newexp iMagnitude 100; ent_fire newexp explode</code>
*: Spawns an explosion where the player looks and instantly triggers it too.
*: Spawns an explosion where the player looks and instantly triggers it too.
* <code>ent_create prop_dynamic model models/editor/playerstart.mdl modelscale 2</code>
*: Example of creating a prop. Alternatively {{ent|prop_dynamic_create}} can be used.
* <code>ent_create player_weaponstrip targetname pacifism; ent_fire pacifism strip</code>
*: Handy way to clear weapons ingame


==See Also==
==See Also==

Revision as of 05:24, 16 August 2020

ent_create is a console command that creates an entity of the given type where the player is looking.

Usage

Additional parameters can be passed in in the form:

ent_create <entity name> <param 1 name> <param 1> <param 2 name> <param 2>...<param N name> <param N>

Examples

  • ent_create player_speedmod; ent_fire player_speedmod ModifySpeed 3
    Handy way to make the player faster ingame, without needing to recompile the map or using host_timescale
  • ent_create env_explosion targetname newexp iMagnitude 100; ent_fire newexp explode
    Spawns an explosion where the player looks and instantly triggers it too.
  • ent_create prop_dynamic model models/editor/playerstart.mdl modelscale 2
    Example of creating a prop. Alternatively prop_dynamic_create can be used.
  • ent_create player_weaponstrip targetname pacifism; ent_fire pacifism strip
    Handy way to clear weapons ingame

See Also

  • prop_dynamic_create, a command to create spawn a model ingame.
  • give, a command like ent_fire, but things spawn beneath the player's feet.