Skip to content

IEntities

cs_script API / IEntities

interface in cs_script/point_script — the type of Entities.

An API provided to scripts for general entity interaction.
Access these functions by importing Entities from "cs_script/point_script".

    CS2 build 27045800 · Steam date 2026-11-30 · platform windows-x86_64 · schema format 2.2

    Members

    Spawn experimental

    Spawn(entities: ({ classname: string, origin?: Vector, angles?: QAngle } & { [key: string]: EntityKeyValue })[]): Entity[]

    Spawns a set of entities.

    Experimental: This feature is experimental and may experience breaking changes. Please send feedback to CSGOTeamFeedback@valvesoftware.com with "cs_script Feedback" in the subject line.

    FindByName

    FindByName(name: string): Entity[]

    Find all entities with the specified name.

    FindByClass

    FindByClass(className: string): Entity[]

    Find all entities of the specified class name.

    FireInput

    FireInput(config: { name: string, input: string, value?: InputValue, caller?: Entity, activator?: Entity, delay?: number }): void

    Fire the input on all entities with the specified name.

    ConnectOutput

    ConnectOutput(config: { target: Entity, output: string, callback: (inputData: { value?: InputValue, caller?: Entity, activator?: Entity }) => any }): number | undefined

    Connect the output of an entity to a callback. The return value is a connection id that can be used in DisconnectOutput

    DisconnectOutput

    DisconnectOutput(connectionId: number): void

    Disconnect an output connection made by ConnectOutput.