L L4D2node

CBaseEntity

53 own methods

Root class of all server-side entities

Methods

callable on a CBaseEntity script handle
Script Function Returns Parameters Description
__KeyValueFromInt (KeyValueFromInt) bool cstring, float @
__KeyValueFromString (KeyValueFromString) bool cstring, cstring @
__KeyValueFromVector (KeyValueFromVector) bool cstring, Vector @
ApplyAbsVelocityImpulse void Vector Apply a Velocity Impulse
ApplyLocalAngularVelocityImpulse void Vector Apply an Ang Velocity Impulse
ConnectOutput (ConnectOutputToScript) void cstring, cstring Adds an I/O connection that will call the named function when the specified output fires
DisconnectOutput (DisconnectOutputFromScript) void cstring, cstring Removes a connected script function from an I/O event.
FirstMoveChild (ScriptFirstMoveChild) hscript none none
GetAngles (GetAbsAngles) QAngle none none
GetBaseVelocity Vector none Get Base? velocity
GetCenter (ScriptGetWorldSpaceCenter) Vector none Get world space center of object - absolute coords
GetClassname cstring none none
GetContext (GetContextForScript) unknown(0x21) cstring GetContext( name ): looks up a context and returns it if available. May return string, float, or null (if the context isn't found)
GetEntityHandle (ScriptGetEHandle) unknown(0x1e) none Get the entity as an EHANDLE
GetEntityIndex (entindex) int none none
GetForwardVector (ScriptGetForward) Vector none Get the forward vector of the entity
GetHealth int none none
GetLocalAngles QAngle none none
GetLocalAngularVelocity QAngle none Maybe local angvel
GetLocalOrigin Vector none none
GetLocalVelocity Vector none Get Entity relative velocity
GetMaxHealth int none none
GetModelName (ScriptGetModelName) cstring none none
GetMoveParent (ScriptGetMoveParent) hscript none If in hierarchy, retrieves the entity's parent
GetName (GetEntityNameAsCStr) cstring none none
GetOrigin (GetAbsOrigin) Vector none none
GetOwnerEntity (ScriptGetOwnerEntity) hscript none Get the owner entity, if there is one
GetPreTemplateName cstring none Get the entity name stripped of template unique decoration
GetRootMoveParent (ScriptGetRootMoveParent) hscript none If in hierarchy, walks up the hierarchy to find the root parent
GetScriptScope hscript none Retrieve the script-side data associated with an entity
GetVelocity (GetAbsVelocity) Vector none none
IsPlayer bool none none
Kill (ScriptInputKill) void none none
NextMovePeer (ScriptNextMovePeer) hscript none none
OverrideFriction void float, float Takes duration, value for a temporary override
PrecacheModel (ScriptPrecacheModel) int cstring none
PrecacheScriptSound (Script_PrecacheScriptSound) void cstring none
SetAngles (SetAbsAngles) void QAngle none
SetContext (AddContextForScript) void cstring, cstring, float 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 -1 to mean 'forever').
SetContextNum (AddContextForScriptNumeric) void cstring, float, float SetContext( 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 -1 to mean 'forever').
SetForwardVector (ScriptSetForward) void Vector Set the orientation of the entity to have this forward vector
SetFriction void float Set PLAYER friction, ignored for objects
SetGravity void float Set PLAYER gravity, ignored for objects
SetHealth void int none
SetLocalAngles void QAngle none
SetLocalOrigin void Vector none
SetMaxHealth void int none
SetModel void cstring Set a model for this entity
SetOrigin (ScriptSetOrigin) void Vector none
SetVelocity (SetAbsVelocity) void Vector none
TakeDamage (ScriptTakeDamage) void float, int, hscript (flDamage, nDamageType, hAttacker)
TakeDamageEx (ScriptTakeDamageEx) void hscript, hscript, hscript, Vector, Vector, float, int (hInflictor, hAttacker, hWeapon, vecDamageForce, vecDamagePosition, flDamage, nDamageType)
ValidateScriptScope bool none Ensure that an entity's script scope has been created