Custom Entities

From SigMod
Jump to navigation Jump to search

$trigger_detector[edit | edit source]

Checks for entities inside the trigger and the radius (if specified). The closest entity to the origin inside the trigger is marked as target. Shares inputs and outputs with trigger_multiple

Keyvalues[edit | edit source]

  • $checklineofsight <1/0> (Default: 0)
    • Should the line of sight between the detector origin and the target be clear.
  • $radius <number> (Default: 65000)
    • Maximum distance between the the detector origin and the target
  • $fov <number> (Default: 180)
    • If set, only detect entities in field of view angle defined in degrees
  • $keeptarget <1/0> (Default: 0)
    • Should the detector keep targeting the entity as long as it remains in range, even if there is another closer suitable target

Inputs[edit | edit source]

  • $TargetTest
    • Check if there is a detectable entity inside the the detector

Outputs[edit | edit source]

  • $OnNewTarget
    • Fired when a new target is being found. The new target is the !activator
  • $OnLostTarget
    • Fired when the target is no longer in range, or a new target is being choosen. The lost target is the !activator
  • $OnLostTargetAll
    • Fired when there are no more targets in range
  • $TargetTestPass
    • Fired after $TargetTest input if there is an entity in range currently detected by the detector. The detected entity is the !activator
  • $TargetTestFail
    • Fired after $TargetTest input if there are no entities in range detected by the detector

$weapon_spawner[edit | edit source]

Spawns dropped weapons

Keyvalues[edit | edit source]

  • $item <string>
    • Name of the item to spawn
  • $nomotion <1/0> (Default: 0)
    • Spawn items without gravity
  • $ammo <number> (Default: -1)
    • Spawn with this much ammo
  • $clip <number> (Default: -1)
    • Spawn with this much ammo in the clip
  • $energy <number>
    • Spawn with custom amount of energy in (0-1) range
  • $charge <number>
    • Spawn with custom medigun charge amount in (0-1) range

Inputs[edit | edit source]

  • $DropWeapon
    • Drop weapon

Outputs[edit | edit source]

  • $OnPickup
    • Fired when a player picks up the weapon. The player is the !activator

$entity_spawn_detector[edit | edit source]

Detects if an entity with a specified classname had spawned

Keyvalues[edit | edit source]

  • $name <string>
    • Name of the classname to check

Outputs[edit | edit source]

  • $OnEntitySpawned
    • Fired when an entity with the specified classname spawns. The spawned entity is the !activator

$filter_keyvalue[edit | edit source]

Custom filter that lets you filter entities matching the key value. Shares inputs with filter_base entity

Keyvalues[edit | edit source]

  • $name <string>
    • Name of the key to compare, example: health
  • $value <any>
    • Value to compare against
  • $compare <string>
    • The condition for passing the filter. Should only be set for numeric values.
    • Possible values:
      • equal
      • less than
      • greater than
      • less than or equal
      • greater than or equal

$filter_variable[edit | edit source]

Custom filter that lets you filter entities matching the custom entity variable (declared by firing $SetVar$variablename input of the entity). Shares inputs with filter_base entity

Keyvalues[edit | edit source]

  • $name <string>
    • Name of the variable to compare, example: myvar
  • $value <any>
    • Value to compare against
  • $compare <string>
    • The condition for passing the filter. Should only be set for numeric values.
    • Possible values:
      • equal
      • less than
      • greater than
      • less than or equal
      • greater than or equal

$filter_datamap[edit | edit source]

Custom filter that lets you filter entities matching the datamap prop. Shares inputs with filter_base entity

Keyvalues[edit | edit source]

  • $name <string>
    • Name of the variable to compare, example: m_iHealth
  • $value <any>
    • Value to compare against
  • $compare <string>
    • The condition for passing the filter. Should only be set for numeric values.
    • Possible values:
      • equal
      • less than
      • greater than
      • less than or equal
      • greater than or equal

$filter_sendprop[edit | edit source]

Custom filter that lets you filter entities matching the send prop. Shares inputs with filter_base entity

Keyvalues[edit | edit source]

  • $name <string>
    • Name of the variable to compare, example: m_nCurrency
  • $value <any>
    • Value to compare against
  • $compare <string>
    • The condition for passing the filter. Should only be set for numeric values.
    • Possible values:
      • equal
      • less than
      • greater than
      • less than or equal
      • greater than or equal

$filter_proximity[edit | edit source]

Custom filter that lets you filter entities by proximity to the target entity

Keyvalues[edit | edit source]

  • $target <string>
    • Name of the target entity, or coordinates in x y z format
  • $range <number>
    • Maximum distance to pass the filter

$filter_bbox[edit | edit source]

Custom filter that lets you filter entities inside a bounding box

Keyvalues[edit | edit source]

  • $target <string>
    • Name of the target entity or coordinates in x y z format
  • $min <vector>
    • the negative box bounds in x y z format
  • $max <vector>
    • the positive box bounds in x y z format

$filter_itemname[edit | edit source]

Custom damage filter that filters damage by the weapon item name

Keyvalues[edit | edit source]

  • $item <string>
    • Name of the weapon to filter against

$filter_specialdamagetype[edit | edit source]

Custom damage filter that filters damage by the existence of "special damage type" attribute of the weapon

Keyvalues[edit | edit source]

  • $type <number>
    • Number of the special damage type required to pass the trigger

$script_manager[edit | edit source]

Executes lua scripts. single $script_manager entity called popscript is created when a mission includes lua code. When created manually, this entity persists after map reset, and executes scripts after spawn

Keyvalues[edit | edit source]

  • $scriptfile <string>
    • Script files separated by comma to be executed when this entity spawns
  • $scrips <string>
    • Script to be executed when this entity spawns

Inputs[edit | edit source]

  • $ExecuteScript <string>
    • Executes script provided in the string
  • $ExecuteFile <string>
    • Executes script file
  • $<function name> <any>
    • Calls a named global function with parameters: provided value, activator, caller