Custom Entities

From SigMod
Revision as of 18:33, 5 October 2023 by Rafradek (talk | contribs)
Jump to navigation Jump to search

$func_block_los

Blocks line of sight

Keyvalues

  • $filter <string>
    • Name of a filter that allows for blocking vision of specific bots

$trigger_detector

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

  • $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

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

Outputs

  • $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

Spawns dropped weapons

Keyvalues

  • $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
  • $lifetime <number> (Default: 30)
    • Lifetime of the dropped weapon in seconds

Inputs

  • $DropWeapon
    • Drop weapon

Outputs

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

$entity_spawn_detector

Detects if an entity with a specified classname had spawned

Keyvalues

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

Outputs

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

$filter_keyvalue

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

Keyvalues

  • $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

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

  • $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

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

Keyvalues

  • $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

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

Keyvalues

  • $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

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

Keyvalues

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

$filter_bbox

Custom filter that lets you filter entities inside a bounding box

Keyvalues

  • $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

Custom damage filter that filters damage by the weapon item name and others

Keyvalues

  • $item <string>
    • Name of the weapon to filter against
  • $type <string>
    • What to test against. Possible values:
      • ItemName (default)
      • Classname
      • SimilarToItem
      • ItemSlot
      • DefIndex

$filter_specialdamagetype

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

Keyvalues

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

$script_manager

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

Keyvalues

  • $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

  • $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