Spawn( <classname>, <origin>, <flags>, <radius>, <height> )


Module: Spawn

Summary:

Spawns a new entity and returns a reference to the entity



Example:

 org = Spawn( "script_origin",self getorigin() );



Required Args:

  • 1 : <classname> The name of the class to spawn (constant string)
  • 2 : <origin> The position where the entity is to be spawned (vector)


Optional Args

  • 1 : <flags> spawn flags (integer)
  • 2 : <radius> If the entity is a 'trigger_radius' entity then this is the radius of the trigger. Otherwise this parameter is invalid.
  • 3 : <height> If the entity is a 'trigger_radius' entity then this is the height of the trigger. Otherwise this parameter is invalid.