swiftlys2/docs/api/releases/features/ai/

Entity Data

versions
Counter-Strike 2›FilterHealth

FilterHealth

entity data
designer name: filter_health
non_networkable
Members (3)
adrenalinepresence:boolean
healthmin:int
healthmax:int
Inputs (90)
Kill() -> void
raw: ScriptInputKill
GetForwardVector() -> vector
raw: ScriptGetForward
Get the forward vector of the entity.
GetRightVector() -> vector
raw: ScriptGetRight
Get the right vector of the entity. WARNING: This produces a left-handed coordinate system. Use GetLeftVector instead (which is aligned with the y axis of the entity).
GetLeftVector() -> vector
raw: ScriptGetLeft
Get the left vector of the entity.
GetUpVector() -> vector
raw: ScriptGetUp
Get the up vector of the entity.
GetModelName() -> cstring
raw: ScriptGetModelName
Returns the name of the model.
GetMoveParent() -> hscript
raw: ScriptGetMoveParent
If in hierarchy, retrieves the entity's parent.
GetRootMoveParent() -> hscript
raw: ScriptGetRootMoveParent
If in hierarchy, walks up the hierarchy to find the root parent.
FirstMoveChild() -> hscript
raw: ScriptFirstMoveChild
NextMovePeer() -> hscript
raw: ScriptNextMovePeer
GetOwnerEntity() -> hscript
raw: ScriptGetOwnerEntity
Get the owner entity, if there is one
GetChildren() -> hscript
raw: Script_GetChildren
Get the entities parented to this entity.
SetParent(hscript, cstring) -> void
raw: ScriptSetParent
Set the parent for this entity.
SetConstraint(vector) -> void
raw: ScriptSetConstraint
Set the position of the constraint.
EyePosition() -> position_vector
raw: ScriptEyePosition
Get vector to eye position - absolute coords.
SetAngles(float, float, float) -> void
raw: ScriptSetAngles
Set entity pitch, yaw, roll by component.
SetAbsAngles(float, float, float) -> void
raw: ScriptSetAbsAngles
Set entity pitch, yaw, roll by component.
GetAnglesAsVector() -> vector
raw: ScriptGetAngles
Get entity pitch, yaw, roll as a vector.
EyeAngles() -> qangle
raw: ScriptEyeAngles
Get the qangles that this entity is looking at.
SetOrigin(vector) -> void
raw: ScriptSetOrigin
SetLocalAngles(float, float, float) -> void
raw: ScriptSetLocalAngles
Set entity local pitch, yaw, roll by component
GetLocalAngles() -> qangle
raw: ScriptGetLocalAngles
Get entity local pitch, yaw, roll as a QAngle
SetLocalOrigin(vector) -> void
raw: ScriptSetLocalOrigin
Set entity local origin from a Vector
GetLocalOrigin() -> vector
raw: ScriptGetLocalOrigin
Get entity local origin as a Vector
TransformPointEntityToWorld(vector) -> position_vector
raw: ScriptTransformPointEntityToWorld
Returns the input Vector transformed from entity to world space
TransformPointWorldToEntity(position_vector) -> vector
raw: ScriptTransformPointWorldToEntity
Returns the input Vector transformed from world to entity space
SetForwardVector(vector) -> void
raw: ScriptSetForward
Set the orientation of the entity to have this forward vector.
GetBoundingMins() -> vector
raw: ScriptGetBoundingMins
Get a vector containing min bounds, centered on object.
GetBoundingMaxs() -> vector
raw: ScriptGetBoundingMaxs
Get a vector containing max bounds, centered on object.
GetBounds() -> variant
raw: ScriptGetBounds
Get a table containing the 'Mins' & 'Maxs' vector bounds, centered on object.
GetAngularVelocity() -> vector
raw: ScriptGetLocalAngularVelocity_OBSOLETE
Get the local angular velocity - returns a vector of pitch,yaw,roll
SetAngularVelocity(float, float, float) -> void
raw: ScriptSetLocalAngularVelocity_OBSOLETE
Set the local angular velocity - takes float pitch,yaw,roll velocities
AddEffects(int) -> void
raw: ScriptAddEffects
AddEffects( int ): Adds the render effect flag.
RemoveEffects(int) -> void
raw: ScriptRemoveEffects
RemoveEffects( int ): Removes the render effect flag.
Attribute_SetFloatValue(cstring, float) -> void
raw: ScriptSetAttributeFloatValue
Set float value for an entity attribute.
Attribute_GetFloatValue(cstring, float) -> float
raw: ScriptGetAttributeFloatValue
Get float value for an entity attribute.
Attribute_SetIntValue(cstring, int) -> void
raw: ScriptSetAttributeIntValue
Set int value for an entity attribute.
Attribute_GetIntValue(cstring, int) -> int
raw: ScriptGetAttributeIntValue
Get int value for an entity attribute.
HasAttribute(cstring) -> boolean
raw: ScriptHasAttribute
See if an entity has a particular attribute.
DeleteAttribute(cstring) -> void
raw: ScriptDeleteAttribute
Delete an entity attribute.
ValidatePrivateScriptScope() -> void
raw: ScriptValidatePrivateScriptScope
Validates the private script scope and creates it if one doesn't exist.
GetOwner() -> hscript
raw: GetScriptOwnerEntity
Gets this entity's owner
SetOwner(hscript) -> void
raw: SetScriptOwnerEntity
Sets this entity's owner
SetEntityName(cstring) -> void
raw: ScriptSetEntityName
Set the name of an entity.
GetMass() -> float
raw: ScriptGetMass
Get the mass of an entity. (returns 0 if it doesn't have a physics object)
SetMass(float) -> void
raw: ScriptSetMass
Set the mass of an entity. (does nothing if it doesn't have a physics object)
GetSpawnGroupHandle() -> int
raw: ScriptGetSpawnGroupHandle
Returns the spawn group handle of this entity
GetAbsOrigin() -> position_vector
raw: GetAbsOrigin
GetAngles() -> qangle
raw: GetAbsAngles
GetAbsScale() -> float
raw: GetAbsScale
SetAbsScale(float) -> void
raw: SetAbsScale
GetLocalScale() -> float
raw: GetLocalScale
SetLocalScale(float) -> void
raw: SetLocalScale
SetAbsOrigin(position_vector) -> void
raw: SetAbsOrigin
GetCenter() -> position_vector
raw: WorldSpaceCenter
Get vector to center of object - absolute coords
GetTeamNumber() -> int
raw: GetTeamNumber
Get the team number of this entity.
GetTeam() -> int
raw: Script_GetTeamNumber
Get the team number of this entity.
SetTeam(int) -> void
raw: ChangeTeam
FollowEntity(hscript, boolean) -> void
raw: Script_FollowEntity
hEntity to follow, bool bBoneMerge
FollowEntityMerge(hscript, cstring) -> void
raw: Script_FollowEntityMerge
hEntity to follow, string BoneOrAttachName
Trigger() -> void
raw: Script_Trigger
Fires off this entity's OnTrigger responses.
SetContextThink(cstring, hscript, float) -> void
raw: Script_SetContextThink
Set a think function on this entity.
SetContext(cstring, cstring, float) -> void
raw: AddContextForScript
SetContext( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a string. Will last for duration (set 0 to mean 'forever').
SetContextNum(cstring, float, float) -> void
raw: AddContextForScriptNumeric
SetContextNum( name , value, duration ): store any key/value pair in this entity's dialog contexts. Value must be a number (int or float). Will last for duration (set 0 to mean 'forever').
GetContext(cstring) -> variant
raw: GetContextForScript
GetContext( name ): looks up a context and returns it if available. May return string, float, or null (if the context isn't found).
GatherCriteria(hscript) -> void
raw: ScriptGatherCriteria
Returns a table containing the criteria that would be used for response queries on this entity. This is the same as the table that is passed to response rule script function callbacks.
TakeDamage(hscript) -> int
raw: Script_TakeDamage
Apply damage to this entity. Use CreateDamageInfo() to create a damageinfo object.
IsAlive() -> boolean
raw: IsAlive
Is this entity alive?
IsPlayerPawn() -> boolean
raw: IsPlayerPawn
Is this entity a player pawn?
IsPlayerController() -> boolean
raw: IsPlayerController
Is this entity a player controller?
IsNPC() -> boolean
raw: IsNPC
Is this entity an CAI_BaseNPC?
GetMaxHealth() -> int
raw: GetMaxHealth
Get the maximum health of this entity.
SetMaxHealth(int) -> void
raw: SetMaxHealth
Set the maximum health of this entity.
SetHealth(int) -> void
raw: SetHealth
Set the health of this entity.
GetHealth() -> int
raw: GetHealth
Get the health of this entity.
SetGravity(float) -> void
raw: SetGravityScale
Set PLAYER gravity, ignored for objects.
SetFriction(float) -> void
raw: SetFriction
Set PLAYER friction, ignored for objects.
SetVelocity(vector) -> void
raw: SetAbsVelocity
GetLocalVelocity() -> vector
raw: GetLocalVelocity
Get Entity relative velocity.
GetVelocity() -> vector
raw: GetAbsVelocity
ApplyAbsVelocityImpulse(vector) -> void
raw: ApplyAbsVelocityImpulse
Apply a Velocity Impulse
ApplyLocalAngularVelocityImpulse(vector) -> void
raw: Script_ApplyLocalAngularVelocityImpulse
Apply an Ang Velocity Impulse
GetLocalAngularVelocity() -> qangle
raw: GetLocalAngularVelocity_OBSOLETE
Maybe local angvel
GetBaseVelocity() -> vector
raw: GetBaseVelocity
Get Base? velocity.
EmitSound(cstring) -> void
raw: ScriptEmitSound
Plays a sound from this entity.
EmitSoundParams(cstring, int, float, float) -> void
raw: ScriptEmitSoundParams
Plays/modifies a sound from this entity. changes sound if nPitch and/or flVol or flSoundTime is > 0.
StopSound(cstring) -> void
raw: ScriptStopSound
Stops a named sound playing from this entity.
GetSoundDuration(cstring, cstring) -> float
raw: ScriptSoundDuration
Returns float duration of the sound. Takes soundname and optional actormodelname.
PrecacheScriptSound(cstring) -> void
raw: Script_PrecacheScriptSound
Precache a sound for later playing.
GetOrigin() -> position_vector
raw: ScriptGetAbsOrigin