Dino D-Day/Scripting/Script Functions

From Valve Developer Community
Jump to navigation Jump to search

Automatically generated Squirrel functions list for Dino D-Day Dino D-Day.

Classes

:: (Global functions)

Methods

Function Signature Description
CreateProp handle CreateProp(string, Vector, string, int) Create a physics prop
CreateSceneEntity handle CreateSceneEntity(string) Create a scene entity to play the specified scene.
DebugDrawBox void DebugDrawBox(Vector, Vector, Vector, int, int, int, int, float) Draw a debug overlay box
DebugDrawLine void DebugDrawLine(Vector, Vector, int, int, int, bool, float) Draw a debug overlay box
DoIncludeScript bool DoIncludeScript(string, handle) Execute a script (internal)
EntFire function EntFire(target, action, value, delay, activator) Generate and entity i/o event
EntFireByHandle void EntFireByHandle(handle, string, string, float, handle, handle) Generate and entity i/o event. First parameter is an entity instance.
FrameTime float FrameTime() Get the time spent on the server in the last frame
GetDeveloperLevel int GetDeveloperLevel() Gets the level of 'develoer'
GetMapName string GetMapName() Get the name of the map.
LoopSinglePlayerMaps bool LoopSinglePlayerMaps() Run the single player maps in a continuous loop.
RandomFloat float RandomFloat(float, float) Generate a random floating point number within a range, inclusive
RandomInt int RandomInt(int, int) Generate a random integer within a range, inclusive
RecordAchievementEvent void RecordAchievementEvent(string, int) Records achievement event or progress
SendToConsole void SendToConsole(string) Send a string to the console as a command
ShowMessage void ShowMessage(string) Print a hud message on all clients
Time float Time() Get the current server time
TraceLine float TraceLine(Vector, Vector, handle) given 2 points & ent to ignore, return fraction along line that hits world or models
UniqueString function UniqueString(string) Generate a string guaranteed to be unique across the life of the script VM, with an optional root string. Useful for adding data to tables when not sure what keys are already in use in that table.

CBaseAnimating

Extends CBaseEntity.

Methods

Function Signature Description
CBaseAnimating::GetAttachmentAngles Vector CBaseAnimating::GetAttachmentAngles(int) Get the attachement id's angles as a p,y,r vector
CBaseAnimating::GetAttachmentOrigin Vector CBaseAnimating::GetAttachmentOrigin(int) Get the attachement id's origin vector
CBaseAnimating::IsSequenceFinished bool CBaseAnimating::IsSequenceFinished() Ask whether the main sequence is done playing
CBaseAnimating::LookupAttachment int CBaseAnimating::LookupAttachment(string) Get the named attachement id
CBaseAnimating::SetBodygroup void CBaseAnimating::SetBodygroup(int, int) Sets a bodygroup

CSceneEntity

Extends CBaseEntity.

Methods

Function Signature Description
CSceneEntity::AddBroadcastTeamTarget void CSceneEntity::AddBroadcastTeamTarget(int) Adds a team (by index) to the broadcast list
CSceneEntity::EstimateLength float CSceneEntity::EstimateLength() Returns length of this scene in seconds.
CSceneEntity::FindNamedEntity handle CSceneEntity::FindNamedEntity(string) given an entity reference, such as !target, get actual entity from scene object
CSceneEntity::IsPaused bool CSceneEntity::IsPaused() If this scene is currently paused.
CSceneEntity::IsPlayingBack bool CSceneEntity::IsPlayingBack() If this scene is currently playing.
CSceneEntity::LoadSceneFromString bool CSceneEntity::LoadSceneFromString(string, string) given a dummy scene name and a vcd string, load the scene
CSceneEntity::RemoveBroadcastTeamTarget void CSceneEntity::RemoveBroadcastTeamTarget(int) Removes a team (by index) from the broadcast list

CBaseFlex

Extends CBaseAnimating.

Methods

Function Signature Description
CBaseFlex::GetCurrentScene handle CBaseFlex::GetCurrentScene() Returns the instance of the oldest active scene entity (if any).
CBaseFlex::GetSceneByIndex handle CBaseFlex::GetSceneByIndex(int) Returns the instance of the scene entity at the specified index.

CBasePlayer

Extends CBaseAnimating.

Methods

Function Signature Description
CBasePlayer::IsNoclipping bool CBasePlayer::IsNoclipping() Returns true if the player is in noclip mode.

CEnvEntityMaker

Extends CBaseEntity.

Methods

Function Signature Description
CEnvEntityMaker::SpawnEntity void CEnvEntityMaker::SpawnEntity() Create an entity at the location of the maker
CEnvEntityMaker::SpawnEntityAtEntityOrigin void CEnvEntityMaker::SpawnEntityAtEntityOrigin(handle) Create an entity at the location of a specified entity instance
CEnvEntityMaker::SpawnEntityAtLocation void CEnvEntityMaker::SpawnEntityAtLocation(Vector, Vector) Create an entity at a specified location and orientaton, orientation is Euler angle in degrees (pitch, yaw, roll)
CEnvEntityMaker::SpawnEntityAtNamedEntityOrigin void CEnvEntityMaker::SpawnEntityAtNamedEntityOrigin(string) Create an entity at the location of a named entity

CPlayerVoiceListener

Extends .

Methods

Function Signature Description
CPlayerVoiceListener::GetPlayerSpeechDuration float CPlayerVoiceListener::GetPlayerSpeechDuration(int) Returns the number of seconds the player has been continuously speaking.
CPlayerVoiceListener::IsPlayerSpeaking bool CPlayerVoiceListener::IsPlayerSpeaking(int) Returns whether the player specified is speaking.

CTriggerCamera

Extends CBaseEntity.

Methods

Function Signature Description
CTriggerCamera::GetFov int CTriggerCamera::GetFov() get camera's current fov setting as integer
CTriggerCamera::SetFov void CTriggerCamera::SetFov(int, float) set camera's current fov in integer degrees and fov change rate as float

CScriptKeyValues

Extends .

Methods

Function Signature Description
CScriptKeyValues::FindKey handle CScriptKeyValues::FindKey(string) Given a KeyValues object and a key name, find a KeyValues object associated with the key name
CScriptKeyValues::GetFirstSubKey handle CScriptKeyValues::GetFirstSubKey() Given a KeyValues object, return the first sub key object
CScriptKeyValues::GetKeyBool bool CScriptKeyValues::GetKeyBool(string) Given a KeyValues object and a key name, return associated bool value
CScriptKeyValues::GetKeyFloat float CScriptKeyValues::GetKeyFloat(string) Given a KeyValues object and a key name, return associated float value
CScriptKeyValues::GetKeyInt int CScriptKeyValues::GetKeyInt(string) Given a KeyValues object and a key name, return associated integer value
CScriptKeyValues::GetKeyString string CScriptKeyValues::GetKeyString(string) Given a KeyValues object and a key name, return associated string value
CScriptKeyValues::GetNextKey handle CScriptKeyValues::GetNextKey() Given a KeyValues object, return the next key object in a sub key group
CScriptKeyValues::IsKeyEmpty bool CScriptKeyValues::IsKeyEmpty(string) Given a KeyValues object and a key name, return true if key name has no value
CScriptKeyValues::ReleaseKeyValues void CScriptKeyValues::ReleaseKeyValues() Given a root KeyValues object, release its contents

CBaseEntity

Extends .

Methods

Function Signature Description
CBaseEntity::ConnectOutput void CBaseEntity::ConnectOutput(string, string) Adds an I/O connection that will call the named function when the specified output fires
CBaseEntity::Destroy void CBaseEntity::Destroy()
CBaseEntity::DisconnectOutput void CBaseEntity::DisconnectOutput(string, string) Removes a connected script function from an I/O event.
CBaseEntity::EmitSound void CBaseEntity::EmitSound(string) Plays a sound from this entity.
CBaseEntity::EyePosition Vector CBaseEntity::EyePosition() Get vector to eye position - absolute coords
CBaseEntity::FirstMoveChild handle CBaseEntity::FirstMoveChild()
CBaseEntity::GetAngles Vector CBaseEntity::GetAngles() Get entity pitch, yaw, roll as a vector
CBaseEntity::GetAngularVelocity Vector CBaseEntity::GetAngularVelocity() Get the local angular velocity - returns a vector of pitch,yaw,roll
CBaseEntity::GetBoundingMaxs Vector CBaseEntity::GetBoundingMaxs() Get a vector containing max bounds, centered on object
CBaseEntity::GetBoundingMins Vector CBaseEntity::GetBoundingMins() Get a vector containing min bounds, centered on object
CBaseEntity::GetCenter Vector CBaseEntity::GetCenter() Get vector to center of object - absolute coords
CBaseEntity::GetClassname string CBaseEntity::GetClassname()
CBaseEntity::GetForwardVector Vector CBaseEntity::GetForwardVector() Get the forward vector of the entity
CBaseEntity::GetHealth int CBaseEntity::GetHealth()
CBaseEntity::GetLeftVector Vector CBaseEntity::GetLeftVector() Get the left vector of the entity
CBaseEntity::GetMaxHealth int CBaseEntity::GetMaxHealth()
CBaseEntity::GetModelKeyValues handle CBaseEntity::GetModelKeyValues() Get a KeyValue class instance on this entity's model
CBaseEntity::GetModelName string CBaseEntity::GetModelName() Returns the name of the model
CBaseEntity::GetMoveParent handle CBaseEntity::GetMoveParent() If in hierarchy, retrieves the entity's parent
CBaseEntity::GetName string CBaseEntity::GetName()
CBaseEntity::GetOrigin Vector CBaseEntity::GetOrigin()
CBaseEntity::GetOwner handle CBaseEntity::GetOwner() Gets this entity's owner
CBaseEntity::GetPreTemplateName string CBaseEntity::GetPreTemplateName() Get the entity name stripped of template unique decoration
CBaseEntity::GetRootMoveParent handle CBaseEntity::GetRootMoveParent() If in hierarchy, walks up the hierarchy to find the root parent
CBaseEntity::GetScriptId string CBaseEntity::GetScriptId() Retrieve the unique identifier used to refer to the entity within the scripting system
CBaseEntity::GetScriptScope handle CBaseEntity::GetScriptScope() Retrieve the script-side data associated with an entity
CBaseEntity::GetSoundDuration float CBaseEntity::GetSoundDuration(string, string) Returns float duration of the sound. Takes soundname and optional actormodelname.
CBaseEntity::GetTeam int CBaseEntity::GetTeam()
CBaseEntity::GetUpVector Vector CBaseEntity::GetUpVector() Get the up vector of the entity
CBaseEntity::GetVelocity Vector CBaseEntity::GetVelocity()
CBaseEntity::NextMovePeer handle CBaseEntity::NextMovePeer()
CBaseEntity::PrecacheSoundScript void CBaseEntity::PrecacheSoundScript(string) Precache a sound for later playing.
CBaseEntity::SetAbsOrigin void CBaseEntity::SetAbsOrigin(Vector) SetAbsOrigin
CBaseEntity::SetAngles void CBaseEntity::SetAngles(float, float, float) Set entity pitch, yaw, roll
CBaseEntity::SetAngularVelocity void CBaseEntity::SetAngularVelocity(float, float, float) Set the local angular velocity - takes float pitch,yaw,roll velocities
CBaseEntity::SetForwardVector void CBaseEntity::SetForwardVector(Vector) Set the orientation of the entity to have this forward vector
CBaseEntity::SetHealth void CBaseEntity::SetHealth(int)
CBaseEntity::SetMaxHealth void CBaseEntity::SetMaxHealth(int)
CBaseEntity::SetModel void CBaseEntity::SetModel(string)
CBaseEntity::SetOrigin void CBaseEntity::SetOrigin(Vector)
CBaseEntity::SetOwner void CBaseEntity::SetOwner(handle) Sets this entity's owner
CBaseEntity::SetSize void CBaseEntity::SetSize(Vector, Vector)
CBaseEntity::SetTeam void CBaseEntity::SetTeam(int)
CBaseEntity::SetVelocity void CBaseEntity::SetVelocity(Vector)
CBaseEntity::ValidateScriptScope bool CBaseEntity::ValidateScriptScope() Ensure that an entity's script scope has been created
CBaseEntity::entindex int CBaseEntity::entindex()

CEntities

Extends .

Methods

Function Signature Description
CEntities::CreateByClassname handle CEntities::CreateByClassname(string) Creates an entity by classname
CEntities::FindByClassname handle CEntities::FindByClassname(handle, string) Find entities by class name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByClassnameNearest handle CEntities::FindByClassnameNearest(string, Vector, float) Find entities by class name nearest to a point.
CEntities::FindByClassnameWithin handle CEntities::FindByClassnameWithin(handle, string, Vector, float) Find entities by class name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByModel handle CEntities::FindByModel(handle, string) Find entities by model name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByName handle CEntities::FindByName(handle, string) Find entities by name. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByNameNearest handle CEntities::FindByNameNearest(string, Vector, float) Find entities by name nearest to a point.
CEntities::FindByNameWithin handle CEntities::FindByNameWithin(handle, string, Vector, float) Find entities by name within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindByTarget handle CEntities::FindByTarget(handle, string) Find entities by targetname. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::FindInSphere handle CEntities::FindInSphere(handle, Vector, float) Find entities within a radius. Pass 'null' to start an iteration, or reference to a previously found entity to continue a search
CEntities::First handle CEntities::First() Begin an iteration over the list of entities
CEntities::Next handle CEntities::Next(handle) Continue an iteration over the list of entities, providing reference to a previously found entity

See also