TDM Script Reference/2.02: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(This was the draft page pre-2.02 release. Making it into a redirect while 2.02 is current.)
 
Line 1: Line 1:
This page has been generated automatically by the tdm_gen_script_event_doc console command, with [[Talk:TDM_Script_Reference/2.02|manual amendments]].
#REDIRECT [[TDM Script Reference]]
 
Generated by The Dark Mod 2.02, code revision 6021, last update: 2014-05-31 20:41
 
{{tdm-scripting-reference-intro}}
<div class="toclimit-4">
__TOC__
</div>
= TDM Script Event Reference =
 
== All Events ==
=== Alphabetic List ===
==== scriptEvent void '''accelSound'''(string sound); ====
 
:Sets the sound to be played when the mover accelerates.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''accelTime'''(float time); ====
 
:Sets the acceleration time. Set this acceleration time before initiating a new move.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''accelTo'''(float speed, float time); ====
 
:Initiates an acceleration to the given speed over the given time in seconds.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
:Spawnclasses responding to this event: ''CTarget_AddObjectives'', ''CTarget_CallScriptFunction'', ''CTarget_ChangeEntityRelation'', ''CTarget_ChangeLockState'', ''CTarget_ChangeTarget'', ''CTarget_InterMissionTrigger'', ''CTarget_SetEntityRelation'', ''CTarget_SetFrobable'', ''CTarget_SetObjectiveComponentState'', ''CTarget_SetObjectiveState'', ''CTarget_SetObjectiveVisibility'', ''CTarget_SetRelations'', ''CTarget_SetTeam'', ''CTarget_StartConversation'', ''idAFEntity_Generic'', ''idAFEntity_WithAttachedHead'', ''idAI'', ''idActivator'', ''idAnimated'', ''idBeam'', ''idBrittleFracture'', ''idCameraAnim'', ''idCameraView'', ''idCombatNode'', ''idDamagable'', ''idEarthQuake'', ''idEntityFx'', ''idExplodable'', ''idForceField'', ''idFuncAASObstacle'', ''idFuncAASPortal'', ''idFuncPortal'', ''idFuncSmoke'', ''idItem'', ''idLight'', ''idMoveable'', ''idMover'', ''idMover_Binary'', ''idPhantomObjects'', ''idPlayerStart'', ''idPortalSky'', ''idRiser'', ''idRotater'', ''idShaking'', ''idSound'', ''idStaticEntity'', ''idTarget_CallObjectFunction'', ''idTarget_Damage'', ''idTarget_EnableLevelWeapons'', ''idTarget_EndLevel'', ''idTarget_FadeEntity'', ''idTarget_FadeSoundClass'', ''idTarget_Give'', ''idTarget_LightFadeIn'', ''idTarget_LightFadeOut'', ''idTarget_PostScriptEvent'', ''idTarget_Remove'', ''idTarget_RemoveWeapons'', ''idTarget_SessionCommand'', ''idTarget_SetFov'', ''idTarget_SetGlobalShaderTime'', ''idTarget_SetInfluence'', ''idTarget_SetKeyVal'', ''idTarget_SetModel'', ''idTarget_SetShaderParm'', ''idTarget_SetShaderTime'', ''idTarget_Show'', ''idTarget_WaitForButton'', ''idTrigger_Count'', ''idTrigger_EntityName'', ''idTrigger_Fade'', ''idTrigger_Hurt'', ''idTrigger_Multi'', ''idTrigger_Timer'', ''idTrigger_Touch'', ''idVacuumSeparatorEntity''
==== scriptEvent void '''activateContacts'''(); ====
 
:Activate objects sitting on this object.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''activateTargets'''(entity activator); ====
 
:Causes this entity to activate all it's targets. Similar to how a trigger activates entities.
::''activator'': the entity that caused the action (usually the player)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''addDescendant'''(entity vine); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
 
:Adds the given item to the inventory. Depending on the type the passed entity will be removed from the game (as for loot items) or hidden.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''addItemToInv'''(entity target); ====
 
:Adds the entity to the given entity's inventory. Depending on the type the entity will be removed from the game (as for loot items) or hidden. Example: $book->addItemToInv($player1);
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''addTarget'''(entity target); ====
 
:Add a target to this entity.
::''target'': the entity to add as target
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''addToClip'''(float amount); ====
 
:No description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''alert'''(string type, float val); ====
 
:ai generalized alerts
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''alertAI'''(string type, float amount, entity actor); ====
 
:internal
::''type'': alert type
::''amount'': alert amount
::''actor'': actor causing alert
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''allowDamage'''(); ====
 
:The AI can take damage again.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''allowDrop'''(float allow); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''allowHiddenMovement'''(float enable); ====
 
:Normally, when hidden, monsters do not run physics. This enables physics when hidden.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''allowMovement'''(float allow); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''ammoAvailable'''(); ====
 
:Number of shots left in inventory
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''ammoInClip'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent vector '''angToForward'''(vector angles); ====
 
:Returns a forward vector for the given Euler angles.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''angToRight'''(vector angles); ====
 
:Returns a right vector for the given Euler angles.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''angToUp'''(vector angles); ====
 
:Returns an up vector for the given Euler angles.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''animDistance'''(float channel, string animName); ====
 
:Returns the distance that the anim travels. If the entity has multiple anims with animName, the distance may not match the anim that is played. Use chooseAnim to get a non-random anim and pass that string into animDistance.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''animDone'''(float channel, float blendOutFrames); ====
 
:Returns true if the animation playing on the given channel is completed considering a number of blend frames.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent float '''animIsPaused'''(float channel); ====
 
:Return whether the given anim channel is paused
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent float '''animLength'''(float channel, string animName); ====
 
:Returns the length of the anim in seconds. If the entity has multiple anims with animName, length may not match the anim that is played. Use chooseAnim to get a non-random anim and pass that string into animLength.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''animState'''(float channel, string stateFunction, float blendFrame); ====
 
:Sets a new animation state script function for the given channel.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''animTurn'''(float angle); ====
 
:Enable/disable animation controlled turning.
::''angle'': Pass in the maximum # of degrees the animation turns. Use an amount of 0 to disable.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''assert'''(float condition); ====
 
:Breaks if the condition is zero. (Only works in debug builds.)
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''attach'''(entity ent, string attName); ====
 
:Attach an entity to the AI. Entity spawnArgs checked for attachments are:  - "origin", "angles", and "joint". These must be set prior to calling attach.
::''attName'': the desired name of the attachment, e.g., 'melee_weapon'
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''attachToPos'''(entity ent, string position, string attName); ====
 
:Attach an entity to the AI, using a named attachment position
::''attName'': the desired name of the attachment, e.g., 'melee_weapon'
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''attackBegin'''(string damageDef); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''attackEnd'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''attackMelee'''(string damageDef); ====
 
:Returns true if the attack hit
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''attackMissile'''(string jointName); ====
 
:returns projectile fired
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''bark'''(string sound); ====
 
:Let the AI bark a certain sound.
::''sound'': sound name, e.g. 'snd_warn_response'
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''becomeNonSolid'''(); ====
 
:Makes the moveable non-solid for other entities.
 
:Spawnclasses responding to this event: ''idAI'', ''idMoveable''
==== scriptEvent float '''becomeRagdoll'''(); ====
 
:enables the ragdoll if the entity has one
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''becomeSolid'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''bind'''(entity master); ====
 
:Fixes this entity's position and orientation relative to another entity, such that when the master entity moves, so does this entity.
::''master'': the entity to bind to
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''bindPosition'''(entity master); ====
 
:Fixes this entity's position (but not orientation) relative to another entity, such that when the master entity moves, so does this entity.
::''master'': the entity to bind to
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''bindToBody'''(entity master, float bodyID, float orientated); ====
 
:Bind to AF body
::''master'': entity to bind to
::''bodyID'': AF body ID to bind to
::''orientated'': binds the orientation as well as position, if set to 1
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''bindToJoint'''(entity master, string boneName, float rotateWithMaster); ====
 
:Fixes this entity's position and orientation relative to a bone on another entity, such that when the master's bone moves, so does this entity.
::''master'': the entity to bind to
::''boneName'': the bone name
::''rotateWithMaster'': -
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''bob'''(float speed, float phase, vector distance); ====
 
:Initiates a translation back and forth along the given vector with the given speed and phase.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''burn'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''cacheSoundShader'''(string shaderName); ====
 
:Ensure the specified sound shader is loaded by the system. Prevents cache misses when playing sound shaders.
::''shaderName'': the sound shader to cache
 
:Spawnclasses responding to this event: ''idEntity'', ''idThread''
==== scriptEvent void '''callFunction'''(string functionName); ====
 
:Calls a function on an entity's script object. See also callGlobalFunction().
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''callGlobalFunction'''(string functionName, entity other); ====
 
:calls a global function and passes the other entity along as the first argument calls the function in a new thread, so it continues executing in the current thread right away (unlike entity.callFunction( "blah"))
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''callGui'''(float handle, string namedEvent); ====
 
:Calls a named event in a GUI.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''canBecomeSolid'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canBeUsedBy'''(entity ent); ====
 
:Returns true if the entity can be used by the argument entity
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''canHitEnemy'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canHitEnemyFromAnim'''(string anim); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canHitEnemyFromJoint'''(string jointname); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canPlant'''(vector traceStart, vector traceEnd, entity ignore, entity vine); ====
 
:No description
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''canReachEnemy'''(); ====
 
:Returns true if character can walk to enemy's position. For walking monsters, enemy should be near the floor.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canReachEntity'''(entity ent); ====
 
:Returns true if character can walk to entity's position. For walking monsters, entity should be near the floor.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canReachPosition'''(vector pos); ====
 
:Returns true if character can walk to specified position. For walking monsters, position should be near the floor.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canSee'''(entity ent); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canSeeEntity'''(entity target, float useLighting); ====
 
:This is a general version of idAI::canSee, that can be used by all entities. It doesn't regard FOV, it just performs a trace to check whether the target is occluded by world geometry. Is probably useful for stim/response as well Pass useLighting = true to take the lighting of the target entity into account. Use "isEntityHidden" as a script event with a threshold. The constant threshold value for useLighting is defined within the SDK in game/entity.h.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''canSeeExt'''(entity ent, float b_useFOV, float b_useLighting); ====
 
:This is an alternate version of canSee that can optionally choose to use field of vision and lighting calculations.
::''b_useFOV'': If 0 the entity will be visible even if the AI's back is turned to it
::''b_useLighting'': If b_useLighting is 0 the entity will be visible in complete darkness. If it is 1, the entity will only be visible if there is light shining on it, but the slightest light is enought. Use "isEntityHidden" as a script event with a threshold instead.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canSeePositionExt'''(vector position, float b_useFOV, float b_useLighting); ====
 
:This is an alternate version of canSeeExt that tests a location rather than an entity. Note that any actor at the position may make it not seeable from a distance.
::''b_useFOV'': If 0 the entity will be visible even if the AI's back is turned to it
::''b_useLighting'': If 0 the entity will be visible in complete darkness
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''canWater'''(); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent float '''ceil'''(float x); ====
 
:Returns the smallest integer that is greater than or equal to the given value.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''changeEntityRelation'''(entity ent, float relationChange); ====
 
:This changes the current relation to an entity by adding the new amount.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''changeInvIcon'''(string name, string category, string icon); ====
 
:Sets the inventory icon of the given item in the given category to <icon>.
::''name'': name of the item
::''category'': the item's category
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''changeInvItemCount'''(string name, string category, float amount); ====
 
:Decreases the inventory item stack count by amount. The item is addressed using the name and category of the item. These are usually defined on the inventory item entity ("inv_name", "inv_category")  Amount can be both negative and positive.
::''name'': name of the item
::''category'': the item's category
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''changeInvLightgemModifier'''(string name, string category, float amount); ====
 
:Sets the lightgem modifier value of the given item. Valid arguments are between 0 and 32 (which is the maximum lightgem value).
::''name'': name of the item
::''category'': the item's category
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''changeLootAmount'''(float type, float amount); ====
 
:Changes the loot amount of the given Type (e.g. GOODS) by <amount>.  The mission statisic for loot found gets changed too.  The new value of the changed type is returned (e.g. the new GOODS value if this has been changed).  Note: The LOOT_TOTAL type can't be changed and 0 is returned.
::''type'': one of: LOOT_GOLD, LOOT_GOODS, LOOT_JEWELRY
::''amount'': can be negative
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''changeWeaponName'''(string weaponName, string displayName); ====
 
:Changes the display name of the given weapon item to something different. Pass an empty string to reset the display name to the definition as found in the weaponDef.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''changeWeaponProjectile'''(string weaponName, string projectileDefName); ====
 
:Changes the projectile entityDef name of the given weapon (e.g. "broadhead") to the specified entityDef (e.g. "atdm:projectile_broadhead").
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''chargeAttack'''(string damageDef); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''checkAAS'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''checkAbsence'''(); ====
 
:description missing
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''checkAnim'''(float channel, string animName); ====
 
:Ensures that the animation exists and causes an error if it doesn't.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent string '''chooseAnim'''(float channel, string animName); ====
 
:Chooses a random anim and returns the name. Useful for doing move tests on anims.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''clearActiveInventoryMap'''(); ====
 
:Clear the active inventory map entity
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''clearActiveInventoryMapEnt'''(); ====
 
:Clear the active inventory map entity
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''clearAllJoints'''(); ====
 
:Removes any custom transforms on all joints.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent void '''clearBurn'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''clearController'''(); ====
 
:Need separate clearController because scripting doesn't like passing in $null_entity? (greebo: one could remove this function and set the argument type of setController to 'E'.
 
:Spawnclasses responding to this event: ''CAIVehicle''
==== scriptEvent void '''clearEnemy'''(); ====
 
:Clears the enemy entity
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''clearFlyOffset'''(); ====
 
:Sets the preferred height relative to the player's view height to fly at to the value set in the def file.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''clearJoint'''(float jointnum); ====
 
:Removes any custom transforms on the specified joint.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent void '''clearMouseDeadTime'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''clearPersistantArgs'''(); ====
 
:Clears data that persists between maps.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''clearSignal'''(float signalNum); ====
 
:Disables the callback function on the specified signal.
::''signalNum'': signal number
 
:Spawnclasses responding to this event:
==== scriptEvent void '''clearSignalThread'''(float signalNum, entity ent); ====
 
:Clears the script callback function set for when the given signal is raised on the given entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''clearWatered'''(); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent float '''clipSize'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''Close'''(); ====
 
:Closes the frobmover, regardless of its previous state. Mover must be open, otherwise nothing happens.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent void '''closeHidingSpotSearch'''(); ====
 
:This should be called when the script is done with the hiding spot search to free up memory.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''closePortal'''(); ====
 
:Closes the renderer portal associated with this mover.
 
:Spawnclasses responding to this event: ''idMover'', ''idMover_Binary''
==== scriptEvent entity '''closestEnemyToPoint'''(vector point); ====
 
:Returns the enemy closest to the given location.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''closestReachableEnemy'''(); ====
 
:Used for determining tactile alert targets
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''closestReachableEnemyOfEntity'''(entity team_mate); ====
 
:Finds another character's closest reachable enemy
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''continueSearchForHidingSpots'''(); ====
 
:This method continues searching for hiding spots. It will only find so many before returning so as not to cause long delays.  Detected spots are added to the currently building hiding spot list.  The return value is 0 if the end of the search was reached, or 1 if there is more processing to do (call this method again next AI frame)
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''copyBind'''(entity other); ====
 
:copy bind information of other to this entity (i.e., bind this entity to the same entity that other is bound to)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''copySpawnArgs'''(entity ent); ====
 
:copies the spawn args from an entity
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''cos'''(float degrees); ====
 
:Returns the cosine of the given angle in degrees.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''createMissile'''(string jointname); ====
 
:returns projectile created
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''createMissileFromDef'''(string defName, string jointName); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''createOverlay'''(string guiFile, float layer); ====
 
:Creates a GUI overlay. (must be used on the player)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''createProjectile'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''CreateTimer'''(float stimId, float hour, float minutes, float seconds, float milliseconds); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''CrossProduct'''(vector vec1, vector vec2); ====
 
:Returns the cross product of the two vectors.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''cullAll'''(); ====
 
:Cull (remove from world) all entities.
 
:Spawnclasses responding to this event: ''Seed''
==== scriptEvent void '''customDeath'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''damage'''(entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale); ====
 
:Deals damage to this entity (gets translated into the idEntity::Damage() method within the SDK).
::''inflictor'': the entity causing the damage (maybe a projectile)
::''attacker'': the "parent" entity of the inflictor, the one that is responsible for the inflictor (can be the same)
::''dir'': the direction the attack is coming from.
::''damageDefName'': the name of the damage entityDef to know what damage is being dealt to <self> (e.g. "damage_lava")
::''damageScale'': the scale of the damage (pass 1.0 as default, this should be ok).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''dampenSound'''(float dampen); ====
 
:Toggle whether the shattering sound is dampened on the window, e.g., when covered by moss.
::''dampen'': 1 = dampened, 0 = not dampened
 
:Spawnclasses responding to this event: ''idBrittleFracture''
==== scriptEvent void '''deathMenu'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''debugBounds'''(vector color, vector mins, vector maxs, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''debugCircle'''(vector color, vector origin, vector dir, float radius, float numSteps, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''debugLine'''(vector color, vector start, vector end, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''debug_tdm_material'''(string file); ====
 
:For temporary debuging purposes only. Should be removed eventually.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''decelSound'''(string sound); ====
 
:Sets the sound to be played when the mover decelerates.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''decelTime'''(float time); ====
 
:Sets the deceleration time. Set this deceleration time before initiating a new move.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''decelTo'''(float speed, float time); ====
 
:Initiates a deceleration to the given speed over the given time in seconds.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''destroyOverlay'''(float handle); ====
 
:Destroys a GUI overlay. (must be used on the player)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''directDamage'''(entity damageTarget, string damageDef); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''disable'''(); ====
 
:Disables the mover/trigger
 
:Spawnclasses responding to this event: ''Seed'', ''idMover_Binary'', ''idTrigger''
==== scriptEvent void '''disableAFPush'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''disableAnimchannel'''(float channel); ====
 
:Used to disable a certain animchannel (for example if the ai is dead)
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disableClip'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''disableEyeFocus'''(); ====
 
:Disables eye focus.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disableGravity'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''DisableLegIK'''(float num); ====
 
:disables leg IK
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disablePain'''(); ====
 
:Disables pain animations.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disableSplineAngles'''(); ====
 
:Disables aligning the mover with the spline direction.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''DisableWalkIK'''(); ====
 
:disables walk IK
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disableWeapon'''(); ====
 
:Lowers and disables the player weapon.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''distanceTo'''(entity other); ====
 
:Returns the distance of this entity to another entity.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''distanceToPoint'''(vector point); ====
 
:Returns the distance of this entity to a point.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''DotProduct'''(vector vec1, vector vec2); ====
 
:Returns the dot product of the two vectors.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''drawText'''(string text, vector origin, float scale, vector color, float align, float lifetime); ====
 
:text drawing for debugging. lifetime of 0 == 1 frame.
::''align'': 0 = left, 1 = center, 2 = right
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''dropAttachment'''(string attName); ====
 
:Drop the attachment for the given attachment name.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''dropAttachmentInd'''(float index); ====
 
:Drop the attachment for the given index.
::''index'': starts at 0
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''dropTorch'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''ejectBrass'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''emitterAddModel'''(string modelName, vector modelOffset); ====
 
:Adds a new particle (or regular, if you wish) model to the emitter, located at modelOffset units away from the emitter's origin.
 
:Spawnclasses responding to this event: ''idFuncEmitter''
==== scriptEvent float '''emitterGetNumModels'''(); ====
 
:Returns the number of models/particles this emitter has. Always >= 1.
 
:Spawnclasses responding to this event: ''idFuncEmitter''
==== scriptEvent void '''emptyHand'''(string hand); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''enable'''(); ====
 
:Enables the mover/trigger
 
:Spawnclasses responding to this event: ''Seed'', ''idMover_Binary'', ''idTrigger''
==== scriptEvent void '''enableAFPush'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''enableAnim'''(float channel, float blendFrames); ====
 
:Enables animation on the given channel.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''enableClip'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''enableDamage'''(float enable); ====
 
:enable/disable damage
 
:Spawnclasses responding to this event: ''idMoveable''
==== scriptEvent void '''enableEyeFocus'''(); ====
 
:Enables eye focus.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''enableGravity'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''EnableLegIK'''(float num); ====
 
:enables leg IK
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''enablePain'''(); ====
 
:Enables pain animations.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''enableSplineAngles'''(); ====
 
:Enables aligning the mover with the spline direction.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''EnableWalkIK'''(); ====
 
:enables walk IK
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''enableWeapon'''(); ====
 
:Enables the player weapon.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''endState'''(); ====
 
:Ends the current state with the given name, returns TRUE if more than one state is remaining.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''endZoom'''(float duration); ====
 
:Starts the zoom out event, which performs a gradual transition back to the default FOV. May be called during a transition as well to intercept a pending zoom in transition.
::''duration'': duration of the transition in msec
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''enemyInCombatCone'''(entity combatNode, float use_current_enemy_location); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''enemyPositionValid'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''enemyRange'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''enemyRange2D'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''entityInAttackCone'''(entity ent); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''error'''(string text); ====
 
:Issues an error.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''exitTeleporter'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''extinguishLights'''(); ====
 
:Extinguishes all lights (i.e. the <self> entity plus all bound lights)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''faceEnemy'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''faceEntity'''(entity ent); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''facingIdeal'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''fadeIn'''(vector color, float time); ====
 
:Fades towards the given color over the given time in seconds.
::''time'': in seconds
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''fadeInLight'''(float time); ====
 
:Turns the light on over the given time in seconds.
::''time'': in seconds
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''fadeOut'''(vector color, float time); ====
 
:Fades from the given color over the given time in seconds.
::''time'': in seconds
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''fadeOutLight'''(float time); ====
 
:Turns the light out over the given time in seconds.
::''time'': in seconds
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''fadeSound'''(float channel, float newLevel, float fadeTime); ====
 
:Fades the sound on this entity to a new level over a period of time.  Use SND_CHANNEL_ANY for all currently playing sounds.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''fadeTo'''(vector color, float alpha, float time); ====
 
:Fades to the given color up to the given alpha over the given time in seconds.
::''time'': in seconds
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''fadeToLight'''(vector color, float time); ====
 
:Fades the light to the given color over a given time.
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent entity '''findActorsInBounds'''(vector mins, vector maxs); ====
 
:Returns an entity within the bounds specified
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''findEnemy'''(float onlyInFov); ====
 
:Finds enemy player in PVS
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''findEnemyAI'''(float onlyInFov); ====
 
:Finds enemy monster in PVS
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''findEnemyInCombatNodes'''(); ====
 
:Finds enemy player in attack cones
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''findFriendlyAI'''(float team); ====
 
:Use this to find a visible AI friendly to ourselves. It basically iterates over all active entities in the map and looks for friendly actors. The pythagorean distance is taken to evaluate the distance.  Don't call this every frame, this might get expensive in larger maps. Returns the nearest visible actor entity or the $null_entity, if none was found.
::''team'': used to constrain the search to a given team. Set this to -1 to let the code ignore this argument
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''finishAction'''(string action); ====
 
:Finishes the given wait action.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''finishChannelAction'''(float channel, string animname); ====
 
:Overloaded finishAction function for setting the waitstate on each channel separately
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''fireMissileAtTarget'''(string jointname, string targetname); ====
 
:Launches a missile at entity specified by 'attack_target'.  returns projectile fired
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''firstPerson'''(); ====
 
:Returns view control to the player entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''flashlight'''(float enable); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''flee'''(entity entToFleeFrom, float algorithm, float distanceOption); ====
 
:Flee from the given entity. Pass the escape point lookup algorithm (e.g. EP_FIND_GUARDED) and the distanceOption (e.g. EP_DIST_NEAREST) to specify how the best escape point can be found. Refer to the tdm_defs.script file to see all the constants.  When algorithm is set to EP_FIND_AAS_AREA_FAR_FROM_THREAT, the distanceOption is interpreted as minimum threat distance. Returns FALSE if no escape point could be found.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''floor'''(float x); ====
 
:Returns the largest integer that is less than or equal to the given value.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''footstep'''(); ====
 
:Plays footstep sound.
 
:Spawnclasses responding to this event: ''idActor'', ''idAnimated''
==== scriptEvent void '''foundBody'''(entity body); ====
 
:Objective callback for when an AI finds a body.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''frob'''(); ====
 
:Frobs the entity (i.e. simulates a frob action performed by the player). Returns TRUE if the entity is frobable, FALSE otherwise.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''frobHilight'''(float state); ====
 
:ishtvan: Tries to make the entity frobhilight or not
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''frobRidable'''(entity playerController); ====
 
:Called when a player directly mounts or dismounts a ridable AI.
 
:Spawnclasses responding to this event: ''CAIVehicle''
==== scriptEvent void '''Gas_Knockout'''(entity inflictor); ====
 
:AI knockout
::''inflictor'': the entity causing the knockout, can be the $null_entity
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getActualStruckEnt'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent float '''getAcuity'''(string type); ====
 
:ai generalized alerts
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getAlertActor'''(); ====
 
:Get the actor that alerted the AI in this frame.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getAlertLevelOfOtherAI'''(entity otherEntity); ====
 
:This event gets the alert number of another AI (AI_AlertLevel variable value) Returns the alert number of the other AI, 0.0 if its not an AI or is NULL
::''otherEntity'': the other AI entity who's alert number is being queried
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getAngles'''(); ====
 
:Returns the current orientation of this entity (relative to bind parent if any).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getAngularVelocity'''(); ====
 
:Gets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of this vector defines the axis of rotation and the magnitude defines the rate of rotation about the axis in radians per second.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getAngularVelocityB'''(float id); ====
 
:Get the angular velocitiy of a particular body Returns (0,0,0) if the body ID is invalid.
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent string '''getAnimState'''(float channel); ====
 
:Returns the name of the current animation state script function used for the given channel.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''getAttachment'''(string attName); ====
 
:Get the attached entity with the given attachment name Will be NULL if the name is invalid or if the entity no longer exists
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''getAttachmentInd'''(float index); ====
 
:Get the attached entity at the given index. Will be NULL if the index is invalid or the entity no longer exists
::''index'': starts at 0
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''getAttacker'''(); ====
 
:Returns the attacking entity
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getAttackFlag'''(float combatType); ====
 
:Returns 1 if the given attack flag is activated.
::''combatType'': see tdm_defs.script for possible enum values
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getAudThresh'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getAxialDir'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent entity '''getBindChild'''(float ind); ====
 
:Returns the ind_th bind child of this entity or NULL if index is invalid. NOTE: indices start at zero
::''ind'': child index
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getBindMaster'''(); ====
 
:Returns the entity's bindmaster
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getBlendFrames'''(float channel); ====
 
:Returns the number of frames to blend between animations on the given channel.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent float '''getBoolKey'''(string key); ====
 
:Retrieves the boolean value of a specific spawn arg, defaulting to false.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getButtons'''(); ====
 
:Returns the button state from the current user command.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getClipMask'''(); ====
 
:Returns the clipmask of the physics object.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getClosestHiddenTarget'''(string entity_type); ====
 
:Finds the closest targeted entity of the specified type.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getColor'''(); ====
 
:Gets the color of this entity (shader parms Parm0, Parm1, Parm2).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getCombatNode'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getContents'''(); ====
 
:Returns the contents of the physics object.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getCurInvCategory'''(); ====
 
:Returns the name of the currently highlighted inventory category.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getCurInvIcon'''(); ====
 
:Returns the icon of the currently highlighted inventory item.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getCurInvItemEntity'''(); ====
 
:Returns the currently highlighted inventory item entity.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getCurInvItemId'''(); ====
 
:Returns the name of the currently highlighted inventory item (the one defined in "inv_item_id"). Most items will return an empty string, unless the "inv_item_id" is set on purpose.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getCurInvItemName'''(); ====
 
:Returns the name of the currently highlighted inventory item (the one defined in "inv_name").
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getCurrentMissionNum'''(); ====
 
:Returns the number of the current mission (0-based, the first mission has number 0).
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getCurrentWeapon'''(); ====
 
:Returns weaponX where X is the number of the weapon the player is currently holding.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getCurrentYaw'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent string '''getCurWeaponName'''(); ====
 
:Returns the name of the current weapon, as defined by "inv_weapon_name" in the weaponDef.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent string '''getcvar'''(string name); ====
 
:Returns the string for a cvar.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getDifficultyLevel'''(); ====
 
:Returns 0 (Easy), 1 (Medium) or 2 (Hard), depending on the difficulty level of the current mission.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getDifficultyName'''(float difficultyLevel); ====
 
:Returns the (translated) name of the difficulty level passed as the argument.
::''difficultyLevel'': 0 (Easy), 1 (Medium), 2 (Hard)
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''GetDoor'''(); ====
 
:Returns the associated door entity for this handle.
 
:Spawnclasses responding to this event: ''CFrobDoorHandle''
==== scriptEvent entity '''GetDoorhandle'''(); ====
 
:Returns the handle entity of this door. Can return NULL (== $null_entity)
 
:Spawnclasses responding to this event: ''CFrobDoor''
==== scriptEvent entity '''getDragged'''(); ====
 
:Returns the currently dragged body. Returns $null_entity if the body is shouldered, the player has nothing in his hands, or he has a non-AF entity in his hands. See also getShouldered(), getGrabbed() and getFrobbed().
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getEnemy'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getEnemyEyePos'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getEnemyPos'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getEntity'''(string name); ====
 
:Returns a reference to the entity with the specified name.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''getEntityKey'''(string key); ====
 
:Retrieves the entity specified by the spawn arg.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getEyePos'''(); ====
 
:Get eye position of the player and the AI
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent vector '''getFinalAngVel'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent vector '''getFinalVel'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent float '''getFloatKey'''(string key); ====
 
:Retrieves the floating point value of a specific spawn arg, defaulting to 0.0f.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getFov'''(); ====
 
:This returns the current FOV of the player. You can modify the current FOV with startZoom() and endZoom().
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getFrameTime'''(); ====
 
:returns the length of time between game frames.  this is not related to renderer frame rate.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''getFrobbed'''(); ====
 
:Returns the currently frobhilighted entity. This includes entities the player has in his hands. Sets "frob only used by" mode
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getGrabbed'''(); ====
 
:Returns the currently entity in the players hands. Returns $null_entity if the player has nothing in his hands Dragging or shouldering a body counts as grabbing it. See also getDragged(), getShouldered(), getFrobbed().
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent string '''getGui'''(float handle); ====
 
:Returns the file currently loaded by a GUI.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getGuiFloat'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getGuiInt'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getGuiString'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getHead'''(); ====
 
:Returns the entity used for the character's head, if it has one.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getHealth'''(); ====
 
:Returns the current health.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent vector '''getHinderance'''(string source); ====
 
:Used to get hinderance from a source.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent string '''getIdealWeapon'''(); ====
 
:No description
 
:Spawnclasses responding to this event:
==== scriptEvent float '''getImmobilization'''(string source); ====
 
:Used to get immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getIncidenceAngle'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent float '''getIntKey'''(string key); ====
 
:Retrieves the integer value of a specific spawn arg, defaulting to 0.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getInventoryOverlay'''(); ====
 
:Gets the default inventory overlay for the player. All other entities will return an invalid value.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getJointAngle'''(float jointnum); ====
 
:Returns the angular orientation of the joint in world space.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent float '''getJointHandle'''(string jointname); ====
 
:Looks up the number of the specified joint. Returns INVALID_JOINT if the joint is not found.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent vector '''getJointPos'''(float jointnum); ====
 
:Returns the position of the joint in world space.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent vector '''getJumpVelocity'''(vector pos, float speed, float max_jump_height); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent string '''getKey'''(string key); ====
 
:Retrieves the value of a specific spawn arg, defaulting to ''.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getLightInPVS'''(float falloff, float scaling); ====
 
:Computes the sum of all light in the PVS of the entity you call this on, and returns a vector with the sum.
::''falloff'': 0: no falloff with distance  0.5: sqrt(linear) falloff (dist 100 => 1/10)  1: linear falloff (dist 100 => 1/100)  2: square falloff (dist 100 => 1/10000)
::''scaling'': factor to scale the distance, can be used to lower/raise distance factor  after the linear or square scaling has been used good looking values are approx: sqrt(linear): 0.01, linear: 0.1, square 1.0
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getLightLevel'''(); ====
 
:Get level (intensity) of a light, <= 0.0 indicates it is off
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent vector '''getLightOrigin'''(); ====
 
:Get the light origin (independent of its visual model)
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent float '''getLightParm'''(float parmNum); ====
 
:Gets a shader parameter.
 
:Spawnclasses responding to this event: ''idLight'', ''idWeapon''
==== scriptEvent vector '''getLinearVelocity'''(); ====
 
:Gets the current linear velocity of this entity. The linear velocity of a physics object is a vector that defines the translation of the center of mass in units per second.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getLinearVelocityB'''(float id); ====
 
:Get the linear velocitiy of a particular body Returns (0,0,0) if the body ID is invalid.
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent entity '''getLocation'''(); ====
 
:Returns the idLocation entity corresponding to the entity's current location. This was player-specific before, but is now available to all entities.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''GetLock'''(); ====
 
:Returns the associated lock of this handle.
 
:Spawnclasses responding to this event: ''CFrobLockHandle''
==== scriptEvent float '''getLootAmount'''(float type); ====
 
:Returns the amount of loot for the given type (e.g. LOOT_GOODS). Pass LOOT_TOTAL to return the sum of all loot types.
::''type'': one of: LOOT_GOLD, LOOT_GOODS, LOOT_JEWELRY, LOOT_TOTAL
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getMainAmbientLight'''(); ====
 
:Returns the entity of the main ambient light.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getMass'''(float body); ====
 
:Gets mass of a body for an entity
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getMaxs'''(); ====
 
:Gets the maximum corner of this entity's bounding box.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getMeleeActPhase'''(); ====
 
:Returns the current melee action phase (holding,recovering,etc).
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getMeleeActState'''(); ====
 
:Returns the current melee action state (attacking/defending).
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getMeleeActType'''(); ====
 
:Returns the current melee action type (overhead,thrust,etc.).
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getMeleeLastActTime'''(); ====
 
:Returns the melee type of the last attack to hit this actor. Defaults to MELEETYPE_UNBLOCKABLE if we were not hit before.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getMeleeLastHitByType'''(); ====
 
:Returns the game time that the most recent melee action ended (in ms)
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getMeleeResult'''(); ====
 
:Get the result of the last melee action Follows MELEERESULT_* enum defined in tdm_defs.script
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent vector '''getMins'''(); ====
 
:Gets the minimum corner of this entity's bounding box.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getMissionStatistic'''(string statisticName); ====
 
:Returns current mission statistic.
::''statisticName'': Can be one of (case insensitive):
::{|
|-
|gamePlayTime||gameplay time in seconds
|-
|damageDealt||damage dealt to enemies
|-
|damageReceived||damage received by player
|-
|healthReceived||health received by player
|-
|pocketsPicked||pockets picked by player
|-
|foundLoot||loot found by player
|-
|missionLoot||total loot available in mission
|-
|totalTimePlayerSeen||total time the player was seen by enemies in seconds
|-
|numberTimesPlayerSeen||number of times player was seen by enemies
|-
|numberTimesAISuspicious||number of times AI was 'observant' or 'suspicious'. A single AI passing through both alert levels will add 2 to the score.
|-
|numberTimesAISearched||number of times AI was 'investigating' or 'searching'. A single AI passing through both alert levels will add 2 to the score.
|-
|sightingScore||sighting score (number of times player was seen * weight)
|-
|stealthScore||stealth score (sighting score + alerts * weights)
|-
|killedByPlayer||number of enemies killed by player
|-
|knockedOutByPlayer||number of enemies knocked out by player
|-
|bodiesFound||number of times enemies have spotted a body
|}
 
:Spawnclasses responding to this event: ''idThread''
 
==== scriptEvent float '''getMouseGesture'''(); ====
 
:Returns the results of the last mouse gesture in enum form. (see the definition for MOUSEDIR_* for which numbers correspond to which directions)
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getMove'''(); ====
 
:Returns the movement relative to the player's view angles from the current user command. vector_x = forward, vector_y = right, vector_z = up
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent string '''getMoveAnim'''(); ====
 
:Returns the name of the player-requested movement anim for a player controlled AI vehicle
 
:Spawnclasses responding to this event: ''CAIVehicle''
==== scriptEvent float '''getMoveSpeed'''(); ====
 
:Get the movement speed.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''getMoveTime'''(); ====
 
:Gets the movement time.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''getMoveType'''(); ====
 
:Returns the current movetype
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent string '''getName'''(); ====
 
:Returns the name of this entity.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getNextHinderance'''(string prefix, string lastMatch); ====
 
:Used to get the next hinderance from a source.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent string '''getNextIdleAnim'''(); ====
 
:This returns the name of the next idle anim to be played on this AI (used by AnimState scripts).
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent string '''getNextImmobilization'''(string prefix, string lastMatch); ====
 
:Used to get immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getNextInvItem'''(); ====
 
:Cycles the standard cursor to the next inventory item. Returns the item entity pointed to after the operation is complete.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getNextKey'''(string prefix, string lastMatch); ====
 
:Searches for the name of a spawn arg that matches the prefix.  For example, passing in "attack_target" matches "attack_target1", "attack_targetx", "attack_target_enemy",  etc. The returned string is the name of the key which can then be passed into functions like getKey() to lookup the value of that spawn arg.  This is useful for when you have multiple values to look up, like when you target multiple objects.  To find the next matching key, pass in the previous result and the next key returned will be the first one that matches after the previous result. Pass in "" to get the first match. Passing in a non-existent key is the same as passing in "". Returns "" when no  more keys match.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getNextTurnHinderance'''(string prefix, string lastMatch); ====
 
:Get the next hinderance on the view turning from a source
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getNthHidingSpotLocation'''(float hidingSpotIndex); ====
 
:This event returns the Nth hiding spot location.
::''hidingSpotIndex'': 0 based hiding spot index
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getNthHidingSpotType'''(float hidingSpotIndex); ====
 
:This event returns the Nth hiding spot type.
::''hidingSpotIndex'': 0 based hiding spot index
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getNumAttachments'''(); ====
 
:Return the number of attachments on an AI. Used to iterate through the attachments if desired.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getNumBodies'''(); ====
 
:Returns the number of bodies in the AF. If the AF physics pointer is NULL, it returns 0.
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent float '''getNumHidingSpots'''(); ====
 
:This event returns the number of hiding spots by the current hiding spot query. If there is no current query, this returns -1
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getNumMeleeWeapons'''(); ====
 
:Returns the number of melee weapons attached to an actor. This refers to the TDM-style attachments with the spawnarg 'is_weapon_melee' set to '1'.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getNumRangedWeapons'''(); ====
 
:Returns the number of ranged weapons attached to an actor. This refers to the TDM-style attachments with the spawnarg 'is_weapon_ranged' set to '1'.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getObjectiveComp'''(float ObjNum, float CompNum); ====
 
:Used to get the state of custom objective components
::''ObjNum'': Starts counting at 1
::''CompNum'': Starts counting at 1
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getObjectiveState'''(float ObjNum); ====
 
:Returns the current state of the objective with the number ObjNum.  State is one of the following: OBJ_INCOMPLETE = 0, OBJ_COMPLETE = 1, OBJ_INVALID = 2, OBJ_FAILED = 3
::''ObjNum'': Starts counting at 1
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getObservationPosition'''(vector targetPoint, float visualAcuityZeroToOne); ====
 
:This event is used to get a position that the AI can move to observe a  given position.  It is useful for looking at hiding spots that can't be reached, and performing other investigation functions.  Returns a world position from which the observation can take place. Returns the current AI origin if no such point is found.  @sideEffect This uses the AI_DEST_UNREACHABLE flag variable  to indicate if a point was found. It will be true if none was found, false if one was found.
::''targetPoint'': the world position to be observed
::''visualAcuityZeroToOne'': the visual acuity of the AI on a scale of 0.0 to 1.0 where 0.0 is blind and 1.0 is perfect vision.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getObstacle'''(); ====
 
:Gets the obstacle in the character's path
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getOrigin'''(); ====
 
:Returns the current position of this entity (relative to bind parent if any).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getOwner'''(); ====
 
:Returns the owning entity
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent string '''getPainAnim'''(); ====
 
:Returns the name of the pain animation.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getPersistantFloat'''(string key); ====
 
:Returns the floating point value for the given persistent arg
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getPersistantString'''(string key); ====
 
:Returns the string for the given persistent arg
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''getPersistantVector'''(string key); ====
 
:Returns the vector for the given persistent arg
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getPortAISoundLoss'''(float handle); ====
 
:AI sound propagation scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getPortalHandle'''(); ====
 
:Returns the portal handle.
 
:Spawnclasses responding to this event: ''idPortalEntity''
==== scriptEvent float '''getPortPlayerSoundLoss'''(float handle); ====
 
:Player sound loss  scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getPortSoundLoss'''(float handle); ====
 
:Sound propagation scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''getPrevInvItem'''(); ====
 
:Cycles the standard cursor to the previous inventory item. Returns the item entity pointed to after the operation is complete.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getPreviousWeapon'''(); ====
 
:Returns weaponX where X is the number of the weapon the player was previously holding.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getPrime'''(); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent float '''getProjectileState'''(); ====
 
:Gets the current state of the projectile. States are defined in doom_defs.script
 
:Spawnclasses responding to this event: ''idProjectile''
==== scriptEvent float '''getProjMass'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent vector '''getRadius'''(); ====
 
:Returns the light radius.
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent entity '''getRandomTarget'''(string entity_type); ====
 
:Finds a random targeted entity of the specified type.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getReachableEntityPosition'''(entity ent); ====
 
:Returns the position of the entity within the AAS if possible, otherwise just the entity position.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getRelation'''(float team1, float team2); ====
 
:No description
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getRelationEnt'''(entity ent); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''GetResponseEntity'''(); ====
 
:Returns the entity which should take the response. Some entities like AI heads are not responding themselves to stims, but relay it to another entity (i.e. the bodies they're attached to).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getShaderParm'''(float parm); ====
 
:Gets the value of the specified shader parm.
::''parm'': shader parm index
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getShouldered'''(); ====
 
:Returns the currently shouldered body, otherwise $null_entity. See also getDragged(), getGrabbed() and getFrobbed().
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getSize'''(); ====
 
:Gets the size of this entity's bounding box.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getSndDir'''(); ====
 
:ai hearing of sound
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getSomeOfOtherEntitiesHidingSpotList'''(entity otherEntity); ====
 
:This event splits off half of the hiding spot list of another entity and sets our hiding spot list to the "taken" points.  As such, it is useful for getting hiding spots from a seraching AI that this AI is trying to assist.  Returns the number of points in the list gotten.
::''otherEntity'': The other entity who's hiding spots we are taking
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getSoundLoss'''(); ====
 
:Returns the sound loss value (dB).
 
:Spawnclasses responding to this event: ''idPortalEntity''
==== scriptEvent float '''getSoundVolume'''(string soundName); ====
 
:Get the volume of the sound to play.
::''soundName'': the name of the sound
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''getState'''(); ====
 
:Gets the current state.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent entity '''getStruckEnt'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent vector '''getSurfNormal'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent string '''getSurfType'''(); ====
 
:Getter for projectile result variable
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent entity '''getTactEnt'''(); ====
 
:ai sense of touch
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getTalkTarget'''(); ====
 
:Returns the entity (player) trying to talk to the character
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getTarget'''(float num); ====
 
:Returns the requested target entity.
::''num'': The target number. Starts at 0.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getTDMVersion'''(); ====
 
:Get the current TDM version as integer. The value will be 108 for v1.08, 109 for v1.09 and 200 for v2.00 etc.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getTeam'''(); ====
 
:Returns the current team number.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getTicsPerSecond'''(); ====
 
:returns the number of game frames per second.  this is not related to renderer frame rate.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getTime'''(); ====
 
:Returns the current game time in seconds.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getTraceBody'''(); ====
 
:Returns the number of the body part of the entity which was hit during the last call to trace or tracePoint
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''getTraceEndPos'''(); ====
 
:Returns the position the trace stopped due to a collision with solid geometry during the last call to trace or tracePoint
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''getTraceEntity'''(); ====
 
:Returns a reference to the entity which was hit during the last call to trace or tracePoint
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getTraceFraction'''(); ====
 
:Returns the fraction of movement completed during the last call to trace or tracePoint.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getTraceJoint'''(); ====
 
:Returns the number of the skeletal joint closest to the location on the entity which was hit during the last call to trace or tracePoint
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''getTraceNormal'''(); ====
 
:Returns the normal of the hit plane during the last call to trace or tracePoint
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getTurnDelta'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getTurnHinderance'''(string source); ====
 
:* Get the hinderance on the view turning from a source
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''getTurnRate'''(); ====
 
:Gets the rate the character turns.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''getVectorKey'''(string key); ====
 
:Retrieves the vector value of a specific spawn arg, defaulting to '0 0 0'.
::''key'': spawnarg name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getViewAngles'''(); ====
 
:Returns the player view angles.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''getVinePlantLoc'''(); ====
 
:Event important to the growing of vines from vine arrows
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getVinePlantNormal'''(); ====
 
:Event important to the growing of vines from vine arrows
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''getVisDir'''(); ====
 
:Returns position of the last visual alert.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent entity '''getWeaponEntity'''(); ====
 
:Returns the entity for the player's weapon
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getWorldModel'''(); ====
 
:Returns the entity that controls the world model
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent vector '''getWorldOrigin'''(); ====
 
:Returns the current world-space position of this entity (regardless of any bind parent).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''gib'''(string damageDefName); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAFEntity_Gibbable'', ''idMoveableItem''
==== scriptEvent void '''giveHealthPool'''(float amount); ====
 
:This increases/decreases the healthpool of the player by the given amount. The healthpool is gradually decreased over time, healing (damaging?) the player.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''handleMissionEvent'''(entity objEnt, float eventType, string argument); ====
 
:Generic interface for passing on mission events from scripts to the SDK. Available since TDM 1.02
::''objEnt'': the entity that triggered this event (e.g. a readable)
::''eventType'': a numeric identifier (enumerated both in MissionData.h and tdm_defs.script) specifying the type of event
::''argument'': an optional string parameter, eventtype-specific.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''hasAnim'''(float channel, string animName); ====
 
:Returns true when an entity has a specific animation.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''hasEnemies'''(); ====
 
:Returns true if the actor has one or more enemies.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''hasFunction'''(string functionName); ====
 
:checks if an entity's script object has a specific function
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''hasSeenEvidence'''(); ====
 
:This returns 1 when the AI has seen evidence of intruders before (an enemy, a body...)
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''heal'''(string healDefName, float healScale); ====
 
:Heals the entity this is called on using the specified healing entityDef. Returns 1 if the entity could be healed, 0 otherwise (if the entity is already at full health, for ex.)
::''healDefName'': the name of the entityDef containing the healing information (e.g. "heal_potion")
::''healScale'': the scaling value to be applied to the healAmount found in the healEntityDef
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''heldEntity'''(); ====
 
:Returns the entity currently being held, or $null_entity if the player's hands are empty.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''hide'''(); ====
 
:Makes this entity invisible.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''hideByLODBias'''(); ====
 
:internal
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''holdEntity'''(entity entity); ====
 
:Forces the player to hold an entity (e.g. puts it into the grabber). Drops whatever is in the player's hands if $null_entity is passed to it. Returns 1 if successful, 0 if not.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''idleAnim'''(float channel, string animName); ====
 
:Plays the given idle animation on the given channel.  Returns false if anim doesn't exist.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''ignoreDamage'''(); ====
 
:The AI can no longer take damage.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''inAnimState'''(float channel, string stateFunc); ====
 
:Returns true if the given animation state script function is currently used for the given channel.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''influenceActive'''(); ====
 
:Checks if an influence is active
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''inPVS'''(); ====
 
:Returns non-zero if this entity is in PVS. For lights, it will return true when the light's bounding box is in PVS, even though the light may not actually be in PVS. (an unmoved shadowcasting light may not be visible to PVS areas its bounding box intersects with)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isAtRest'''(); ====
 
:Returns true if object is not moving
 
:Spawnclasses responding to this event: ''idMoveable''
==== scriptEvent float '''isClient'''(); ====
 
:networking - checks for client
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''isDroppable'''(); ====
 
:Get whether an item may be dropped from the inventory
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isEnemy'''(entity ent); ====
 
:Returns true if the given entity is an enemy.
::''ent'': The entity in question
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isEntityHidden'''(entity ent, float f_sightThreshold); ====
 
:This is an alternate version of canSee, using FOV, distance and lighting.
::''f_sightThreshold'': goes from 0.0 (entity visible in complete darkness) to 1.0 (entity only visible if completely lit up).
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''isFriend'''(entity ent); ====
 
:Returns true if the given entity is a friend.
::''ent'': The entity in question
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isFrobable'''(); ====
 
:Get whether the entity is frobable
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isHidden'''(); ====
 
:checks if the entity's model is invisible.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isHilighted'''(); ====
 
:Returns true if entity is currently frobhilighted.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isInLiquid'''(); ====
 
:Returns 1 if the entity is in or touching a liquid.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isInvisible'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''isLight'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''IsLocked'''(); ====
 
:Returns true (nonzero) if the mover is currently locked.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''isMoving'''(); ====
 
:Returns true if a mover is moving
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''isMultiplayer'''(); ====
 
:checks if it's a multiplayer game
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''isNeutral'''(entity ent); ====
 
:Returns true if the given entity is neutral.
::''ent'': The entity in question
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''IsOpen'''(); ====
 
:Returns true (nonzero) if the mover is open, which is basically the same as "not closed". A mover is considered closed when it is at its close position.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''IsPickable'''(); ====
 
:Returns true (nonzero) if this frobmover is pickable.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''isPlayerResponsibleForDeath'''(); ====
 
:Returns true if the player was responsible for the AI's caller's death.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''isRotating'''(); ====
 
:Returns true if a mover is rotating
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''isType'''(string spawnclass); ====
 
:Returns true if this entity is of the given type.
::''spawnclass'': spawn class name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isVineFriendly'''(); ====
 
:Vine-arrow event
 
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent void '''kickObstacles'''(entity kickEnt, float force); ====
 
:Kicks any obstacle in the character's path.
::''kickEnt'': pass in $null_entity if you don't have a specific entity to kick
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''kill'''(); ====
 
:Kills the monster.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''killthread'''(string threadName); ====
 
:Kills all threads with the specified name
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''KO_Knockout'''(entity inflictor); ====
 
:AI knockout
::''inflictor'': is the entity causing the knockout, can be the $null_entity
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''launch'''(vector start, vector dir, vector velocity); ====
 
:Launches the projectile from <start> in direction <dir> with the given <velocity>
 
:Spawnclasses responding to this event: ''idProjectile''
==== scriptEvent entity '''launchMissile'''(vector origin, vector angles); ====
 
:Returns the projectile entity
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''launchMissiles'''(string projectilename, string sound, string launchbone, string targetbone, float numshots, float framedelay); ====
 
:Launches a projectile.
 
:Spawnclasses responding to this event: ''idAnimated''
==== scriptEvent void '''launchProjectiles'''(float num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''leftFoot'''(); ====
 
:Changes to left foot and plays footstep sound.
 
:Spawnclasses responding to this event: ''idActor'', ''idAnimated'', ''idTestModel''
==== scriptEvent float '''loadExternalData'''(string declFile, string prefix); ====
 
:Load an external xdata declaration.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''locateEnemy'''(); ====
 
:Updates the last known position of the enemy independent from whether or not the enemy is visible.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''Lock'''(); ====
 
:Locks the mover. Calls to Open() will not succeed after this call.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''log'''(float x); ====
 
:Returns the log of the given argument.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''logString'''(float logClass, float logType, string output); ====
 
:This is the script counterpart to DM_LOG
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''lookAt'''(entity focusEntity, float duration); ====
 
:Aims the character's eyes and head toward an entity for a period of time.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''lookAtAngles'''(float yawAngleClockwise, float pitchAngleUp, float rollAngle, float durationInSeconds); ====
 
:A look at event that just looks at a set of angles relative  to the current body facing of the AI. This method is just like the vanilla Doom3 lookAt and lookAtEnemy methods, but it looks at the specified angles from the current body facing of the AI.
::''yawAngleClockwise'': Negative angles are to the left of  the AIs body and positive angles are to the right.
::''pitchAngleUp'': Negative values are down and positive values are up  where down and up are defined by the body axis.
::''rollAngle'': This is currently unused and does nothing.
::''durationInSeconds'': The duration to look in seconds.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''lookAtEnemy'''(float duration); ====
 
:Aims the character's eyes and head toward the current enemy for a period of time.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''lookAtPosition'''(vector lookAtWorldPosition, float durationInSeconds); ====
 
:This method is just like the vanilla Doom3 lookAt and lookAtEnemy methods, but instead of looking at an entity, it looks at a position in worldspace.  That is, it turns the head of the AI to look at the position.
::''lookAtWorldPosition'': position in space to look at
::''durationInSeconds'': duration to look in seconds
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent string '''lookupReplacementAnim'''(string anim); ====
 
:Returns the current replacement animation for "anim". Returns empty if no replacement anim
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''markUsed'''(); ====
 
:Disables the combat node if "use_once" is set on the entity.
 
:Spawnclasses responding to this event: ''idCombatNode''
==== scriptEvent float '''melee'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''meleeActionFinished'''(); ====
 
:Called when the animation for the melee action has finished.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''meleeActionHeld'''(); ====
 
:Called when the melee action reaches the "hold" point.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''meleeActionReleased'''(); ====
 
:Called when the melee action is released from the hold point.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''meleeAttackStarted'''(float attType); ====
 
:Registers the start of a given melee attack Intended to be called from a script that also starts the animation
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''meleeAttackToJoint'''(string joint, string damageDef); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''meleeBestParry'''(); ====
 
:Returns the melee type integer of the best parry given the enemy attacks at the time If no attacking enemy is found, returns default of MELEETYPE_RL Follows MELEETYPE_* enum defined in tdm_defs.script
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent string '''meleeNameForNum'''(float num); ====
 
:Converts a melee type integer to a string name suffix Used for finding the right animation for a given type, etc. Possible names are, in order: "Over, LR, RL, Thrust, General" Where general blocks all attacks types except unblockable
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''meleeParryStarted'''(float parType); ====
 
:Registers the start of a given melee parry Intended to be called from a script that also starts the animation
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''missionFailed'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''missionSuccess'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''mouseGestureFinished'''(); ====
 
:Returns true if the player is not currently doing a mouse gesture.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''move'''(float angle, float distance); ====
 
:Initiates a translation with the given distance in the given yaw direction. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''moveOutOfRange'''(entity ent, float range); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveSound'''(string sound); ====
 
:Sets the sound to be played when the moving.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''moveStatus'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveTo'''(entity targetEntity); ====
 
:Initiates a translation to the position of an entity. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''moveToAttackPosition'''(entity ent, string attack_anim); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToCover'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToCoverFrom'''(entity ent); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToEnemy'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToEnemyHeight'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToEntity'''(entity destination); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''moveToPos'''(vector pos); ====
 
:Initiates a translation to an absolute position. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''moveToPosition'''(vector position); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''music'''(string shaderName); ====
 
:Starts playing background music.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''muzzleFlash'''(string jointname); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''netEndReload'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''netReload'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent entity '''nextEnemy'''(entity lastEnemy); ====
 
:Returns the next enemy the actor has acquired.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''nextWeapon'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''noShadows'''(float noShadows); ====
 
:Sets the noShadow property on the entity to true/false, turning shadowcasting on or off for this entity.
::''noShadows'': 1 = disable shadows, 0 = enable shadows
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''noShadowsDelayed'''(float noShadows, float delay); ====
 
:Sets the noShadow property on the entity to true/false after delay in ms, turning shadows cast by this entity on or off.
::''noShadows'': 1 = disable shadows, 0 = enable shadows
::''delay'': delay in ms
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''numBindChildren'''(); ====
 
:Returns the number of bound entities lower down in the bind chain than this entity
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''numSmokeEmitters'''(); ====
 
:Returns the # of emitters defined by 'smokeParticleSystem' in the entitydef
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''numTargets'''(); ====
 
:Returns the number of entities this entity has targeted.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''objectiveCompUnlatch'''(float ObjNum, float CompNum); ====
 
:Unlatch an irreversible objective component that has latched into a state
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''objectiveUnlatch'''(float ObjNum); ====
 
:Unlatch an irreversible objective that has latched into a state
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''Off'''(); ====
 
:Turns the entity off.
 
:Spawnclasses responding to this event: ''idLight'', ''idSound''
==== scriptEvent void '''offsetRelation'''(float team1, float team2, float val); ====
 
:No description
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''On'''(); ====
 
:Turns the entity on.
 
:Spawnclasses responding to this event: ''idLight'', ''idSound''
==== scriptEvent void '''onSignal'''(float signalNum, entity ent, string functionName); ====
 
:Sets a script callback function for when the given signal is raised on the given entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''Open'''(); ====
 
:Opens the frobmover, regardless of its previous state. The mover will not move when it's locked.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock''
==== scriptEvent void '''OpenDoor'''(float master); ====
 
:The OpenDoor method is necessary to give the FrobDoorHandles a  "low level" open routine. The CFrobDoor::Open() call is re-routed to the FrobDoorHandle::Tap() method, so there must be a way to actually let the door open. Which is what this method does.  Note: Shouldn't be called directly by scripters, call handle->Tap() instead. Unless you know what you're doing.
 
:Spawnclasses responding to this event: ''CFrobDoor''
==== scriptEvent void '''openPortal'''(); ====
 
:Opens the renderer portal associated with this mover.
 
:Spawnclasses responding to this event: ''idMover'', ''idMover_Binary''
==== scriptEvent void '''Operate'''(); ====
 
:Call this to operate this entity.
 
:Spawnclasses responding to this event: ''CFrobButton'', ''CFrobLever''
==== scriptEvent void '''overrideAnim'''(float channel); ====
 
:Disables the animation currently playing on the given channel and syncs the animation with the animation of the nearest animating channel.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''pause'''(); ====
 
:Pauses the current thread.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''pauseAnim'''(float channel, float bPause); ====
 
:Pause all animations playing on the given channel. NOTE: Can also be used used by idWeapons
::''bPause'': true = pause, false = unpause
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent void '''pauseGame'''(); ====
 
:Pauses the game. This should only be called for threads that are explicitly maintained by a special SDK method, because ordinary threads won't get executed during g_stopTime == true. Note: This is used by the objective GUI threads. Note: Must be called on the player entity, not the sys entity.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''performRelight'''(); ====
 
:Deal with doused lights.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''playAndLipSync'''(string soundName, string animName); ====
 
:Play the given sound, using the given lipsync animation. The lipsync animation should just be a simple non-loopable animation of the mouth opening in a linear fashion. The code will select individual frames from this to construct a simple lipsyncing effect which is in time with the sound.  Returns the length of the played sound in seconds.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''playAnim'''(float channel, string animName); ====
 
:Plays the given animation on the given channel.  Returns false if anim doesn't exist.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent float '''playCycle'''(float channel, string animName); ====
 
:Continuously repeats the given animation on the given channel.  Returns false if anim doesn't exist.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent void '''playStartSound'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''pointInLiquid'''(vector point, entity ignoreEntity); ====
 
:Checks if a point is in a liquid, returns 1 if this is the case.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''pow'''(float x, float y); ====
 
:Returns the power of x to y.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''preBurn'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''predictEnemyPos'''(float time); ====
 
:Tries to predict the player's movement based on the AAS and his direction of movement.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''preventPain'''(float duration); ====
 
:Prevents any pain animation from being played for the given time in seconds.
::''duration'': time in seconds
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''print'''(string text); ====
 
:Prints the given string to the console.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''println'''(string text); ====
 
:Prints the given line to the console.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''processBlindStim'''(entity stimSource, float skipVisibilityCheck); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''processVisualStim'''(entity stimSource); ====
 
:Use this call to let the AI react to a visual stim (coming from the source entity).
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''propagateSound'''(string soundName, float propVolMod, float msgTag); ====
 
:Generates a propagated sound
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''propSound'''(string name); ====
 
:Sound propagation scriptfunctions on all entities propagate a sound directly without playing an audible sound
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''propSoundMod'''(string name, float volMod); ====
 
:propagate a sound directly with a volume modifier
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent vector '''pushPointIntoAAS'''(vector post); ====
 
:Tries to push the point into a valid AAS area
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''pushState'''(string stateName); ====
 
:Pushes the state with the given name, current one is postponed.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''radiusDamage'''(vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower); ====
 
:damages entities within a radius defined by the damageDef.  inflictor is the entity  causing the damage and can be the same as the attacker (in the case  of projectiles, the projectile is the inflictor, while the attacker is the character  that fired the projectile).
::''inflictor'': the entity causing the damage
::''ignore'': an entity to not cause damage to
::''dmgPower'': scales the damage (for cases where damage is dependent on time)
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''radiusDamageFromJoint'''(string jointname, string damageDef); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''random'''(float range); ====
 
:Returns a random value X where 0 <= X < range.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''randomPath'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI'', ''idPathCorner''
==== scriptEvent entity '''randomTarget'''(string ignoreName); ====
 
:Returns a random targeted entity. Pass in an entity name to skip that entity.
::''ignoreName'': the name of an entity to ignore
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''rangedThreatTo'''(entity target); ====
 
:Could this entity threaten the given (target) entity from a distance?
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''readLightgemModifierFromWorldspawn'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''reAttachToCoords'''(string attName, string joint, vector offset, vector angles); ====
 
:Reattach an existing attachment
::''attName'': the name of the attachment we want to reattach.
::''joint'': the name of the joint to attach to
::''offset'': the translation offset from joint
::''angles'': a (pitch, yaw, roll) angle vector that defines the rotation  of the attachment relative to the joint's orientation
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''reAttachToPos'''(string attName, string position); ====
 
:Reattach an existing attachment to a named attachment position. Example: reAttachToPos( melee_weapon, right_hand_held )
::''attName'': the name of the attachment we want to reattach.
::''position'': the new position we want to attach it to.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''reloadTorchReplacementAnims'''(); ====
 
:If actor has a torch, reload the torch's replacement anims.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''remove'''(); ====
 
:Removes the entity from the game. For AI, use kill() instead.
 
:Spawnclasses responding to this event: ''idClass''
==== scriptEvent void '''removeBinds'''(); ====
 
:Removes all attached entities from the game
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''removeInitialSplineAngles'''(); ====
 
:Subtracts the initial spline angles to maintain the initial orientation of the mover.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''removeKey'''(string key); ====
 
:Removes a key from an object's spawnargs, so things like getNextKey() don't retrieve it.
::''key'': the spawnarg to remove
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''removeReplacementAnim'''(string anim); ====
 
:Removes the replacement for the given "anim"
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''removeTarget'''(entity target); ====
 
:Remove a target from this entity.
::''target'': the entity to remove from the targets
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''replaceInvItem'''(entity oldItem, entity newItem); ====
 
:Replaces the entity <oldItem> with <newItem> in the inventory, while keeping <oldItem>'s inventory position intact.  Note: The position guarantee only applies if <oldItem> and newItem  share the same category. If the categories are different, the position of <newItem> is likely to be different than the one of <oldItem>.  Note that <oldItem> will be removed from the inventory.  If <newItem> is the $null_entity, <oldItem> is just removed and no replacement happens.  Returns 1 if the operation was successful, 0 otherwise.
::''newItem'': can be $null_entity
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResetTimer'''(float stimId); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''resetWeaponProjectile'''(string weaponName); ====
 
:Reloads the original projectile def name from the weaponDef. Used to revert a change made by the event changeWeaponProjectile().
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''resetZoom'''(); ====
 
:Cancels any pending zoom transitions and resets the FOV to normal.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''resortHidingSpotSearch'''(vector newCenter, vector newRadius); ====
 
:This re-sorts an existing search based on a new search center and radius.
::''newCenter'': the new center of the search
::''newRadius'': the new radius of the search.  Points outside the original search will not be added.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''respawn'''(); ====
 
:Respawn
 
:Spawnclasses responding to this event: ''idItem''
==== scriptEvent void '''ResponseAdd'''(float type); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseAllow'''(float type, entity responder); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseEnable'''(float type, float state); ====
 
:No description
::''state'': 0 = disabled, 1 = enabled
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseIgnore'''(float type, entity responder); ====
 
:This functions must be called on the stim entity. It will add the response to the ignore list, so that subsequent stims, should not trigger the stim anymore.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseRemove'''(float type); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseSetAction'''(float type, string action); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''ResponseTrigger'''(entity source, float stimType); ====
 
:Fires a response on this entity, without a stim (a stand-alone response, so to say)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''restartPatrol'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''RestartTimer'''(float stimId); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''restoreAddedEnts'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent void '''restoreMove'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''restorePosition'''(); ====
 
:Returns this entity to the position stored in the "origin" spawn arg. This is the position the entity was spawned in unless the "origin" key is changed. Note that there is no guarantee that the entity won't be stuck in another entity when moved, so care should be taken to make sure that isn't possible.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''rightFoot'''(); ====
 
:Changes to right foot and plays footstep sound.
 
:Spawnclasses responding to this event: ''idActor'', ''idAnimated'', ''idTestModel''
==== scriptEvent void '''ropeRemovalCleanup'''(entity ropeEnt); ====
 
:Called when rope arrow ropes are removed, removes stale pointers on the player object.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''rotate'''(vector angleSpeed); ====
 
:Initiates a rotation with the given angular speed. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''rotateDownTo'''(float axis, float angle); ====
 
:Initiates a rotation about the given axis by decreasing the current angle towards the given angle. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''rotateOnce'''(vector angles); ====
 
:Initiates a rotation towards the current angles plus the given Euler angles. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''rotateTo'''(vector angles); ====
 
:Initiates a rotation towards the given Euler angles. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''rotateUpTo'''(float axis, float angle); ====
 
:Initiates a rotation about the given axis by increasing the current angle towards the given angle. Uses the current speed/time and acceleration and deceleration settings.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''saveMove'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''say'''(string text); ====
 
:Multiplayer - Print this line on the network
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''scaleVine'''(float factor); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent void '''selectWeapon'''(string weapon); ====
 
:Selects the weapon the player is holding.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''sessionCommand'''(string cmd); ====
 
:Sends the sessioncommand to the game
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setActiveInventoryMapEnt'''(entity mapEnt); ====
 
:Notify the player about a new active map entity. This clears out any previously active maps.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setAcuity'''(string type, float val); ====
 
:ai generalized alerts
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setAlertGracePeriod'''(float frac, float duration, float count); ====
 
:This starts the alert grace period for an AI. Should be called in the same frame as the alert that pushes them into a higher state.
::''frac'': the fraction of the alert below which they should ignore alerts during the grace period.
::''duration'': the duration of the period in seconds
::''count'': the number of alerts ignored above which the grace period is invalid
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setAlertLevel'''(float newLevel); ====
 
:Set the alert level (AI_AlertLevel). This should always be called instead of setting AI_AlertLevel directly.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setAngles'''(vector angles); ====
 
:Sets the current orientation of this entity (relative to bind parent if any)
::''angles'': the new orientation
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setAngularVelocity'''(vector velocity); ====
 
:Sets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of this vector defines the axis of rotation and the magnitude defines the rate of rotation about the axis in radians per second.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setAngularVelocityB'''(vector velocity, float id); ====
 
:Set the angular velocity of a particular body
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent void '''setAnimPrefix'''(string prefix); ====
 
:Sets a string which is placed in front of any animation names.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setAttackFlag'''(float combatType, float enabled); ====
 
:Activate or deactivate the given attack flag
::''combatType'': see tdm_defs.script for possible enum values
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setAudThresh'''(float val); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setBlendFrames'''(float channel, float blendFrame); ====
 
:Sets the number of frames to blend between animations on the given channel.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent void '''setBoneMod'''(float allowBoneMod); ====
 
:Enables or disables head looking (may be obsolete).
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setCamera'''(entity cameraEnt); ====
 
:Turns over view control to the given camera entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setClipMask'''(float clipMask); ====
 
:Sets the clipmask of the physics object.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
 
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2).
::''parm0'': red
::''parm1'': green
::''parm2'': blue
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''SetConstraintPosition'''(string constraintName, vector position); ====
 
:Moves the constraint with the given name that binds this entity to another entity.
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent void '''setContents'''(float contents); ====
 
:Sets the contents of the physics object.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setController'''(entity playerController); ====
 
:Let a player assume movement control of an AI vehicle (may be remote control as in a player on a coach pulled by a horse)
 
:Spawnclasses responding to this event: ''CAIVehicle''
==== scriptEvent float '''setCurInvCategory'''(string categoryName); ====
 
:Sets the inventory cursor to the first item of the named category. Returns 1 on success, 0 on failure (e.g. wrong category name)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''setCurInvItem'''(string itemName); ====
 
:Sets the inventory cursor to the named item. Returns: the item entity of the newly selected item (can be $null_entity).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setcvar'''(string name, string value); ====
 
:Sets a cvar.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setDroppable'''(float droppable); ====
 
:Set whether an item may be dropped from the inventory.
::''droppable'': if non-zero the item becomes droppable, when called with 0 the item becomes non-droppable
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setEnemy'''(entity enemy); ====
 
:Make the given entity an enemy.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setEntityRelation'''(entity ent, float relation); ====
 
:Set a relation to another entity, this can be friendly (>0), neutral(0) or hostile (<0)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setFlyOffset'''(float offset); ====
 
:Sets the preferred height relative to the player's view height to fly at.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setFlySpeed'''(float speed); ====
 
:Set the speed flying creatures move at. Also sets speed for moveTypeSlide.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setFrobable'''(float frobable); ====
 
:Set whether the entity is frobable
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setFrobOnlyUsedByInv'''(float OnOff); ====
 
:Engages or disengages a mode where we only frobhilight entities that can be used by our current inventory item. This also disables general frobactions and only allows "used by" frob actions.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
 
:Loads a new file into an existing GUI.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setGuiFloat'''(float handle, string key, float val); ====
 
:Sets a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setGuiInt'''(float handle, string key, float val); ====
 
:Sets a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setGuiString'''(float handle, string key, string val); ====
 
:Sets a GUI parameter.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setGuiStringFromKey'''(float handle, string key, entity src, string srcKey); ====
 
:This is a kludge. It is equivelant to: setGuiString( handle, key, src.getKey(srcKey) ) However, it's used to bypass the 127 char size limit on script strings.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setHealth'''(float health); ====
 
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setHinderance'''(string source, float mCap, float fCap); ====
 
:Used to set hinderance from a source.
::''mCap'': mCap values from all sources are multiplied together to define a cap
::''fCap'': fCap values are not additive, the smallest one among all the sources is used
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setImmobilization'''(string source, float type); ====
 
:Used to set immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setJointAngle'''(float jointnum, float transform_type, vector angles); ====
 
:Modifies the orientation of the joint based on the transform type.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent void '''setJointPos'''(float jointnum, float transform_type, vector pos); ====
 
:Modifies the position of the joint based on the transform type.
 
:Spawnclasses responding to this event: ''idAnimatedEntity''
==== scriptEvent void '''setKey'''(string key, string value); ====
 
:Sets a key on this entity's spawn args. Note that most spawn args are evaluated when this entity spawns in, so this will not change the entity's behavior in most cases. This is chiefly for saving data the script needs in an entity for later retrieval.
::''key'': the spawnarg to set
::''value'': the value to store
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setLightgemModifier'''(string modifierName, float value); ====
 
:Sets the named lightgem modifier to a certain value. An example would be the player lantern: setLightgemModifier("lantern", 32). This way multiple modifiers can be set by concurrent script threads.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setLightOrigin'''(vector pos); ====
 
:Set origin of lights independent of model origin
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''setLightParm'''(float parmNum, float value); ====
 
:Sets a shader parameter.
 
:Spawnclasses responding to this event: ''idLight'', ''idWeapon''
==== scriptEvent void '''setLightParms'''(float parm0, float parm1, float parm2, float parm3); ====
 
:Sets the red/green/blue/alpha shader parms on the light and the model.
 
:Spawnclasses responding to this event: ''idLight'', ''idWeapon''
==== scriptEvent void '''setLinearVelocity'''(vector velocity); ====
 
:Sets the current linear velocity of this entity in units per second. The linear velocity of a physics object is a vector that defines the translation of the center of mass in units per second.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setLinearVelocityB'''(vector velocity, float id); ====
 
:Set the linear velocity of a particular body
 
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent void '''setModel'''(string modelName); ====
 
:Sets the model this entity uses
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setMoveType'''(float movetype); ====
 
:Set the current movetype.  movetypes are defined in tdm_ai.script
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setName'''(string name); ====
 
:Sets the name of this entity.
::''name'': the new name
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setNeverDormant'''(float enable); ====
 
:enables or prevents an entity from going dormant
::''enable'': 1 = enable, 0 = disable
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setNextState'''(string stateFunc); ====
 
:Sets the next state and waits until thread exits, or a frame delay before calling it. Handy for setting the state in the constructor.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setObjectiveComp'''(float ObjNum, float CompNum, float state); ====
 
:Used to set the state of custom objective components
::''ObjNum'': objective number. Starts counting at 1
::''CompNum'': component number. Starts counting at 1
::''state'': 1 or 0 for true or false
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setObjectiveEnabling'''(float ObjNum, string strIn); ====
 
:Set an objective's enabling objectives (objectives that must be completed before that objective may be completed).
::''strIn'': takes the form of a string that is a space-delimited list of integer objectives representing the new enabling objectives. E.g. : '1 2 3 4'
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setObjectiveOngoing'''(float ObjNum, float val); ====
 
:Sets objective ongoing.
::''val'': 1 for true, 0 for false
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setObjectiveOptional'''(float ObjNum, float val); ====
 
:Sets objective mandatory.
::''val'': 1 for true, 0 for false
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setObjectiveState'''(float ObjNum, float State); ====
 
:Used to set the state of objectives from the script. For example, use this to invalidate an objective when something happens in your mission. The first argument is the numerical index of the objective (taking 'user' objective indices, starting at 1). Choose from the following for the second argument: OBJ_INCOMPLETE, OBJ_COMPLETE, OBJ_INVALID, OBJ_FAILED. Use this on $player1 like $player1.setObjectiveState(1, OBJ_COMPLETE);
::''ObjNum'': Starts counting at 1
 
:Spawnclasses responding to this event: ''idPlayer''
 
==== scriptEvent void '''setObjectiveText'''(float ObjNum, string newText); ====
 
:Modify the displayed text for an objective. Can also be a string template like #str_20000
::''ObjNum'': Starts counting at 1
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setObjectiveVisible'''(float ObjNum, float val); ====
 
:Sets objective visibility.
::''val'': 1 for true, 0 for false
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setOrigin'''(vector origin); ====
 
:Sets the current position of this entity (relative to it's bind parent if any)
::''origin'': the new origin
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setOwner'''(entity owner); ====
 
:Sets the owner of this entity. Entities will never collide with their owner.
::''owner'': the entity which will be made owner of this entity
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setPersistantArg'''(string key, string value); ====
 
:Sets a key/value pair that persists between maps
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setPortAISoundLoss'''(float handle, float value); ====
 
:AI sound propagation scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setPortPlayerSoundLoss'''(float handle, float value); ====
 
:Player sound loss scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setPortSoundLoss'''(float handle, float value); ====
 
:Sound propagation scriptfunction on the sys object
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setPrime'''(entity vine); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent void '''setRadius'''(float radius); ====
 
:Sets the size of the bounding box, x=y=z=radius.
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''setRadiusXYZ'''(float x, float y, float z); ====
 
:Sets the width/length/height of the light bounding box.
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''setRelation'''(float team1, float team2, float val); ====
 
:No description
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setReplacementAnim'''(string animToReplace, string replacement); ====
 
:Replaces the animation "animToReplace" with "replacement"
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setShader'''(string shader); ====
 
:Sets the shader to be used for the light.
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''setShaderParm'''(float parm, float value); ====
 
:Sets the value of the specified shader parm.
::''parm'': shader parm index
::''value'': new value
 
:Spawnclasses responding to this event: ''idEntity'', ''idThread''
==== scriptEvent void '''setShaderParms'''(float parm0, float parm1, float parm2, float parm3); ====
 
:Sets shader parms Parm0, Parm1, Parm2, and Parm3 (red, green, blue, and alpha respectively).
::''parm0'': red
::''parm1'': green
::''parm2'': blue
::''parm3'': alpha
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setSize'''(vector min, vector max); ====
 
:Sets the size of this entity's bounding box.
::''min'': minimum corner coordinates
::''max'': maximum corner coordinates
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setSkin'''(string skinName); ====
 
:Sets the skin this entity uses.  Set to "" to turn off the skin.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setSmokeVisibility'''(float particle_num, float on); ====
 
:enables/disables smoke particles on bones.  pass in the particle #, or ALL_PARTICLES for turning on/off all particle systems. particles are spawned in the order they appear in the entityDef
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setSoundLoss'''(float loss); ====
 
:Sets the sound loss value (dB).
 
:Spawnclasses responding to this event: ''idPortalEntity''
==== scriptEvent void '''setSoundVolume'''(float newLevel); ====
 
:Set the volume of the sound to play, must be issued before startSoundShader.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setSpawnArg'''(string key, string value); ====
 
:Sets a key/value pair to be used when a new entity is spawned.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setStartedOff'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent void '''setState'''(string stateFunc); ====
 
:Sets the next state and goes to it immediately
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setSyncedAnimWeight'''(float channel, float animindex, float weight); ====
 
:Sets the blend amount on multi-point anims.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''setTalkState'''(float state); ====
 
:Sets whether the player can talk to this character or not.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setTalkTarget'''(entity target); ====
 
:Sets the entity (player) trying to talk to the character
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setTeam'''(float newTeam); ====
 
:Sets the team number of this entity.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''SetTimerState'''(float stimId, float state); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setTurnHinderance'''(string source, float mCap, float fCap); ====
 
:Set the hinderance on the view turning from a source
::''mCap'': mCap values from all sources are multiplied together to define a cap
::''fCap'': fCap values are not additive, the smallest one among all the sources is used
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setTurnRate'''(float rate); ====
 
:Set the rate the character turns at
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setViewAngles'''(vector angles); ====
 
:Sets the player view angles, e.g. make the player facing this direction. 0 0 0 is east (along the X axis in DR), 0 90 0 north (along the Y axis in DR) 0 180 0 west, 0 270 0 south.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setWatered'''(); ====
 
:Event called using vine.*()
 
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent void '''setWorldOrigin'''(vector origin); ====
 
:Sets the current position of this entity (regardless of any bind parent).
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''shooterFireProjectile'''(); ====
 
:Fires a projectile.
 
:Spawnclasses responding to this event: ''tdmFuncShooter''
==== scriptEvent float '''shooterGetAmmo'''(); ====
 
:Get the ammonition
 
:Spawnclasses responding to this event: ''tdmFuncShooter''
==== scriptEvent float '''shooterGetState'''(); ====
 
:Returns the current state of this shooter.
 
:Spawnclasses responding to this event: ''tdmFuncShooter''
==== scriptEvent void '''shooterSetAmmo'''(float newAmmo); ====
 
:Set the ammonition
 
:Spawnclasses responding to this event: ''tdmFuncShooter''
==== scriptEvent void '''shooterSetState'''(float state); ====
 
:Activates / deactivates the shooter entity.
::''state'': 1 = active, 0 = inactive
 
:Spawnclasses responding to this event: ''tdmFuncShooter''
==== scriptEvent void '''show'''(); ====
 
:Makes this entity visible if it has a model.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''showAttachment'''(string attName, float show); ====
 
:Show or hide an attachment.
::''show'': 1 shows attachment, 0 hides it.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent void '''showAttachmentInd'''(float index, float show); ====
 
:Show or hide an attachment by array index.
::''index'': starts at 0
::''show'': 1 shows attachment, 0 hides it.
 
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent void '''shrivel'''(float time); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''sin'''(float degrees); ====
 
:Returns the sine of the given angle in degrees.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''slideTo'''(vector position, float time); ====
 
:No description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''smoking'''(float state); ====
 
:flame is now smoking (1), or not (0)
::''state'': 1 = smoking, 0 = not smoking
 
:Spawnclasses responding to this event: ''idLight''
==== scriptEvent entity '''spawn'''(string classname); ====
 
:Creates an entity of the specified classname and returns a reference to the entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''SpawnFloat'''(string key, float default); ====
 
:Returns the floating point value for the given spawn argument.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''SpawnString'''(string key, string default); ====
 
:Returns the string for the given spawn argument.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''spawnThrowableProjectile'''(string projectileName, string jointName); ====
 
:This method spawns a projectile of the type named by the caller and attaches it to the joint given by the caller.  The projectile becomes the AI's firable projectile. Returns a pointer to a projectile entity that can be  thrown by the AI. You can use AI_LaunchMissle (e* = launchMissle(v,v) ) to throw the stone.
::''projectileName'': The name of the projectile to spawn (as seen in a .def file) Must be descended from idProjectile
::''jointName'': The name of the joint on the model to which the particle should be attached for throwing. If this is NULL or the empty string, then it is attached to the model center.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent vector '''SpawnVector'''(string key, vector default); ====
 
:Returns the vector for the given spawn argument.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''speed'''(float speed); ====
 
:Sets the movement speed. Set this speed before initiating a new move.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent float '''sqrt'''(float square); ====
 
:Returns the square root of the given number.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''start'''(); ====
 
:Starts a spline or anim camera moving.
 
:Spawnclasses responding to this event: ''idCameraAnim''
==== scriptEvent void '''startFx'''(string fx); ====
 
:Starts an FX on this entity.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''startGamePlayTimer'''(); ====
 
:Resets the game play timer to zero and (re)starts it.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''startMouseGesture'''(float key, float thresh, float test, float inverted, float turnHinderance, float decideTime, float deadTime); ====
 
:Start tracking a mouse gesture that started when the key impulse was pressed. Discretizes analog mouse movement into a few different gesture possibilities. Impulse arg can also be a button, see the UB_* enum in usercmdgen.h. For now, only one mouse gesture check at a time.
::''thresh'': Waits until the threshold mouse input thresh is reached before deciding.
::''test'': determines which test to do (0 = up/down, 1 = left/right, 2 = 4 directions, 3 = 8 directions).
::''inverted'': inverts the movement if set to 1, does not if 0
::''turnHinderance'': Sets the max player view turn rate when checking this mouse gesture (0 => player view locked, 1.0 => no effect on view turning)
::''decideTime'': time in milliseconds after which the mouse gesture is auto-decided, in the event that the mouse movement threshold was not reached. A DecideTime of -1 means wait forever until the button is released.
::''deadTime'': how long after attack is pressed that mouse control remains dampened by the fraction turnHinderance.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''startRagdoll'''(); ====
 
:Switches to a ragdoll taking over the animation.
 
:Spawnclasses responding to this event: ''idAnimated''
==== scriptEvent float '''startSearchForHidingSpots'''(vector hideFromPos, vector minSearchBounds, vector maxSearchBounds, float hidingSpotTypesAllowed, entity ignoreEntity); ====
 
:This event finds hiding spots in the bounds given by two vectors. This method will only start the search, if it returns 1, you should call continueSearchForHidingSpots every frame to do more processing until that function returns 0.  The return value is a 0 for failure, 1 for success.
::''hideFromPos'': a vector which gives the location of the eye from which hiding is desired.
::''minSearchBounds'': a vector giving the minimums in each dimension for the search space
::''maxSearchBounds'': a vector giving the maximums in each dimension for the search space
::''hidingSpotTypesAllowed'': the bit flags of the types of hiding spots  for which the search should look.
::''ignoreEntity'': indicates an entity that should be ignored in the visual occlusion checks.  This is usually the searcher itself but can be the $null_entity.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''startSearchForHidingSpotsWithExclusionArea'''(vector hideFromLocation, vector minBounds, vector maxBounds, vector exclusionMinBounds, vector exclusionMaxBounds, float hidingSpotTypesAllowed, entity ignoreEntity); ====
 
:This method finds hiding spots in the bounds given by two vectors, and also excludes any points contained within a different pair of vectors.  This method will only start the search, if it returns 1, you should call continueSearchForHidingSpots every frame to do more processing until that function returns 0.  The return value is a 0 for failure, 1 for success.
::''hideFromLocation'': a vector which gives the location of the eye from which hiding is desired.
::''minBounds'': the minimums in each dimension for the search space.
::''maxBounds'': the maximums in each dimension for the search space.
::''exclusionMinBounds'': give the min bounds of an area where spots should NOT be tested. This overrides the third and fourth parameters where they overlap (producing a dead zone where points are not tested)
::''exclusionMaxBounds'': give the max bounds of an area where spots should NOT be tested
::''hidingSpotTypesAllowed'': the bit flags of the types of hiding spots for which the search should look.
::''ignoreEntity'': indicates an entity that should be ignored in the visual occlusion checks.  This is usually the searcher itself but can be $null_entity.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''startSound'''(string sound, float channel, float netSync); ====
 
:Plays the sound specified by the snd_* key/value pair on the channel and returns the length of the sound in seconds. This is the preferred method for playing sounds on an entity since it ensures that the sound is precached.
::''sound'': the spawnarg to reference, e.g. 'snd_move'
::''channel'': the channel to play on
::''netSync'': -
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''startSoundShader'''(string shaderName, float channel); ====
 
:Plays a specific sound shader on the channel and returns the length of the sound in seconds. This is not the preferred method of playing a sound since you must ensure that the sound is loaded.
::''shaderName'': the sound shader to play
::''channel'': the channel to play the sound on
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''startSpline'''(entity spline); ====
 
:Starts moving along a spline stored on the given entity.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''StartTimer'''(float stimId); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''startZoom'''(float duration, float startFOV, float endFOV); ====
 
:Call this to start the zoom in event. The player FOV is gradually zoomed in until over the given timespan.
::''duration'': duration of the transition in msec
::''startFOV'': The start FOV, this is clamped to [1..179]
::''endFOV'': The end FOV, this is clamped to [1..179]
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''StimAdd'''(float type, float radius); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''StimClearIgnoreList'''(float type); ====
 
:This clears the ignore list for the stim of the given type It can be used if an entity changes state in some way that it would no longer be ignored
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''StimEnable'''(float type, float state); ====
 
:No description
::''state'': 0 = disabled, 1 = enabled
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''StimRemove'''(float type); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''stop'''(); ====
 
:Stops a spline or anim camera moving.
 
:Spawnclasses responding to this event: ''idCameraAnim''
==== scriptEvent void '''stopAnim'''(float channel, float frames); ====
 
:Stops the animation currently playing on the given channel over the given number of frames.
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''stopFxFov'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''stopMouseGesture'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''stopMove'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''stopMoving'''(); ====
 
:Stops any translational movement.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''stopRagdoll'''(); ====
 
:turns off the ragdoll
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''stopRotating'''(); ====
 
:Stops any rotational movement.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''stopSound'''(float channel, float netSync); ====
 
:Stops a specific sound shader on the channel.
::''channel'': the channel to stop playback on
::''netSync'': -
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''stopSpline'''(); ====
 
:Stops moving along a spline.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''stopThinking'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''StopTimer'''(float stimId); ====
 
:No description
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent string '''strLeft'''(string text, float num); ====
 
:Returns a string composed of the first num characters
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''strLength'''(string text); ====
 
:Returns the number of characters in the string
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''strMid'''(string text, float start, float num); ====
 
:Returns a string composed of the characters from start to start + num
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''strRight'''(string text, float num); ====
 
:Returns a string composed of the last num characters
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''strSkip'''(string text, float num); ====
 
:Returns the string following the first num characters
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''strToFloat'''(string text); ====
 
:Returns the numeric value of the given string.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''strToInt'''(string text); ====
 
:Returns the integer value of the given string.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''sway'''(float speed, float phase, vector angles); ====
 
:Initiates a rotation back and forth along the given angles with the given speed and phase.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''Switch'''(float newState); ====
 
:Move the lever to the on or off position (0 = off).
 
:Spawnclasses responding to this event: ''CFrobLever''
==== scriptEvent void '''switchState'''(string stateName); ====
 
:Switches to the state with the given name, current one is ended.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''syncAnimChannels'''(float fromChannel, float toChannel, float blendFrames); ====
 
:Synchronises the channels
 
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''Tap'''(); ====
 
:Operates this handle.
 
:Spawnclasses responding to this event: ''CFrobHandle''
==== scriptEvent void '''TDM_Lock_OnLockPicked'''(); ====
 
:internal
 
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock'', ''idProjectile''
==== scriptEvent void '''TDM_Lock_StatusUpdate'''(); ====
 
:internal
 
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock''
==== scriptEvent void '''teleportTo'''(entity other); ====
 
:Teleports the entity to the position of the other entity, plus a possible offset and random offset (defined on the spawnargs of the entity to be teleported)
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''terminate'''(float threadNumber); ====
 
:Terminates a thread.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''testAnimAttack'''(string animname); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''testAnimMove'''(string animname); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''testAnimMoveTowardEnemy'''(string animname); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''testChargeAttack'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''testMeleeAttack'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''testMoveToPosition'''(vector position); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''threadname'''(string name); ====
 
:Sets the name of the current thread.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''throwAF'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''throwMoveable'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''time'''(float time); ====
 
:Sets the movement time. Set this time before initiating a new move.
 
:Spawnclasses responding to this event: ''idMover''
==== scriptEvent void '''Toggle'''(); ====
 
:Turns the forcefield on and off.
 
:Spawnclasses responding to this event: ''idForceField''
==== scriptEvent void '''ToggleLock'''(); ====
 
:Toggles the lock state. Unlocked movers will be locked and vice versa. The notes above concerning Unlock() still apply if this call unlocks the mover.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent void '''ToggleOpen'''(); ====
 
:Toggles the mover state. Closes when fully open, opens when fully closed. If the mover is "interrupted" (e.g. when the player frobbed the mover in between), the move direction depends on the state of the internal "intent_open" flag.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''totalAmmoCount'''(); ====
 
:Amount of ammo in inventory. since each shot may use more than 1 ammo, this is different than ammoAvailable()
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''touches'''(entity other); ====
 
:Returns true if this entity touches the other entity.
::''other'': the entity to check against
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''trace'''(vector start, vector end, vector mins, vector maxs, float contents_mask, entity passEntity); ====
 
:Returns the fraction of movement completed before the box from 'mins' to 'maxs' hits solid geometry when moving from 'start' to 'end'. The 'passEntity' is considered non-solid during the move.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''tracePoint'''(vector start, vector end, float contents_mask, entity passEntity); ====
 
:Returns the fraction of movement completed before the trace hits solid geometry when moving from 'start' to 'end'. The 'passEntity' is considered non-solid during the move.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''translate'''(string input); ====
 
:Translates a string (like #str_12345) into the current language
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''travelDistanceBetweenEntities'''(entity source, entity dest); ====
 
:Approximate travel distance between two entities.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''travelDistanceBetweenPoints'''(vector source, vector dest); ====
 
:Approximate travel distance between two points.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''travelDistanceToEntity'''(entity destination); ====
 
:Approximate travel distance to entity.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''travelDistanceToPoint'''(vector destination); ====
 
:Approximate travel distance to point.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''trigger'''(entity entityToTrigger); ====
 
:Triggers the given entity.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''triggerMissionEnd'''(); ====
 
:No description
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''triggerParticles'''(string jointName); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''turnTo'''(float yaw); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''turnToEntity'''(entity ent); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''turnToPos'''(vector pos); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''unbind'''(); ====
 
:Detaches this entity from its master.
 
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''Unlock'''(); ====
 
:Unlocks the mover. Calls to Open() will succeed after this call. Depending on the value of the spawnarg "open_on_unlock" the mover might automatically open after this call.
 
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent void '''unpauseGame'''(); ====
 
:Unpauses the game. Most scripts are not executed during g_stopTime == true and won't get into the position of calling this.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''useAmmo'''(float amount); ====
 
:Eats the specified amount of ammo
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''vecLength'''(vector vec); ====
 
:Returns the length of the given vector.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''vecNormalize'''(vector vec); ====
 
:Returns the normalized version of the given vector.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''VecToAngles'''(vector vec); ====
 
:Returns Euler angles for the given direction.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''visScan'''(); ====
 
:Checks for enemies or player in the AI's FOV, using light level and distance. For now the check is only done on the player.  Returns a reference to the sighted actor.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''wait'''(float time); ====
 
:Suspends execution of the current thread for the given number of seconds.
 
:Spawnclasses responding to this event: ''idEntity'', ''idThread''
==== scriptEvent void '''waitAction'''(string name); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''waitFor'''(entity mover); ====
 
:Waits for the given entity to complete its move.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''waitForRender'''(entity e); ====
 
:Suspends the current thread until 'e' might have been rendered. It's event based, so it doesn't waste CPU repeatedly checking inPVS(). e.inPVS() will very likely be true when the thread resumes. If e.inPVS() is true, calling waitForRender() will probably just wait a frame, unless D3 can figure out that the entity doesn't need to be rendered. Optimizations regarding shadowcasting lights may not apply to this function - it is based purely off whether or not the entity's bounding box is visible.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''waitForThread'''(float threadNumber); ====
 
:Waits for the given thread to terminate.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''waitFrame'''(); ====
 
:Suspends execution of current thread for one game frame.
 
:Spawnclasses responding to this event: ''idEntity'', ''idThread''
==== scriptEvent void '''waitMove'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''wakeOnFlashlight'''(float enable); ====
 
:Tells the monster to activate when flashlight shines on them.
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''wander'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''warning'''(string text); ====
 
:Issues a warning.
 
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''wasDamaged'''(); ====
 
:Check if the player was damaged this frame.
 
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''weaponHolstered'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponLowering'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponOutOfAmmo'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponReady'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponReloading'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponRising'''(); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent void '''weaponState'''(string stateFunction, float blendFrames); ====
 
:no description
 
:Spawnclasses responding to this event: ''idWeapon''
 
== Events by Spawnclass / Entity Type ==
=== idActor ===
==== scriptEvent float '''animDistance'''(float channel, string animName); ====
 
:Returns the distance that the anim travels. If the entity has multiple anims with animName, the distance may not match the anim that is played. Use chooseAnim to get a non-random anim and pass that string into animDistance.
 
==== scriptEvent float '''animDone'''(float channel, float blendOutFrames); ====
 
:Returns true if the animation playing on the given channel is completed considering a number of blend frames.
 
==== scriptEvent float '''animIsPaused'''(float channel); ====
 
:Return whether the given anim channel is paused
 
==== scriptEvent float '''animLength'''(float channel, string animName); ====
 
:Returns the length of the anim in seconds. If the entity has multiple anims with animName, length may not match the anim that is played. Use chooseAnim to get a non-random anim and pass that string into animLength.
 
==== scriptEvent void '''animState'''(float channel, string stateFunction, float blendFrame); ====
 
:Sets a new animation state script function for the given channel.
 
==== scriptEvent void '''attach'''(entity ent, string attName); ====
 
:Attach an entity to the AI. Entity spawnArgs checked for attachments are:  - "origin", "angles", and "joint". These must be set prior to calling attach.
::''attName'': the desired name of the attachment, e.g., 'melee_weapon'
 
==== scriptEvent void '''attachToPos'''(entity ent, string position, string attName); ====
 
:Attach an entity to the AI, using a named attachment position
::''attName'': the desired name of the attachment, e.g., 'melee_weapon'
 
==== scriptEvent void '''checkAnim'''(float channel, string animName); ====
 
:Ensures that the animation exists and causes an error if it doesn't.
 
==== scriptEvent string '''chooseAnim'''(float channel, string animName); ====
 
:Chooses a random anim and returns the name. Useful for doing move tests on anims.
 
==== scriptEvent entity '''closestEnemyToPoint'''(vector point); ====
 
:Returns the enemy closest to the given location.
 
==== scriptEvent void '''disableAnimchannel'''(float channel); ====
 
:Used to disable a certain animchannel (for example if the ai is dead)
 
==== scriptEvent void '''disableEyeFocus'''(); ====
 
:Disables eye focus.
 
==== scriptEvent void '''DisableLegIK'''(float num); ====
 
:disables leg IK
 
==== scriptEvent void '''disablePain'''(); ====
 
:Disables pain animations.
 
==== scriptEvent void '''DisableWalkIK'''(); ====
 
:disables walk IK
 
==== scriptEvent void '''dropAttachment'''(string attName); ====
 
:Drop the attachment for the given attachment name.
 
==== scriptEvent void '''dropAttachmentInd'''(float index); ====
 
:Drop the attachment for the given index.
::''index'': starts at 0
 
==== scriptEvent void '''enableAnim'''(float channel, float blendFrames); ====
 
:Enables animation on the given channel.
 
==== scriptEvent void '''enableEyeFocus'''(); ====
 
:Enables eye focus.
 
==== scriptEvent void '''EnableLegIK'''(float num); ====
 
:enables leg IK
 
==== scriptEvent void '''enablePain'''(); ====
 
:Enables pain animations.
 
==== scriptEvent void '''EnableWalkIK'''(); ====
 
:enables walk IK
 
==== scriptEvent void '''finishAction'''(string action); ====
 
:Finishes the given wait action.
 
==== scriptEvent void '''finishChannelAction'''(float channel, string animname); ====
 
:Overloaded finishAction function for setting the waitstate on each channel separately
 
==== scriptEvent void '''footstep'''(); ====
 
:Plays footstep sound.
 
==== scriptEvent string '''getAnimState'''(float channel); ====
 
:Returns the name of the current animation state script function used for the given channel.
 
==== scriptEvent entity '''getAttachment'''(string attName); ====
 
:Get the attached entity with the given attachment name Will be NULL if the name is invalid or if the entity no longer exists
 
==== scriptEvent entity '''getAttachmentInd'''(float index); ====
 
:Get the attached entity at the given index. Will be NULL if the index is invalid or the entity no longer exists
::''index'': starts at 0
 
==== scriptEvent float '''getAttackFlag'''(float combatType); ====
 
:Returns 1 if the given attack flag is activated.
::''combatType'': see tdm_defs.script for possible enum values
 
==== scriptEvent float '''getBlendFrames'''(float channel); ====
 
:Returns the number of frames to blend between animations on the given channel.
 
==== scriptEvent vector '''getEyePos'''(); ====
 
:Get eye position of the player and the AI
 
==== scriptEvent entity '''getHead'''(); ====
 
:Returns the entity used for the character's head, if it has one.
 
==== scriptEvent float '''getHealth'''(); ====
 
:Returns the current health.
 
==== scriptEvent float '''getMeleeActPhase'''(); ====
 
:Returns the current melee action phase (holding,recovering,etc).
 
==== scriptEvent float '''getMeleeActState'''(); ====
 
:Returns the current melee action state (attacking/defending).
 
==== scriptEvent float '''getMeleeActType'''(); ====
 
:Returns the current melee action type (overhead,thrust,etc.).
 
==== scriptEvent float '''getMeleeLastActTime'''(); ====
 
:Returns the melee type of the last attack to hit this actor. Defaults to MELEETYPE_UNBLOCKABLE if we were not hit before.
 
==== scriptEvent float '''getMeleeLastHitByType'''(); ====
 
:Returns the game time that the most recent melee action ended (in ms)
 
==== scriptEvent float '''getMeleeResult'''(); ====
 
:Get the result of the last melee action Follows MELEERESULT_* enum defined in tdm_defs.script
 
==== scriptEvent float '''getNumAttachments'''(); ====
 
:Return the number of attachments on an AI. Used to iterate through the attachments if desired.
 
==== scriptEvent float '''getNumMeleeWeapons'''(); ====
 
:Returns the number of melee weapons attached to an actor. This refers to the TDM-style attachments with the spawnarg 'is_weapon_melee' set to '1'.
 
==== scriptEvent float '''getNumRangedWeapons'''(); ====
 
:Returns the number of ranged weapons attached to an actor. This refers to the TDM-style attachments with the spawnarg 'is_weapon_ranged' set to '1'.
 
==== scriptEvent string '''getPainAnim'''(); ====
 
:Returns the name of the pain animation.
 
==== scriptEvent string '''getState'''(); ====
 
:Gets the current state.
 
==== scriptEvent float '''hasAnim'''(float channel, string animName); ====
 
:Returns true when an entity has a specific animation.
 
==== scriptEvent float '''hasEnemies'''(); ====
 
:Returns true if the actor has one or more enemies.
 
==== scriptEvent float '''idleAnim'''(float channel, string animName); ====
 
:Plays the given idle animation on the given channel.  Returns false if anim doesn't exist.
 
==== scriptEvent float '''inAnimState'''(float channel, string stateFunc); ====
 
:Returns true if the given animation state script function is currently used for the given channel.
 
==== scriptEvent void '''leftFoot'''(); ====
 
:Changes to left foot and plays footstep sound.
 
==== scriptEvent string '''lookupReplacementAnim'''(string anim); ====
 
:Returns the current replacement animation for "anim". Returns empty if no replacement anim
 
==== scriptEvent void '''meleeActionFinished'''(); ====
 
:Called when the animation for the melee action has finished.
 
==== scriptEvent void '''meleeActionHeld'''(); ====
 
:Called when the melee action reaches the "hold" point.
 
==== scriptEvent void '''meleeActionReleased'''(); ====
 
:Called when the melee action is released from the hold point.
 
==== scriptEvent void '''meleeAttackStarted'''(float attType); ====
 
:Registers the start of a given melee attack Intended to be called from a script that also starts the animation
 
==== scriptEvent float '''meleeBestParry'''(); ====
 
:Returns the melee type integer of the best parry given the enemy attacks at the time If no attacking enemy is found, returns default of MELEETYPE_RL Follows MELEETYPE_* enum defined in tdm_defs.script
 
==== scriptEvent string '''meleeNameForNum'''(float num); ====
 
:Converts a melee type integer to a string name suffix Used for finding the right animation for a given type, etc. Possible names are, in order: "Over, LR, RL, Thrust, General" Where general blocks all attacks types except unblockable
 
==== scriptEvent void '''meleeParryStarted'''(float parType); ====
 
:Registers the start of a given melee parry Intended to be called from a script that also starts the animation
 
==== scriptEvent entity '''nextEnemy'''(entity lastEnemy); ====
 
:Returns the next enemy the actor has acquired.
 
==== scriptEvent void '''overrideAnim'''(float channel); ====
 
:Disables the animation currently playing on the given channel and syncs the animation with the animation of the nearest animating channel.
 
==== scriptEvent void '''pauseAnim'''(float channel, float bPause); ====
 
:Pause all animations playing on the given channel. NOTE: Can also be used used by idWeapons
::''bPause'': true = pause, false = unpause
 
==== scriptEvent float '''playAnim'''(float channel, string animName); ====
 
:Plays the given animation on the given channel.  Returns false if anim doesn't exist.
 
==== scriptEvent float '''playCycle'''(float channel, string animName); ====
 
:Continuously repeats the given animation on the given channel.  Returns false if anim doesn't exist.
 
==== scriptEvent void '''preventPain'''(float duration); ====
 
:Prevents any pain animation from being played for the given time in seconds.
::''duration'': time in seconds
 
==== scriptEvent void '''reAttachToCoords'''(string attName, string joint, vector offset, vector angles); ====
 
:Reattach an existing attachment
::''attName'': the name of the attachment we want to reattach.
::''joint'': the name of the joint to attach to
::''offset'': the translation offset from joint
::''angles'': a (pitch, yaw, roll) angle vector that defines the rotation  of the attachment relative to the joint's orientation
 
==== scriptEvent void '''reAttachToPos'''(string attName, string position); ====
 
:Reattach an existing attachment to a named attachment position. Example: reAttachToPos( melee_weapon, right_hand_held )
::''attName'': the name of the attachment we want to reattach.
::''position'': the new position we want to attach it to.
 
==== scriptEvent void '''reloadTorchReplacementAnims'''(); ====
 
:If actor has a torch, reload the torch's replacement anims.
 
==== scriptEvent void '''removeReplacementAnim'''(string anim); ====
 
:Removes the replacement for the given "anim"
 
==== scriptEvent void '''rightFoot'''(); ====
 
:Changes to right foot and plays footstep sound.
 
==== scriptEvent void '''setAnimPrefix'''(string prefix); ====
 
:Sets a string which is placed in front of any animation names.
 
==== scriptEvent void '''setAttackFlag'''(float combatType, float enabled); ====
 
:Activate or deactivate the given attack flag
::''combatType'': see tdm_defs.script for possible enum values
 
==== scriptEvent void '''setBlendFrames'''(float channel, float blendFrame); ====
 
:Sets the number of frames to blend between animations on the given channel.
 
==== scriptEvent void '''setHealth'''(float health); ====
 
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
 
==== scriptEvent void '''setNextState'''(string stateFunc); ====
 
:Sets the next state and waits until thread exits, or a frame delay before calling it. Handy for setting the state in the constructor.
 
==== scriptEvent void '''setReplacementAnim'''(string animToReplace, string replacement); ====
 
:Replaces the animation "animToReplace" with "replacement"
 
==== scriptEvent void '''setState'''(string stateFunc); ====
 
:Sets the next state and goes to it immediately
 
==== scriptEvent void '''setSyncedAnimWeight'''(float channel, float animindex, float weight); ====
 
:Sets the blend amount on multi-point anims.
 
==== scriptEvent void '''showAttachment'''(string attName, float show); ====
 
:Show or hide an attachment.
::''show'': 1 shows attachment, 0 hides it.
 
==== scriptEvent void '''showAttachmentInd'''(float index, float show); ====
 
:Show or hide an attachment by array index.
::''index'': starts at 0
::''show'': 1 shows attachment, 0 hides it.
 
==== scriptEvent void '''stopAnim'''(float channel, float frames); ====
 
:Stops the animation currently playing on the given channel over the given number of frames.
 
==== scriptEvent void '''syncAnimChannels'''(float fromChannel, float toChannel, float blendFrames); ====
 
:Synchronises the channels
 
=== idAFEntity_Base ===
==== scriptEvent vector '''getAngularVelocityB'''(float id); ====
 
:Get the angular velocitiy of a particular body Returns (0,0,0) if the body ID is invalid.
 
==== scriptEvent vector '''getLinearVelocityB'''(float id); ====
 
:Get the linear velocitiy of a particular body Returns (0,0,0) if the body ID is invalid.
 
==== scriptEvent float '''getNumBodies'''(); ====
 
:Returns the number of bodies in the AF. If the AF physics pointer is NULL, it returns 0.
 
==== scriptEvent void '''restoreAddedEnts'''(); ====
 
:No description
 
==== scriptEvent void '''setAngularVelocityB'''(vector velocity, float id); ====
 
:Set the angular velocity of a particular body
 
==== scriptEvent void '''SetConstraintPosition'''(string constraintName, vector position); ====
 
:Moves the constraint with the given name that binds this entity to another entity.
 
==== scriptEvent void '''setLinearVelocityB'''(vector velocity, float id); ====
 
:Set the linear velocity of a particular body
 
=== idAFEntity_Gibbable ===
==== scriptEvent void '''gib'''(string damageDefName); ====
 
:No description
 
=== idAFEntity_Generic ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idAFEntity_WithAttachedHead ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CAIVehicle ===
==== scriptEvent void '''clearController'''(); ====
 
:Need separate clearController because scripting doesn't like passing in $null_entity? (greebo: one could remove this function and set the argument type of setController to 'E'.
 
==== scriptEvent void '''frobRidable'''(entity playerController); ====
 
:Called when a player directly mounts or dismounts a ridable AI.
 
==== scriptEvent string '''getMoveAnim'''(); ====
 
:Returns the name of the player-requested movement anim for a player controlled AI vehicle
 
==== scriptEvent void '''setController'''(entity playerController); ====
 
:Let a player assume movement control of an AI vehicle (may be remote control as in a player on a coach pulled by a horse)
 
=== idCombatNode ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''markUsed'''(); ====
 
:Disables the combat node if "use_once" is set on the entity.
 
=== idAI ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''alert'''(string type, float val); ====
 
:ai generalized alerts
 
==== scriptEvent void '''alertAI'''(string type, float amount, entity actor); ====
 
:internal
::''type'': alert type
::''amount'': alert amount
::''actor'': actor causing alert
 
==== scriptEvent void '''allowDamage'''(); ====
 
:The AI can take damage again.
 
==== scriptEvent void '''allowHiddenMovement'''(float enable); ====
 
:Normally, when hidden, monsters do not run physics. This enables physics when hidden.
 
==== scriptEvent void '''allowMovement'''(float allow); ====
 
:No description
 
==== scriptEvent void '''animTurn'''(float angle); ====
 
:Enable/disable animation controlled turning.
::''angle'': Pass in the maximum # of degrees the animation turns. Use an amount of 0 to disable.
 
==== scriptEvent void '''attackBegin'''(string damageDef); ====
 
:no description
 
==== scriptEvent void '''attackEnd'''(); ====
 
:no description
 
==== scriptEvent float '''attackMelee'''(string damageDef); ====
 
:Returns true if the attack hit
 
==== scriptEvent entity '''attackMissile'''(string jointName); ====
 
:returns projectile fired
 
==== scriptEvent void '''bark'''(string sound); ====
 
:Let the AI bark a certain sound.
::''sound'': sound name, e.g. 'snd_warn_response'
 
==== scriptEvent void '''becomeNonSolid'''(); ====
 
:Makes the moveable non-solid for other entities.
 
==== scriptEvent float '''becomeRagdoll'''(); ====
 
:enables the ragdoll if the entity has one
 
==== scriptEvent void '''becomeSolid'''(); ====
 
:no description
 
==== scriptEvent void '''burn'''(); ====
 
:no description
 
==== scriptEvent float '''canBecomeSolid'''(); ====
 
:no description
 
==== scriptEvent float '''canHitEnemy'''(); ====
 
:no description
 
==== scriptEvent float '''canHitEnemyFromAnim'''(string anim); ====
 
:no description
 
==== scriptEvent float '''canHitEnemyFromJoint'''(string jointname); ====
 
:no description
 
==== scriptEvent float '''canReachEnemy'''(); ====
 
:Returns true if character can walk to enemy's position. For walking monsters, enemy should be near the floor.
 
==== scriptEvent float '''canReachEntity'''(entity ent); ====
 
:Returns true if character can walk to entity's position. For walking monsters, entity should be near the floor.
 
==== scriptEvent float '''canReachPosition'''(vector pos); ====
 
:Returns true if character can walk to specified position. For walking monsters, position should be near the floor.
 
==== scriptEvent float '''canSee'''(entity ent); ====
 
:no description
 
==== scriptEvent float '''canSeeExt'''(entity ent, float b_useFOV, float b_useLighting); ====
 
:This is an alternate version of canSee that can optionally choose to use field of vision and lighting calculations.
::''b_useFOV'': If 0 the entity will be visible even if the AI's back is turned to it
::''b_useLighting'': If b_useLighting is 0 the entity will be visible in complete darkness. If it is 1, the entity will only be visible if there is light shining on it, but the slightest light is enought. Use "isEntityHidden" as a script event with a threshold instead.
 
==== scriptEvent float '''canSeePositionExt'''(vector position, float b_useFOV, float b_useLighting); ====
 
:This is an alternate version of canSeeExt that tests a location rather than an entity. Note that any actor at the position may make it not seeable from a distance.
::''b_useFOV'': If 0 the entity will be visible even if the AI's back is turned to it
::''b_useLighting'': If 0 the entity will be visible in complete darkness
 
==== scriptEvent void '''chargeAttack'''(string damageDef); ====
 
:no description
 
==== scriptEvent void '''clearBurn'''(); ====
 
:no description
 
==== scriptEvent void '''clearEnemy'''(); ====
 
:Clears the enemy entity
 
==== scriptEvent void '''clearFlyOffset'''(); ====
 
:Sets the preferred height relative to the player's view height to fly at to the value set in the def file.
 
==== scriptEvent void '''closeHidingSpotSearch'''(); ====
 
:This should be called when the script is done with the hiding spot search to free up memory.
 
==== scriptEvent entity '''closestReachableEnemy'''(); ====
 
:Used for determining tactile alert targets
 
==== scriptEvent entity '''closestReachableEnemyOfEntity'''(entity team_mate); ====
 
:Finds another character's closest reachable enemy
 
==== scriptEvent float '''continueSearchForHidingSpots'''(); ====
 
:This method continues searching for hiding spots. It will only find so many before returning so as not to cause long delays.  Detected spots are added to the currently building hiding spot list.  The return value is 0 if the end of the search was reached, or 1 if there is more processing to do (call this method again next AI frame)
 
==== scriptEvent entity '''createMissile'''(string jointname); ====
 
:returns projectile created
 
==== scriptEvent entity '''createMissileFromDef'''(string defName, string jointName); ====
 
:No description
 
==== scriptEvent void '''directDamage'''(entity damageTarget, string damageDef); ====
 
:no description
 
==== scriptEvent void '''disableAFPush'''(); ====
 
:no description
 
==== scriptEvent void '''disableClip'''(); ====
 
:no description
 
==== scriptEvent void '''disableGravity'''(); ====
 
:no description
 
==== scriptEvent void '''dropTorch'''(); ====
 
:no description
 
==== scriptEvent void '''emptyHand'''(string hand); ====
 
:no description
 
==== scriptEvent void '''enableAFPush'''(); ====
 
:no description
 
==== scriptEvent void '''enableClip'''(); ====
 
:no description
 
==== scriptEvent void '''enableGravity'''(); ====
 
:no description
 
==== scriptEvent float '''endState'''(); ====
 
:Ends the current state with the given name, returns TRUE if more than one state is remaining.
 
==== scriptEvent float '''enemyInCombatCone'''(entity combatNode, float use_current_enemy_location); ====
 
:no description
 
==== scriptEvent float '''enemyPositionValid'''(); ====
 
:no description
 
==== scriptEvent float '''enemyRange'''(); ====
 
:no description
 
==== scriptEvent float '''enemyRange2D'''(); ====
 
:no description
 
==== scriptEvent float '''entityInAttackCone'''(entity ent); ====
 
:no description
 
==== scriptEvent void '''faceEnemy'''(); ====
 
:No description
 
==== scriptEvent void '''faceEntity'''(entity ent); ====
 
:No description
 
==== scriptEvent float '''facingIdeal'''(); ====
 
:No description
 
==== scriptEvent entity '''findActorsInBounds'''(vector mins, vector maxs); ====
 
:Returns an entity within the bounds specified
 
==== scriptEvent entity '''findEnemy'''(float onlyInFov); ====
 
:Finds enemy player in PVS
 
==== scriptEvent entity '''findEnemyAI'''(float onlyInFov); ====
 
:Finds enemy monster in PVS
 
==== scriptEvent entity '''findEnemyInCombatNodes'''(); ====
 
:Finds enemy player in attack cones
 
==== scriptEvent entity '''findFriendlyAI'''(float team); ====
 
:Use this to find a visible AI friendly to ourselves. It basically iterates over all active entities in the map and looks for friendly actors. The pythagorean distance is taken to evaluate the distance.  Don't call this every frame, this might get expensive in larger maps. Returns the nearest visible actor entity or the $null_entity, if none was found.
::''team'': used to constrain the search to a given team. Set this to -1 to let the code ignore this argument
 
==== scriptEvent entity '''fireMissileAtTarget'''(string jointname, string targetname); ====
 
:Launches a missile at entity specified by 'attack_target'.  returns projectile fired
 
==== scriptEvent float '''flee'''(entity entToFleeFrom, float algorithm, float distanceOption); ====
 
:Flee from the given entity. Pass the escape point lookup algorithm (e.g. EP_FIND_GUARDED) and the distanceOption (e.g. EP_DIST_NEAREST) to specify how the best escape point can be found. Refer to the tdm_defs.script file to see all the constants.  When algorithm is set to EP_FIND_AAS_AREA_FAR_FROM_THREAT, the distanceOption is interpreted as minimum threat distance. Returns FALSE if no escape point could be found.
 
==== scriptEvent void '''foundBody'''(entity body); ====
 
:Objective callback for when an AI finds a body.
 
==== scriptEvent void '''Gas_Knockout'''(entity inflictor); ====
 
:AI knockout
::''inflictor'': the entity causing the knockout, can be the $null_entity
 
==== scriptEvent float '''getAcuity'''(string type); ====
 
:ai generalized alerts
 
==== scriptEvent entity '''getAlertActor'''(); ====
 
:Get the actor that alerted the AI in this frame.
 
==== scriptEvent float '''getAlertLevelOfOtherAI'''(entity otherEntity); ====
 
:This event gets the alert number of another AI (AI_AlertLevel variable value) Returns the alert number of the other AI, 0.0 if its not an AI or is NULL
::''otherEntity'': the other AI entity who's alert number is being queried
 
==== scriptEvent entity '''getAttacker'''(); ====
 
:Returns the attacking entity
 
==== scriptEvent float '''getAudThresh'''(); ====
 
:no description
 
==== scriptEvent entity '''getClosestHiddenTarget'''(string entity_type); ====
 
:Finds the closest targeted entity of the specified type.
 
==== scriptEvent entity '''getCombatNode'''(); ====
 
:No description
 
==== scriptEvent float '''getCurrentYaw'''(); ====
 
:no description
 
==== scriptEvent entity '''getEnemy'''(); ====
 
:no description
 
==== scriptEvent vector '''getEnemyEyePos'''(); ====
 
:no description
 
==== scriptEvent vector '''getEnemyPos'''(); ====
 
:no description
 
==== scriptEvent vector '''getJumpVelocity'''(vector pos, float speed, float max_jump_height); ====
 
:no description
 
==== scriptEvent float '''getMoveType'''(); ====
 
:Returns the current movetype
 
==== scriptEvent string '''getNextIdleAnim'''(); ====
 
:This returns the name of the next idle anim to be played on this AI (used by AnimState scripts).
 
==== scriptEvent vector '''getNthHidingSpotLocation'''(float hidingSpotIndex); ====
 
:This event returns the Nth hiding spot location.
::''hidingSpotIndex'': 0 based hiding spot index
 
==== scriptEvent float '''getNthHidingSpotType'''(float hidingSpotIndex); ====
 
:This event returns the Nth hiding spot type.
::''hidingSpotIndex'': 0 based hiding spot index
 
==== scriptEvent float '''getNumHidingSpots'''(); ====
 
:This event returns the number of hiding spots by the current hiding spot query. If there is no current query, this returns -1
 
==== scriptEvent vector '''getObservationPosition'''(vector targetPoint, float visualAcuityZeroToOne); ====
 
:This event is used to get a position that the AI can move to observe a  given position.  It is useful for looking at hiding spots that can't be reached, and performing other investigation functions.  Returns a world position from which the observation can take place. Returns the current AI origin if no such point is found.  @sideEffect This uses the AI_DEST_UNREACHABLE flag variable  to indicate if a point was found. It will be true if none was found, false if one was found.
::''targetPoint'': the world position to be observed
::''visualAcuityZeroToOne'': the visual acuity of the AI on a scale of 0.0 to 1.0 where 0.0 is blind and 1.0 is perfect vision.
 
==== scriptEvent entity '''getObstacle'''(); ====
 
:Gets the obstacle in the character's path
 
==== scriptEvent entity '''getRandomTarget'''(string entity_type); ====
 
:Finds a random targeted entity of the specified type.
 
==== scriptEvent vector '''getReachableEntityPosition'''(entity ent); ====
 
:Returns the position of the entity within the AAS if possible, otherwise just the entity position.
 
==== scriptEvent float '''getRelationEnt'''(entity ent); ====
 
:no description
 
==== scriptEvent vector '''getSndDir'''(); ====
 
:ai hearing of sound
 
==== scriptEvent float '''getSomeOfOtherEntitiesHidingSpotList'''(entity otherEntity); ====
 
:This event splits off half of the hiding spot list of another entity and sets our hiding spot list to the "taken" points.  As such, it is useful for getting hiding spots from a seraching AI that this AI is trying to assist.  Returns the number of points in the list gotten.
::''otherEntity'': The other entity who's hiding spots we are taking
 
==== scriptEvent entity '''getTactEnt'''(); ====
 
:ai sense of touch
 
==== scriptEvent entity '''getTalkTarget'''(); ====
 
:Returns the entity (player) trying to talk to the character
 
==== scriptEvent float '''getTurnDelta'''(); ====
 
:no description
 
==== scriptEvent float '''getTurnRate'''(); ====
 
:Gets the rate the character turns.
 
==== scriptEvent vector '''getVisDir'''(); ====
 
:Returns position of the last visual alert.
 
==== scriptEvent float '''hasSeenEvidence'''(); ====
 
:This returns 1 when the AI has seen evidence of intruders before (an enemy, a body...)
 
==== scriptEvent void '''ignoreDamage'''(); ====
 
:The AI can no longer take damage.
 
==== scriptEvent float '''isEntityHidden'''(entity ent, float f_sightThreshold); ====
 
:This is an alternate version of canSee, using FOV, distance and lighting.
::''f_sightThreshold'': goes from 0.0 (entity visible in complete darkness) to 1.0 (entity only visible if completely lit up).
 
==== scriptEvent float '''isPlayerResponsibleForDeath'''(); ====
 
:Returns true if the player was responsible for the AI's caller's death.
 
==== scriptEvent void '''kickObstacles'''(entity kickEnt, float force); ====
 
:Kicks any obstacle in the character's path.
::''kickEnt'': pass in $null_entity if you don't have a specific entity to kick
 
==== scriptEvent void '''kill'''(); ====
 
:Kills the monster.
 
==== scriptEvent void '''KO_Knockout'''(entity inflictor); ====
 
:AI knockout
::''inflictor'': is the entity causing the knockout, can be the $null_entity
 
==== scriptEvent entity '''launchMissile'''(vector origin, vector angles); ====
 
:Returns the projectile entity
 
==== scriptEvent void '''locateEnemy'''(); ====
 
:Updates the last known position of the enemy independent from whether or not the enemy is visible.
 
==== scriptEvent void '''lookAt'''(entity focusEntity, float duration); ====
 
:Aims the character's eyes and head toward an entity for a period of time.
 
==== scriptEvent void '''lookAtAngles'''(float yawAngleClockwise, float pitchAngleUp, float rollAngle, float durationInSeconds); ====
 
:A look at event that just looks at a set of angles relative  to the current body facing of the AI. This method is just like the vanilla Doom3 lookAt and lookAtEnemy methods, but it looks at the specified angles from the current body facing of the AI.
::''yawAngleClockwise'': Negative angles are to the left of  the AIs body and positive angles are to the right.
::''pitchAngleUp'': Negative values are down and positive values are up  where down and up are defined by the body axis.
::''rollAngle'': This is currently unused and does nothing.
::''durationInSeconds'': The duration to look in seconds.
 
==== scriptEvent void '''lookAtEnemy'''(float duration); ====
 
:Aims the character's eyes and head toward the current enemy for a period of time.
 
==== scriptEvent void '''lookAtPosition'''(vector lookAtWorldPosition, float durationInSeconds); ====
 
:This method is just like the vanilla Doom3 lookAt and lookAtEnemy methods, but instead of looking at an entity, it looks at a position in worldspace.  That is, it turns the head of the AI to look at the position.
::''lookAtWorldPosition'': position in space to look at
::''durationInSeconds'': duration to look in seconds
 
==== scriptEvent float '''meleeAttackToJoint'''(string joint, string damageDef); ====
 
:no description
 
==== scriptEvent void '''moveOutOfRange'''(entity ent, float range); ====
 
:no description
 
==== scriptEvent float '''moveStatus'''(); ====
 
:no description
 
==== scriptEvent void '''moveToAttackPosition'''(entity ent, string attack_anim); ====
 
:No description
 
==== scriptEvent void '''moveToCover'''(); ====
 
:no description
 
==== scriptEvent void '''moveToCoverFrom'''(entity ent); ====
 
:no description
 
==== scriptEvent void '''moveToEnemy'''(); ====
 
:no description
 
==== scriptEvent void '''moveToEnemyHeight'''(); ====
 
:no description
 
==== scriptEvent void '''moveToEntity'''(entity destination); ====
 
:No description
 
==== scriptEvent void '''moveToPosition'''(vector position); ====
 
:No description
 
==== scriptEvent void '''muzzleFlash'''(string jointname); ====
 
:no description
 
==== scriptEvent float '''numSmokeEmitters'''(); ====
 
:Returns the # of emitters defined by 'smokeParticleSystem' in the entitydef
 
==== scriptEvent void '''performRelight'''(); ====
 
:Deal with doused lights.
 
==== scriptEvent float '''playAndLipSync'''(string soundName, string animName); ====
 
:Play the given sound, using the given lipsync animation. The lipsync animation should just be a simple non-loopable animation of the mouth opening in a linear fashion. The code will select individual frames from this to construct a simple lipsyncing effect which is in time with the sound.  Returns the length of the played sound in seconds.
 
==== scriptEvent void '''preBurn'''(); ====
 
:no description
 
==== scriptEvent vector '''predictEnemyPos'''(float time); ====
 
:Tries to predict the player's movement based on the AAS and his direction of movement.
 
==== scriptEvent void '''processBlindStim'''(entity stimSource, float skipVisibilityCheck); ====
 
:No description
 
==== scriptEvent void '''processVisualStim'''(entity stimSource); ====
 
:Use this call to let the AI react to a visual stim (coming from the source entity).
 
==== scriptEvent vector '''pushPointIntoAAS'''(vector post); ====
 
:Tries to push the point into a valid AAS area
 
==== scriptEvent void '''pushState'''(string stateName); ====
 
:Pushes the state with the given name, current one is postponed.
 
==== scriptEvent void '''radiusDamageFromJoint'''(string jointname, string damageDef); ====
 
:no description
 
==== scriptEvent entity '''randomPath'''(); ====
 
:no description
 
==== scriptEvent void '''resortHidingSpotSearch'''(vector newCenter, vector newRadius); ====
 
:This re-sorts an existing search based on a new search center and radius.
::''newCenter'': the new center of the search
::''newRadius'': the new radius of the search.  Points outside the original search will not be added.
 
==== scriptEvent void '''restartPatrol'''(); ====
 
:no description
 
==== scriptEvent void '''restoreMove'''(); ====
 
:no description
 
==== scriptEvent void '''saveMove'''(); ====
 
:no description
 
==== scriptEvent void '''setAcuity'''(string type, float val); ====
 
:ai generalized alerts
 
==== scriptEvent void '''setAlertGracePeriod'''(float frac, float duration, float count); ====
 
:This starts the alert grace period for an AI. Should be called in the same frame as the alert that pushes them into a higher state.
::''frac'': the fraction of the alert below which they should ignore alerts during the grace period.
::''duration'': the duration of the period in seconds
::''count'': the number of alerts ignored above which the grace period is invalid
 
==== scriptEvent void '''setAlertLevel'''(float newLevel); ====
 
:Set the alert level (AI_AlertLevel). This should always be called instead of setting AI_AlertLevel directly.
 
==== scriptEvent void '''setAudThresh'''(float val); ====
 
:no description
 
==== scriptEvent void '''setBoneMod'''(float allowBoneMod); ====
 
:Enables or disables head looking (may be obsolete).
 
==== scriptEvent void '''setEnemy'''(entity enemy); ====
 
:Make the given entity an enemy.
 
==== scriptEvent void '''setFlyOffset'''(float offset); ====
 
:Sets the preferred height relative to the player's view height to fly at.
 
==== scriptEvent void '''setFlySpeed'''(float speed); ====
 
:Set the speed flying creatures move at. Also sets speed for moveTypeSlide.
 
==== scriptEvent void '''setMoveType'''(float movetype); ====
 
:Set the current movetype.  movetypes are defined in tdm_ai.script
 
==== scriptEvent void '''setSmokeVisibility'''(float particle_num, float on); ====
 
:enables/disables smoke particles on bones.  pass in the particle #, or ALL_PARTICLES for turning on/off all particle systems. particles are spawned in the order they appear in the entityDef
 
==== scriptEvent void '''setTalkState'''(float state); ====
 
:Sets whether the player can talk to this character or not.
 
==== scriptEvent void '''setTalkTarget'''(entity target); ====
 
:Sets the entity (player) trying to talk to the character
 
==== scriptEvent void '''setTurnRate'''(float rate); ====
 
:Set the rate the character turns at
 
==== scriptEvent void '''shrivel'''(float time); ====
 
:no description
 
==== scriptEvent void '''slideTo'''(vector position, float time); ====
 
:No description
 
==== scriptEvent entity '''spawnThrowableProjectile'''(string projectileName, string jointName); ====
 
:This method spawns a projectile of the type named by the caller and attaches it to the joint given by the caller.  The projectile becomes the AI's firable projectile. Returns a pointer to a projectile entity that can be  thrown by the AI. You can use AI_LaunchMissle (e* = launchMissle(v,v) ) to throw the stone.
::''projectileName'': The name of the projectile to spawn (as seen in a .def file) Must be descended from idProjectile
::''jointName'': The name of the joint on the model to which the particle should be attached for throwing. If this is NULL or the empty string, then it is attached to the model center.
 
==== scriptEvent float '''startSearchForHidingSpots'''(vector hideFromPos, vector minSearchBounds, vector maxSearchBounds, float hidingSpotTypesAllowed, entity ignoreEntity); ====
 
:This event finds hiding spots in the bounds given by two vectors. This method will only start the search, if it returns 1, you should call continueSearchForHidingSpots every frame to do more processing until that function returns 0.  The return value is a 0 for failure, 1 for success.
::''hideFromPos'': a vector which gives the location of the eye from which hiding is desired.
::''minSearchBounds'': a vector giving the minimums in each dimension for the search space
::''maxSearchBounds'': a vector giving the maximums in each dimension for the search space
::''hidingSpotTypesAllowed'': the bit flags of the types of hiding spots  for which the search should look.
::''ignoreEntity'': indicates an entity that should be ignored in the visual occlusion checks.  This is usually the searcher itself but can be the $null_entity.
 
==== scriptEvent float '''startSearchForHidingSpotsWithExclusionArea'''(vector hideFromLocation, vector minBounds, vector maxBounds, vector exclusionMinBounds, vector exclusionMaxBounds, float hidingSpotTypesAllowed, entity ignoreEntity); ====
 
:This method finds hiding spots in the bounds given by two vectors, and also excludes any points contained within a different pair of vectors.  This method will only start the search, if it returns 1, you should call continueSearchForHidingSpots every frame to do more processing until that function returns 0.  The return value is a 0 for failure, 1 for success.
::''hideFromLocation'': a vector which gives the location of the eye from which hiding is desired.
::''minBounds'': the minimums in each dimension for the search space.
::''maxBounds'': the maximums in each dimension for the search space.
::''exclusionMinBounds'': give the min bounds of an area where spots should NOT be tested. This overrides the third and fourth parameters where they overlap (producing a dead zone where points are not tested)
::''exclusionMaxBounds'': give the max bounds of an area where spots should NOT be tested
::''hidingSpotTypesAllowed'': the bit flags of the types of hiding spots for which the search should look.
::''ignoreEntity'': indicates an entity that should be ignored in the visual occlusion checks.  This is usually the searcher itself but can be $null_entity.
 
==== scriptEvent void '''stopMove'''(); ====
 
:no description
 
==== scriptEvent void '''stopRagdoll'''(); ====
 
:turns off the ragdoll
 
==== scriptEvent void '''stopThinking'''(); ====
 
:no description
 
==== scriptEvent void '''switchState'''(string stateName); ====
 
:Switches to the state with the given name, current one is ended.
 
==== scriptEvent float '''testAnimAttack'''(string animname); ====
 
:no description
 
==== scriptEvent float '''testAnimMove'''(string animname); ====
 
:no description
 
==== scriptEvent float '''testAnimMoveTowardEnemy'''(string animname); ====
 
:no description
 
==== scriptEvent float '''testChargeAttack'''(); ====
 
:no description
 
==== scriptEvent float '''testMeleeAttack'''(); ====
 
:no description
 
==== scriptEvent float '''testMoveToPosition'''(vector position); ====
 
:no description
 
==== scriptEvent void '''throwAF'''(); ====
 
:no description
 
==== scriptEvent void '''throwMoveable'''(); ====
 
:no description
 
==== scriptEvent float '''travelDistanceBetweenEntities'''(entity source, entity dest); ====
 
:Approximate travel distance between two entities.
 
==== scriptEvent float '''travelDistanceBetweenPoints'''(vector source, vector dest); ====
 
:Approximate travel distance between two points.
 
==== scriptEvent float '''travelDistanceToEntity'''(entity destination); ====
 
:Approximate travel distance to entity.
 
==== scriptEvent float '''travelDistanceToPoint'''(vector destination); ====
 
:Approximate travel distance to point.
 
==== scriptEvent void '''triggerParticles'''(string jointName); ====
 
:no description
 
==== scriptEvent void '''turnTo'''(float yaw); ====
 
:no description
 
==== scriptEvent void '''turnToEntity'''(entity ent); ====
 
:no description
 
==== scriptEvent void '''turnToPos'''(vector pos); ====
 
:no description
 
==== scriptEvent entity '''visScan'''(); ====
 
:Checks for enemies or player in the AI's FOV, using light level and distance. For now the check is only done on the player.  Returns a reference to the sighted actor.
 
==== scriptEvent void '''waitAction'''(string name); ====
 
:no description
 
==== scriptEvent void '''waitMove'''(); ====
 
:no description
 
==== scriptEvent void '''wakeOnFlashlight'''(float enable); ====
 
:Tells the monster to activate when flashlight shines on them.
 
==== scriptEvent void '''wander'''(); ====
 
:no description
 
=== idTestModel ===
==== scriptEvent void '''leftFoot'''(); ====
 
:Changes to left foot and plays footstep sound.
 
==== scriptEvent void '''rightFoot'''(); ====
 
:Changes to right foot and plays footstep sound.
 
=== CBinaryFrobMover ===
==== scriptEvent void '''Close'''(); ====
 
:Closes the frobmover, regardless of its previous state. Mover must be open, otherwise nothing happens.
 
==== scriptEvent float '''IsLocked'''(); ====
 
:Returns true (nonzero) if the mover is currently locked.
 
==== scriptEvent float '''IsOpen'''(); ====
 
:Returns true (nonzero) if the mover is open, which is basically the same as "not closed". A mover is considered closed when it is at its close position.
 
==== scriptEvent float '''IsPickable'''(); ====
 
:Returns true (nonzero) if this frobmover is pickable.
 
==== scriptEvent void '''Lock'''(); ====
 
:Locks the mover. Calls to Open() will not succeed after this call.
 
==== scriptEvent void '''Open'''(); ====
 
:Opens the frobmover, regardless of its previous state. The mover will not move when it's locked.
 
==== scriptEvent void '''TDM_Lock_OnLockPicked'''(); ====
 
:internal
 
==== scriptEvent void '''TDM_Lock_StatusUpdate'''(); ====
 
:internal
 
==== scriptEvent void '''ToggleLock'''(); ====
 
:Toggles the lock state. Unlocked movers will be locked and vice versa. The notes above concerning Unlock() still apply if this call unlocks the mover.
 
==== scriptEvent void '''ToggleOpen'''(); ====
 
:Toggles the mover state. Closes when fully open, opens when fully closed. If the mover is "interrupted" (e.g. when the player frobbed the mover in between), the move direction depends on the state of the internal "intent_open" flag.
 
==== scriptEvent void '''Unlock'''(); ====
 
:Unlocks the mover. Calls to Open() will succeed after this call. Depending on the value of the spawnarg "open_on_unlock" the mover might automatically open after this call.
 
=== idBrittleFracture ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''dampenSound'''(float dampen); ====
 
:Toggle whether the shattering sound is dampened on the window, e.g., when covered by moss.
::''dampen'': 1 = dampened, 0 = not dampened
 
=== idCameraView ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idCameraAnim ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''start'''(); ====
 
:Starts a spline or anim camera moving.
 
==== scriptEvent void '''stop'''(); ====
 
:Stops a spline or anim camera moving.
 
=== idFuncEmitter ===
==== scriptEvent void '''emitterAddModel'''(string modelName, vector modelOffset); ====
 
:Adds a new particle (or regular, if you wish) model to the emitter, located at modelOffset units away from the emitter's origin.
 
==== scriptEvent float '''emitterGetNumModels'''(); ====
 
:Returns the number of models/particles this emitter has. Always >= 1.
 
=== idEntity ===
==== scriptEvent void '''activateContacts'''(); ====
 
:Activate objects sitting on this object.
 
==== scriptEvent void '''activateTargets'''(entity activator); ====
 
:Causes this entity to activate all it's targets. Similar to how a trigger activates entities.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
 
:Adds the given item to the inventory. Depending on the type the passed entity will be removed from the game (as for loot items) or hidden.
 
==== scriptEvent void '''addItemToInv'''(entity target); ====
 
:Adds the entity to the given entity's inventory. Depending on the type the entity will be removed from the game (as for loot items) or hidden. Example: $book->addItemToInv($player1);
 
==== scriptEvent void '''addTarget'''(entity target); ====
 
:Add a target to this entity.
::''target'': the entity to add as target
 
==== scriptEvent void '''bind'''(entity master); ====
 
:Fixes this entity's position and orientation relative to another entity, such that when the master entity moves, so does this entity.
::''master'': the entity to bind to
 
==== scriptEvent void '''bindPosition'''(entity master); ====
 
:Fixes this entity's position (but not orientation) relative to another entity, such that when the master entity moves, so does this entity.
::''master'': the entity to bind to
 
==== scriptEvent void '''bindToBody'''(entity master, float bodyID, float orientated); ====
 
:Bind to AF body
::''master'': entity to bind to
::''bodyID'': AF body ID to bind to
::''orientated'': binds the orientation as well as position, if set to 1
 
==== scriptEvent void '''bindToJoint'''(entity master, string boneName, float rotateWithMaster); ====
 
:Fixes this entity's position and orientation relative to a bone on another entity, such that when the master's bone moves, so does this entity.
::''master'': the entity to bind to
::''boneName'': the bone name
::''rotateWithMaster'': -
 
==== scriptEvent void '''cacheSoundShader'''(string shaderName); ====
 
:Ensure the specified sound shader is loaded by the system. Prevents cache misses when playing sound shaders.
::''shaderName'': the sound shader to cache
 
==== scriptEvent void '''callFunction'''(string functionName); ====
 
:Calls a function on an entity's script object. See also callGlobalFunction().
 
==== scriptEvent void '''callGlobalFunction'''(string functionName, entity other); ====
 
:calls a global function and passes the other entity along as the first argument calls the function in a new thread, so it continues executing in the current thread right away (unlike entity.callFunction( "blah"))
 
==== scriptEvent void '''callGui'''(float handle, string namedEvent); ====
 
:Calls a named event in a GUI.
 
==== scriptEvent float '''canBeUsedBy'''(entity ent); ====
 
:Returns true if the entity can be used by the argument entity
 
==== scriptEvent float '''canSeeEntity'''(entity target, float useLighting); ====
 
:This is a general version of idAI::canSee, that can be used by all entities. It doesn't regard FOV, it just performs a trace to check whether the target is occluded by world geometry. Is probably useful for stim/response as well Pass useLighting = true to take the lighting of the target entity into account. Use "isEntityHidden" as a script event with a threshold. The constant threshold value for useLighting is defined within the SDK in game/entity.h.
 
==== scriptEvent void '''changeEntityRelation'''(entity ent, float relationChange); ====
 
:This changes the current relation to an entity by adding the new amount.
 
==== scriptEvent void '''changeInvIcon'''(string name, string category, string icon); ====
 
:Sets the inventory icon of the given item in the given category to <icon>.
::''name'': name of the item
::''category'': the item's category
 
==== scriptEvent void '''changeInvItemCount'''(string name, string category, float amount); ====
 
:Decreases the inventory item stack count by amount. The item is addressed using the name and category of the item. These are usually defined on the inventory item entity ("inv_name", "inv_category")  Amount can be both negative and positive.
::''name'': name of the item
::''category'': the item's category
 
==== scriptEvent void '''changeInvLightgemModifier'''(string name, string category, float amount); ====
 
:Sets the lightgem modifier value of the given item. Valid arguments are between 0 and 32 (which is the maximum lightgem value).
::''name'': name of the item
::''category'': the item's category
 
==== scriptEvent float '''changeLootAmount'''(float type, float amount); ====
 
:Changes the loot amount of the given Type (e.g. GOODS) by <amount>.  The mission statisic for loot found gets changed too.  The new value of the changed type is returned (e.g. the new GOODS value if this has been changed).  Note: The LOOT_TOTAL type can't be changed and 0 is returned.
::''type'': one of: LOOT_GOLD, LOOT_GOODS, LOOT_JEWELRY
::''amount'': can be negative
 
==== scriptEvent void '''checkAbsence'''(); ====
 
:description missing
 
==== scriptEvent void '''copyBind'''(entity other); ====
 
:copy bind information of other to this entity (i.e., bind this entity to the same entity that other is bound to)
 
==== scriptEvent float '''createOverlay'''(string guiFile, float layer); ====
 
:Creates a GUI overlay. (must be used on the player)
 
==== scriptEvent void '''CreateTimer'''(float stimId, float hour, float minutes, float seconds, float milliseconds); ====
 
:No description
 
==== scriptEvent void '''damage'''(entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale); ====
 
:Deals damage to this entity (gets translated into the idEntity::Damage() method within the SDK).
::''inflictor'': the entity causing the damage (maybe a projectile)
::''attacker'': the "parent" entity of the inflictor, the one that is responsible for the inflictor (can be the same)
::''dir'': the direction the attack is coming from.
::''damageDefName'': the name of the damage entityDef to know what damage is being dealt to <self> (e.g. "damage_lava")
::''damageScale'': the scale of the damage (pass 1.0 as default, this should be ok).
 
==== scriptEvent void '''destroyOverlay'''(float handle); ====
 
:Destroys a GUI overlay. (must be used on the player)
 
==== scriptEvent float '''distanceTo'''(entity other); ====
 
:Returns the distance of this entity to another entity.
 
==== scriptEvent float '''distanceToPoint'''(vector point); ====
 
:Returns the distance of this entity to a point.
 
==== scriptEvent void '''extinguishLights'''(); ====
 
:Extinguishes all lights (i.e. the <self> entity plus all bound lights)
 
==== scriptEvent void '''fadeSound'''(float channel, float newLevel, float fadeTime); ====
 
:Fades the sound on this entity to a new level over a period of time.  Use SND_CHANNEL_ANY for all currently playing sounds.
 
==== scriptEvent float '''frob'''(); ====
 
:Frobs the entity (i.e. simulates a frob action performed by the player). Returns TRUE if the entity is frobable, FALSE otherwise.
 
==== scriptEvent void '''frobHilight'''(float state); ====
 
:ishtvan: Tries to make the entity frobhilight or not
 
==== scriptEvent vector '''getAngles'''(); ====
 
:Returns the current orientation of this entity (relative to bind parent if any).
 
==== scriptEvent vector '''getAngularVelocity'''(); ====
 
:Gets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of this vector defines the axis of rotation and the magnitude defines the rate of rotation about the axis in radians per second.
 
==== scriptEvent entity '''getBindChild'''(float ind); ====
 
:Returns the ind_th bind child of this entity or NULL if index is invalid. NOTE: indices start at zero
::''ind'': child index
 
==== scriptEvent entity '''getBindMaster'''(); ====
 
:Returns the entity's bindmaster
 
==== scriptEvent float '''getBoolKey'''(string key); ====
 
:Retrieves the boolean value of a specific spawn arg, defaulting to false.
::''key'': spawnarg name
 
==== scriptEvent float '''getClipMask'''(); ====
 
:Returns the clipmask of the physics object.
 
==== scriptEvent vector '''getColor'''(); ====
 
:Gets the color of this entity (shader parms Parm0, Parm1, Parm2).
 
==== scriptEvent float '''getContents'''(); ====
 
:Returns the contents of the physics object.
 
==== scriptEvent string '''getCurInvCategory'''(); ====
 
:Returns the name of the currently highlighted inventory category.
 
==== scriptEvent string '''getCurInvIcon'''(); ====
 
:Returns the icon of the currently highlighted inventory item.
 
==== scriptEvent entity '''getCurInvItemEntity'''(); ====
 
:Returns the currently highlighted inventory item entity.
 
==== scriptEvent string '''getCurInvItemId'''(); ====
 
:Returns the name of the currently highlighted inventory item (the one defined in "inv_item_id"). Most items will return an empty string, unless the "inv_item_id" is set on purpose.
 
==== scriptEvent string '''getCurInvItemName'''(); ====
 
:Returns the name of the currently highlighted inventory item (the one defined in "inv_name").
 
==== scriptEvent entity '''getEntityKey'''(string key); ====
 
:Retrieves the entity specified by the spawn arg.
::''key'': spawnarg name
 
==== scriptEvent float '''getFloatKey'''(string key); ====
 
:Retrieves the floating point value of a specific spawn arg, defaulting to 0.0f.
::''key'': spawnarg name
 
==== scriptEvent string '''getGui'''(float handle); ====
 
:Returns the file currently loaded by a GUI.
 
==== scriptEvent float '''getGuiFloat'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
==== scriptEvent float '''getGuiInt'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
==== scriptEvent string '''getGuiString'''(float handle, string key); ====
 
:Returns a GUI parameter.
 
==== scriptEvent float '''getIntKey'''(string key); ====
 
:Retrieves the integer value of a specific spawn arg, defaulting to 0.
::''key'': spawnarg name
 
==== scriptEvent string '''getKey'''(string key); ====
 
:Retrieves the value of a specific spawn arg, defaulting to ''.
::''key'': spawnarg name
 
==== scriptEvent vector '''getLightInPVS'''(float falloff, float scaling); ====
 
:Computes the sum of all light in the PVS of the entity you call this on, and returns a vector with the sum.
::''falloff'': 0: no falloff with distance  0.5: sqrt(linear) falloff (dist 100 => 1/10)  1: linear falloff (dist 100 => 1/100)  2: square falloff (dist 100 => 1/10000)
::''scaling'': factor to scale the distance, can be used to lower/raise distance factor  after the linear or square scaling has been used good looking values are approx: sqrt(linear): 0.01, linear: 0.1, square 1.0
 
==== scriptEvent vector '''getLinearVelocity'''(); ====
 
:Gets the current linear velocity of this entity. The linear velocity of a physics object is a vector that defines the translation of the center of mass in units per second.
 
==== scriptEvent entity '''getLocation'''(); ====
 
:Returns the idLocation entity corresponding to the entity's current location. This was player-specific before, but is now available to all entities.
 
==== scriptEvent float '''getLootAmount'''(float type); ====
 
:Returns the amount of loot for the given type (e.g. LOOT_GOODS). Pass LOOT_TOTAL to return the sum of all loot types.
::''type'': one of: LOOT_GOLD, LOOT_GOODS, LOOT_JEWELRY, LOOT_TOTAL
 
==== scriptEvent float '''getMass'''(float body); ====
 
:Gets mass of a body for an entity
 
==== scriptEvent vector '''getMaxs'''(); ====
 
:Gets the maximum corner of this entity's bounding box.
 
==== scriptEvent vector '''getMins'''(); ====
 
:Gets the minimum corner of this entity's bounding box.
 
==== scriptEvent string '''getName'''(); ====
 
:Returns the name of this entity.
 
==== scriptEvent entity '''getNextInvItem'''(); ====
 
:Cycles the standard cursor to the next inventory item. Returns the item entity pointed to after the operation is complete.
 
==== scriptEvent string '''getNextKey'''(string prefix, string lastMatch); ====
 
:Searches for the name of a spawn arg that matches the prefix.  For example, passing in "attack_target" matches "attack_target1", "attack_targetx", "attack_target_enemy",  etc. The returned string is the name of the key which can then be passed into functions like getKey() to lookup the value of that spawn arg.  This is useful for when you have multiple values to look up, like when you target multiple objects.  To find the next matching key, pass in the previous result and the next key returned will be the first one that matches after the previous result. Pass in "" to get the first match. Passing in a non-existent key is the same as passing in "". Returns "" when no  more keys match.
 
==== scriptEvent vector '''getOrigin'''(); ====
 
:Returns the current position of this entity (relative to bind parent if any).
 
==== scriptEvent entity '''getPrevInvItem'''(); ====
 
:Cycles the standard cursor to the previous inventory item. Returns the item entity pointed to after the operation is complete.
 
==== scriptEvent entity '''GetResponseEntity'''(); ====
 
:Returns the entity which should take the response. Some entities like AI heads are not responding themselves to stims, but relay it to another entity (i.e. the bodies they're attached to).
 
==== scriptEvent float '''getShaderParm'''(float parm); ====
 
:Gets the value of the specified shader parm.
::''parm'': shader parm index
 
==== scriptEvent vector '''getSize'''(); ====
 
:Gets the size of this entity's bounding box.
 
==== scriptEvent float '''getSoundVolume'''(string soundName); ====
 
:Get the volume of the sound to play.
::''soundName'': the name of the sound
 
==== scriptEvent entity '''getTarget'''(float num); ====
 
:Returns the requested target entity.
::''num'': The target number. Starts at 0.
 
==== scriptEvent float '''getTeam'''(); ====
 
:Returns the current team number.
 
==== scriptEvent vector '''getVectorKey'''(string key); ====
 
:Retrieves the vector value of a specific spawn arg, defaulting to '0 0 0'.
::''key'': spawnarg name
 
==== scriptEvent vector '''getVinePlantLoc'''(); ====
 
:Event important to the growing of vines from vine arrows
 
==== scriptEvent vector '''getVinePlantNormal'''(); ====
 
:Event important to the growing of vines from vine arrows
 
==== scriptEvent vector '''getWorldOrigin'''(); ====
 
:Returns the current world-space position of this entity (regardless of any bind parent).
 
==== scriptEvent float '''hasFunction'''(string functionName); ====
 
:checks if an entity's script object has a specific function
 
==== scriptEvent float '''heal'''(string healDefName, float healScale); ====
 
:Heals the entity this is called on using the specified healing entityDef. Returns 1 if the entity could be healed, 0 otherwise (if the entity is already at full health, for ex.)
::''healDefName'': the name of the entityDef containing the healing information (e.g. "heal_potion")
::''healScale'': the scaling value to be applied to the healAmount found in the healEntityDef
 
==== scriptEvent void '''hide'''(); ====
 
:Makes this entity invisible.
 
==== scriptEvent void '''hideByLODBias'''(); ====
 
:internal
 
==== scriptEvent float '''inPVS'''(); ====
 
:Returns non-zero if this entity is in PVS. For lights, it will return true when the light's bounding box is in PVS, even though the light may not actually be in PVS. (an unmoved shadowcasting light may not be visible to PVS areas its bounding box intersects with)
 
==== scriptEvent float '''isDroppable'''(); ====
 
:Get whether an item may be dropped from the inventory
 
==== scriptEvent float '''isEnemy'''(entity ent); ====
 
:Returns true if the given entity is an enemy.
::''ent'': The entity in question
 
==== scriptEvent float '''isFriend'''(entity ent); ====
 
:Returns true if the given entity is a friend.
::''ent'': The entity in question
 
==== scriptEvent float '''isFrobable'''(); ====
 
:Get whether the entity is frobable
 
==== scriptEvent float '''isHidden'''(); ====
 
:checks if the entity's model is invisible.
 
==== scriptEvent float '''isHilighted'''(); ====
 
:Returns true if entity is currently frobhilighted.
 
==== scriptEvent float '''isInLiquid'''(); ====
 
:Returns 1 if the entity is in or touching a liquid.
 
==== scriptEvent float '''isLight'''(); ====
 
:No description
 
==== scriptEvent float '''isNeutral'''(entity ent); ====
 
:Returns true if the given entity is neutral.
::''ent'': The entity in question
 
==== scriptEvent float '''isType'''(string spawnclass); ====
 
:Returns true if this entity is of the given type.
::''spawnclass'': spawn class name
 
==== scriptEvent float '''loadExternalData'''(string declFile, string prefix); ====
 
:Load an external xdata declaration.
 
==== scriptEvent void '''noShadows'''(float noShadows); ====
 
:Sets the noShadow property on the entity to true/false, turning shadowcasting on or off for this entity.
::''noShadows'': 1 = disable shadows, 0 = enable shadows
 
==== scriptEvent void '''noShadowsDelayed'''(float noShadows, float delay); ====
 
:Sets the noShadow property on the entity to true/false after delay in ms, turning shadows cast by this entity on or off.
::''noShadows'': 1 = disable shadows, 0 = enable shadows
::''delay'': delay in ms
 
==== scriptEvent float '''numBindChildren'''(); ====
 
:Returns the number of bound entities lower down in the bind chain than this entity
 
==== scriptEvent float '''numTargets'''(); ====
 
:Returns the number of entities this entity has targeted.
 
==== scriptEvent void '''propagateSound'''(string soundName, float propVolMod, float msgTag); ====
 
:Generates a propagated sound
 
==== scriptEvent void '''propSound'''(string name); ====
 
:Sound propagation scriptfunctions on all entities propagate a sound directly without playing an audible sound
 
==== scriptEvent void '''propSoundMod'''(string name, float volMod); ====
 
:propagate a sound directly with a volume modifier
 
==== scriptEvent entity '''randomTarget'''(string ignoreName); ====
 
:Returns a random targeted entity. Pass in an entity name to skip that entity.
::''ignoreName'': the name of an entity to ignore
 
==== scriptEvent float '''rangedThreatTo'''(entity target); ====
 
:Could this entity threaten the given (target) entity from a distance?
 
==== scriptEvent void '''removeBinds'''(); ====
 
:Removes all attached entities from the game
 
==== scriptEvent void '''removeKey'''(string key); ====
 
:Removes a key from an object's spawnargs, so things like getNextKey() don't retrieve it.
::''key'': the spawnarg to remove
 
==== scriptEvent void '''removeTarget'''(entity target); ====
 
:Remove a target from this entity.
::''target'': the entity to remove from the targets
 
==== scriptEvent float '''replaceInvItem'''(entity oldItem, entity newItem); ====
 
:Replaces the entity <oldItem> with <newItem> in the inventory, while keeping <oldItem>'s inventory position intact.  Note: The position guarantee only applies if <oldItem> and newItem  share the same category. If the categories are different, the position of <newItem> is likely to be different than the one of <oldItem>.  Note that <oldItem> will be removed from the inventory.  If <newItem> is the $null_entity, <oldItem> is just removed and no replacement happens.  Returns 1 if the operation was successful, 0 otherwise.
::''newItem'': can be $null_entity
 
==== scriptEvent void '''ResetTimer'''(float stimId); ====
 
:No description
 
==== scriptEvent void '''ResponseAdd'''(float type); ====
 
:No description
 
==== scriptEvent void '''ResponseAllow'''(float type, entity responder); ====
 
:No description
 
==== scriptEvent void '''ResponseEnable'''(float type, float state); ====
 
:No description
::''state'': 0 = disabled, 1 = enabled
 
==== scriptEvent void '''ResponseIgnore'''(float type, entity responder); ====
 
:This functions must be called on the stim entity. It will add the response to the ignore list, so that subsequent stims, should not trigger the stim anymore.
 
==== scriptEvent void '''ResponseRemove'''(float type); ====
 
:No description
 
==== scriptEvent void '''ResponseSetAction'''(float type, string action); ====
 
:No description
 
==== scriptEvent void '''ResponseTrigger'''(entity source, float stimType); ====
 
:Fires a response on this entity, without a stim (a stand-alone response, so to say)
 
==== scriptEvent void '''RestartTimer'''(float stimId); ====
 
:No description
 
==== scriptEvent void '''restorePosition'''(); ====
 
:Returns this entity to the position stored in the "origin" spawn arg. This is the position the entity was spawned in unless the "origin" key is changed. Note that there is no guarantee that the entity won't be stuck in another entity when moved, so care should be taken to make sure that isn't possible.
 
==== scriptEvent void '''setAngles'''(vector angles); ====
 
:Sets the current orientation of this entity (relative to bind parent if any)
::''angles'': the new orientation
 
==== scriptEvent void '''setAngularVelocity'''(vector velocity); ====
 
:Sets the current angular velocity of this entity. The angular velocity of a physics object is a vector that passes through the center of mass. The direction of this vector defines the axis of rotation and the magnitude defines the rate of rotation about the axis in radians per second.
 
==== scriptEvent void '''setClipMask'''(float clipMask); ====
 
:Sets the clipmask of the physics object.
 
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
 
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2).
::''parm0'': red
::''parm1'': green
::''parm2'': blue
 
==== scriptEvent void '''setContents'''(float contents); ====
 
:Sets the contents of the physics object.
 
==== scriptEvent float '''setCurInvCategory'''(string categoryName); ====
 
:Sets the inventory cursor to the first item of the named category. Returns 1 on success, 0 on failure (e.g. wrong category name)
 
==== scriptEvent entity '''setCurInvItem'''(string itemName); ====
 
:Sets the inventory cursor to the named item. Returns: the item entity of the newly selected item (can be $null_entity).
 
==== scriptEvent void '''setDroppable'''(float droppable); ====
 
:Set whether an item may be dropped from the inventory.
::''droppable'': if non-zero the item becomes droppable, when called with 0 the item becomes non-droppable
 
==== scriptEvent void '''setEntityRelation'''(entity ent, float relation); ====
 
:Set a relation to another entity, this can be friendly (>0), neutral(0) or hostile (<0)
 
==== scriptEvent void '''setFrobable'''(float frobable); ====
 
:Set whether the entity is frobable
 
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
 
:Loads a new file into an existing GUI.
 
==== scriptEvent void '''setGuiFloat'''(float handle, string key, float val); ====
 
:Sets a GUI parameter.
 
==== scriptEvent void '''setGuiInt'''(float handle, string key, float val); ====
 
:Sets a GUI parameter.
 
==== scriptEvent void '''setGuiString'''(float handle, string key, string val); ====
 
:Sets a GUI parameter.
 
==== scriptEvent void '''setGuiStringFromKey'''(float handle, string key, entity src, string srcKey); ====
 
:This is a kludge. It is equivelant to: setGuiString( handle, key, src.getKey(srcKey) ) However, it's used to bypass the 127 char size limit on script strings.
 
==== scriptEvent void '''setKey'''(string key, string value); ====
 
:Sets a key on this entity's spawn args. Note that most spawn args are evaluated when this entity spawns in, so this will not change the entity's behavior in most cases. This is chiefly for saving data the script needs in an entity for later retrieval.
::''key'': the spawnarg to set
::''value'': the value to store
 
==== scriptEvent void '''setLinearVelocity'''(vector velocity); ====
 
:Sets the current linear velocity of this entity in units per second. The linear velocity of a physics object is a vector that defines the translation of the center of mass in units per second.
 
==== scriptEvent void '''setModel'''(string modelName); ====
 
:Sets the model this entity uses
 
==== scriptEvent void '''setName'''(string name); ====
 
:Sets the name of this entity.
::''name'': the new name
 
==== scriptEvent void '''setNeverDormant'''(float enable); ====
 
:enables or prevents an entity from going dormant
::''enable'': 1 = enable, 0 = disable
 
==== scriptEvent void '''setOrigin'''(vector origin); ====
 
:Sets the current position of this entity (relative to it's bind parent if any)
::''origin'': the new origin
 
==== scriptEvent void '''setOwner'''(entity owner); ====
 
:Sets the owner of this entity. Entities will never collide with their owner.
::''owner'': the entity which will be made owner of this entity
 
==== scriptEvent void '''setShaderParm'''(float parm, float value); ====
 
:Sets the value of the specified shader parm.
::''parm'': shader parm index
::''value'': new value
 
==== scriptEvent void '''setShaderParms'''(float parm0, float parm1, float parm2, float parm3); ====
 
:Sets shader parms Parm0, Parm1, Parm2, and Parm3 (red, green, blue, and alpha respectively).
::''parm0'': red
::''parm1'': green
::''parm2'': blue
::''parm3'': alpha
 
==== scriptEvent void '''setSize'''(vector min, vector max); ====
 
:Sets the size of this entity's bounding box.
::''min'': minimum corner coordinates
::''max'': maximum corner coordinates
 
==== scriptEvent void '''setSkin'''(string skinName); ====
 
:Sets the skin this entity uses.  Set to "" to turn off the skin.
 
==== scriptEvent void '''setSoundVolume'''(float newLevel); ====
 
:Set the volume of the sound to play, must be issued before startSoundShader.
 
==== scriptEvent void '''setTeam'''(float newTeam); ====
 
:Sets the team number of this entity.
 
==== scriptEvent void '''SetTimerState'''(float stimId, float state); ====
 
:No description
 
==== scriptEvent void '''setWorldOrigin'''(vector origin); ====
 
:Sets the current position of this entity (regardless of any bind parent).
 
==== scriptEvent void '''show'''(); ====
 
:Makes this entity visible if it has a model.
 
==== scriptEvent void '''startFx'''(string fx); ====
 
:Starts an FX on this entity.
 
==== scriptEvent float '''startSound'''(string sound, float channel, float netSync); ====
 
:Plays the sound specified by the snd_* key/value pair on the channel and returns the length of the sound in seconds. This is the preferred method for playing sounds on an entity since it ensures that the sound is precached.
::''sound'': the spawnarg to reference, e.g. 'snd_move'
::''channel'': the channel to play on
::''netSync'': -
 
==== scriptEvent float '''startSoundShader'''(string shaderName, float channel); ====
 
:Plays a specific sound shader on the channel and returns the length of the sound in seconds. This is not the preferred method of playing a sound since you must ensure that the sound is loaded.
::''shaderName'': the sound shader to play
::''channel'': the channel to play the sound on
 
==== scriptEvent void '''StartTimer'''(float stimId); ====
 
:No description
 
==== scriptEvent void '''StimAdd'''(float type, float radius); ====
 
:No description
 
==== scriptEvent void '''StimClearIgnoreList'''(float type); ====
 
:This clears the ignore list for the stim of the given type It can be used if an entity changes state in some way that it would no longer be ignored
 
==== scriptEvent void '''StimEnable'''(float type, float state); ====
 
:No description
::''state'': 0 = disabled, 1 = enabled
 
==== scriptEvent void '''StimRemove'''(float type); ====
 
:No description
 
==== scriptEvent void '''stopSound'''(float channel, float netSync); ====
 
:Stops a specific sound shader on the channel.
::''channel'': the channel to stop playback on
::''netSync'': -
 
==== scriptEvent void '''StopTimer'''(float stimId); ====
 
:No description
 
==== scriptEvent void '''teleportTo'''(entity other); ====
 
:Teleports the entity to the position of the other entity, plus a possible offset and random offset (defined on the spawnargs of the entity to be teleported)
 
==== scriptEvent float '''touches'''(entity other); ====
 
:Returns true if this entity touches the other entity.
::''other'': the entity to check against
 
==== scriptEvent void '''unbind'''(); ====
 
:Detaches this entity from its master.
 
==== scriptEvent void '''wait'''(float time); ====
 
:Suspends execution of the current thread for the given number of seconds.
 
==== scriptEvent void '''waitFrame'''(); ====
 
:Suspends execution of current thread for one game frame.
 
=== idAnimatedEntity ===
==== scriptEvent void '''clearAllJoints'''(); ====
 
:Removes any custom transforms on all joints.
 
==== scriptEvent void '''clearJoint'''(float jointnum); ====
 
:Removes any custom transforms on the specified joint.
 
==== scriptEvent vector '''getJointAngle'''(float jointnum); ====
 
:Returns the angular orientation of the joint in world space.
 
==== scriptEvent float '''getJointHandle'''(string jointname); ====
 
:Looks up the number of the specified joint. Returns INVALID_JOINT if the joint is not found.
 
==== scriptEvent vector '''getJointPos'''(float jointnum); ====
 
:Returns the position of the joint in world space.
 
==== scriptEvent void '''setJointAngle'''(float jointnum, float transform_type, vector angles); ====
 
:Modifies the orientation of the joint based on the transform type.
 
==== scriptEvent void '''setJointPos'''(float jointnum, float transform_type, vector pos); ====
 
:Modifies the position of the joint based on the transform type.
 
=== CFrobButton ===
==== scriptEvent void '''Operate'''(); ====
 
:Call this to operate this entity.
 
=== CFrobDoor ===
==== scriptEvent entity '''GetDoorhandle'''(); ====
 
:Returns the handle entity of this door. Can return NULL (== $null_entity)
 
==== scriptEvent void '''OpenDoor'''(float master); ====
 
:The OpenDoor method is necessary to give the FrobDoorHandles a  "low level" open routine. The CFrobDoor::Open() call is re-routed to the FrobDoorHandle::Tap() method, so there must be a way to actually let the door open. Which is what this method does.  Note: Shouldn't be called directly by scripters, call handle->Tap() instead. Unless you know what you're doing.
 
=== CFrobDoorHandle ===
==== scriptEvent entity '''GetDoor'''(); ====
 
:Returns the associated door entity for this handle.
 
=== CFrobHandle ===
==== scriptEvent void '''Tap'''(); ====
 
:Operates this handle.
 
=== CFrobLever ===
==== scriptEvent void '''Operate'''(); ====
 
:Call this to operate this entity.
 
==== scriptEvent void '''Switch'''(float newState); ====
 
:Move the lever to the on or off position (0 = off).
 
=== CFrobLock ===
==== scriptEvent void '''Open'''(); ====
 
:Opens the frobmover, regardless of its previous state. The mover will not move when it's locked.
 
==== scriptEvent void '''TDM_Lock_OnLockPicked'''(); ====
 
:internal
 
==== scriptEvent void '''TDM_Lock_StatusUpdate'''(); ====
 
:internal
 
=== CFrobLockHandle ===
==== scriptEvent entity '''GetLock'''(); ====
 
:Returns the associated lock of this handle.
 
=== tdmFuncShooter ===
==== scriptEvent void '''shooterFireProjectile'''(); ====
 
:Fires a projectile.
 
==== scriptEvent float '''shooterGetAmmo'''(); ====
 
:Get the ammonition
 
==== scriptEvent float '''shooterGetState'''(); ====
 
:Returns the current state of this shooter.
 
==== scriptEvent void '''shooterSetAmmo'''(float newAmmo); ====
 
:Set the ammonition
 
==== scriptEvent void '''shooterSetState'''(float state); ====
 
:Activates / deactivates the shooter entity.
::''state'': 1 = active, 0 = inactive
 
=== idEntityFx ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idClass ===
==== scriptEvent void '''remove'''(); ====
 
:Removes the entity from the game. For AI, use kill() instead.
 
=== idItem ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''respawn'''(); ====
 
:Respawn
 
=== idMoveableItem ===
==== scriptEvent void '''gib'''(string damageDefName); ====
 
:No description
 
=== idLight ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''fadeInLight'''(float time); ====
 
:Turns the light on over the given time in seconds.
::''time'': in seconds
 
==== scriptEvent void '''fadeOutLight'''(float time); ====
 
:Turns the light out over the given time in seconds.
::''time'': in seconds
 
==== scriptEvent void '''fadeToLight'''(vector color, float time); ====
 
:Fades the light to the given color over a given time.
 
==== scriptEvent float '''getLightLevel'''(); ====
 
:Get level (intensity) of a light, <= 0.0 indicates it is off
 
==== scriptEvent vector '''getLightOrigin'''(); ====
 
:Get the light origin (independent of its visual model)
 
==== scriptEvent float '''getLightParm'''(float parmNum); ====
 
:Gets a shader parameter.
 
==== scriptEvent vector '''getRadius'''(); ====
 
:Returns the light radius.
 
==== scriptEvent void '''Off'''(); ====
 
:Turns the entity off.
 
==== scriptEvent void '''On'''(); ====
 
:Turns the entity on.
 
==== scriptEvent void '''setLightOrigin'''(vector pos); ====
 
:Set origin of lights independent of model origin
 
==== scriptEvent void '''setLightParm'''(float parmNum, float value); ====
 
:Sets a shader parameter.
 
==== scriptEvent void '''setLightParms'''(float parm0, float parm1, float parm2, float parm3); ====
 
:Sets the red/green/blue/alpha shader parms on the light and the model.
 
==== scriptEvent void '''setRadius'''(float radius); ====
 
:Sets the size of the bounding box, x=y=z=radius.
 
==== scriptEvent void '''setRadiusXYZ'''(float x, float y, float z); ====
 
:Sets the width/length/height of the light bounding box.
 
==== scriptEvent void '''setShader'''(string shader); ====
 
:Sets the shader to be used for the light.
 
==== scriptEvent void '''setStartedOff'''(); ====
 
:no description
 
==== scriptEvent void '''smoking'''(float state); ====
 
:flame is now smoking (1), or not (0)
::''state'': 1 = smoking, 0 = not smoking
 
=== idPlayerStart ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idActivator ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idPathCorner ===
==== scriptEvent entity '''randomPath'''(); ====
 
:no description
 
=== idDamagable ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idExplodable ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idForceField ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''Toggle'''(); ====
 
:Turns the forcefield on and off.
 
=== idAnimated ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''footstep'''(); ====
 
:Plays footstep sound.
 
==== scriptEvent void '''launchMissiles'''(string projectilename, string sound, string launchbone, string targetbone, float numshots, float framedelay); ====
 
:Launches a projectile.
 
==== scriptEvent void '''leftFoot'''(); ====
 
:Changes to left foot and plays footstep sound.
 
==== scriptEvent void '''rightFoot'''(); ====
 
:Changes to right foot and plays footstep sound.
 
==== scriptEvent void '''startRagdoll'''(); ====
 
:Switches to a ragdoll taking over the animation.
 
=== idStaticEntity ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idFuncSmoke ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idVacuumSeparatorEntity ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idPortalEntity ===
==== scriptEvent float '''getPortalHandle'''(); ====
 
:Returns the portal handle.
 
==== scriptEvent float '''getSoundLoss'''(); ====
 
:Returns the sound loss value (dB).
 
==== scriptEvent void '''setSoundLoss'''(float loss); ====
 
:Sets the sound loss value (dB).
 
=== idBeam ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idShaking ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idEarthQuake ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idFuncPortal ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idFuncAASPortal ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idFuncAASObstacle ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idPhantomObjects ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idPortalSky ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== tdmVine ===
==== scriptEvent void '''addDescendant'''(entity vine); ====
 
:Event called using vine.*()
 
==== scriptEvent float '''canWater'''(); ====
 
:Event called using vine.*()
 
==== scriptEvent void '''clearWatered'''(); ====
 
:Event called using vine.*()
 
==== scriptEvent entity '''getPrime'''(); ====
 
:Event called using vine.*()
 
==== scriptEvent void '''scaleVine'''(float factor); ====
 
:Event called using vine.*()
 
==== scriptEvent void '''setPrime'''(entity vine); ====
 
:Event called using vine.*()
 
==== scriptEvent void '''setWatered'''(); ====
 
:Event called using vine.*()
 
=== idMoveable ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''becomeNonSolid'''(); ====
 
:Makes the moveable non-solid for other entities.
 
==== scriptEvent void '''enableDamage'''(float enable); ====
 
:enable/disable damage
 
==== scriptEvent float '''isAtRest'''(); ====
 
:Returns true if object is not moving
 
=== idMover ===
==== scriptEvent void '''accelSound'''(string sound); ====
 
:Sets the sound to be played when the mover accelerates.
 
==== scriptEvent void '''accelTime'''(float time); ====
 
:Sets the acceleration time. Set this acceleration time before initiating a new move.
 
==== scriptEvent void '''accelTo'''(float speed, float time); ====
 
:Initiates an acceleration to the given speed over the given time in seconds.
 
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''bob'''(float speed, float phase, vector distance); ====
 
:Initiates a translation back and forth along the given vector with the given speed and phase.
 
==== scriptEvent void '''closePortal'''(); ====
 
:Closes the renderer portal associated with this mover.
 
==== scriptEvent void '''decelSound'''(string sound); ====
 
:Sets the sound to be played when the mover decelerates.
 
==== scriptEvent void '''decelTime'''(float time); ====
 
:Sets the deceleration time. Set this deceleration time before initiating a new move.
 
==== scriptEvent void '''decelTo'''(float speed, float time); ====
 
:Initiates a deceleration to the given speed over the given time in seconds.
 
==== scriptEvent void '''disableSplineAngles'''(); ====
 
:Disables aligning the mover with the spline direction.
 
==== scriptEvent void '''enableSplineAngles'''(); ====
 
:Enables aligning the mover with the spline direction.
 
==== scriptEvent float '''getMoveSpeed'''(); ====
 
:Get the movement speed.
 
==== scriptEvent float '''getMoveTime'''(); ====
 
:Gets the movement time.
 
==== scriptEvent float '''isMoving'''(); ====
 
:Returns true if a mover is moving
 
==== scriptEvent float '''isRotating'''(); ====
 
:Returns true if a mover is rotating
 
==== scriptEvent void '''move'''(float angle, float distance); ====
 
:Initiates a translation with the given distance in the given yaw direction. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''moveSound'''(string sound); ====
 
:Sets the sound to be played when the moving.
 
==== scriptEvent void '''moveTo'''(entity targetEntity); ====
 
:Initiates a translation to the position of an entity. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''moveToPos'''(vector pos); ====
 
:Initiates a translation to an absolute position. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''openPortal'''(); ====
 
:Opens the renderer portal associated with this mover.
 
==== scriptEvent void '''removeInitialSplineAngles'''(); ====
 
:Subtracts the initial spline angles to maintain the initial orientation of the mover.
 
==== scriptEvent void '''rotate'''(vector angleSpeed); ====
 
:Initiates a rotation with the given angular speed. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''rotateDownTo'''(float axis, float angle); ====
 
:Initiates a rotation about the given axis by decreasing the current angle towards the given angle. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''rotateOnce'''(vector angles); ====
 
:Initiates a rotation towards the current angles plus the given Euler angles. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''rotateTo'''(vector angles); ====
 
:Initiates a rotation towards the given Euler angles. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''rotateUpTo'''(float axis, float angle); ====
 
:Initiates a rotation about the given axis by increasing the current angle towards the given angle. Uses the current speed/time and acceleration and deceleration settings.
 
==== scriptEvent void '''speed'''(float speed); ====
 
:Sets the movement speed. Set this speed before initiating a new move.
 
==== scriptEvent void '''startSpline'''(entity spline); ====
 
:Starts moving along a spline stored on the given entity.
 
==== scriptEvent void '''stopMoving'''(); ====
 
:Stops any translational movement.
 
==== scriptEvent void '''stopRotating'''(); ====
 
:Stops any rotational movement.
 
==== scriptEvent void '''stopSpline'''(); ====
 
:Stops moving along a spline.
 
==== scriptEvent void '''sway'''(float speed, float phase, vector angles); ====
 
:Initiates a rotation back and forth along the given angles with the given speed and phase.
 
==== scriptEvent void '''time'''(float time); ====
 
:Sets the movement time. Set this time before initiating a new move.
 
=== idMover_Binary ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''closePortal'''(); ====
 
:Closes the renderer portal associated with this mover.
 
==== scriptEvent void '''disable'''(); ====
 
:Disables the mover/trigger
 
==== scriptEvent void '''enable'''(); ====
 
:Enables the mover/trigger
 
==== scriptEvent void '''openPortal'''(); ====
 
:Opens the renderer portal associated with this mover.
 
=== idRotater ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idRiser ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idPlayer ===
==== scriptEvent void '''changeWeaponName'''(string weaponName, string displayName); ====
 
:Changes the display name of the given weapon item to something different. Pass an empty string to reset the display name to the definition as found in the weaponDef.
 
==== scriptEvent void '''changeWeaponProjectile'''(string weaponName, string projectileDefName); ====
 
:Changes the projectile entityDef name of the given weapon (e.g. "broadhead") to the specified entityDef (e.g. "atdm:projectile_broadhead").
 
==== scriptEvent void '''checkAAS'''(); ====
 
:No description
 
==== scriptEvent void '''clearActiveInventoryMap'''(); ====
 
:Clear the active inventory map entity
 
==== scriptEvent void '''clearActiveInventoryMapEnt'''(); ====
 
:Clear the active inventory map entity
 
==== scriptEvent void '''clearMouseDeadTime'''(); ====
 
:No description
 
==== scriptEvent void '''customDeath'''(); ====
 
:No description
 
==== scriptEvent void '''deathMenu'''(); ====
 
:No description
 
==== scriptEvent void '''disableWeapon'''(); ====
 
:Lowers and disables the player weapon.
 
==== scriptEvent void '''enableWeapon'''(); ====
 
:Enables the player weapon.
 
==== scriptEvent void '''endZoom'''(float duration); ====
 
:Starts the zoom out event, which performs a gradual transition back to the default FOV. May be called during a transition as well to intercept a pending zoom in transition.
::''duration'': duration of the transition in msec
 
==== scriptEvent void '''exitTeleporter'''(); ====
 
:No description
 
==== scriptEvent float '''getButtons'''(); ====
 
:Returns the button state from the current user command.
 
==== scriptEvent string '''getCurrentWeapon'''(); ====
 
:Returns weaponX where X is the number of the weapon the player is currently holding.
 
==== scriptEvent string '''getCurWeaponName'''(); ====
 
:Returns the name of the current weapon, as defined by "inv_weapon_name" in the weaponDef.
 
==== scriptEvent entity '''getDragged'''(); ====
 
:Returns the currently dragged body. Returns $null_entity if the body is shouldered, the player has nothing in his hands, or he has a non-AF entity in his hands. See also getShouldered(), getGrabbed() and getFrobbed().
 
==== scriptEvent float '''getFov'''(); ====
 
:This returns the current FOV of the player. You can modify the current FOV with startZoom() and endZoom().
 
==== scriptEvent entity '''getFrobbed'''(); ====
 
:Returns the currently frobhilighted entity. This includes entities the player has in his hands. Sets "frob only used by" mode
 
==== scriptEvent entity '''getGrabbed'''(); ====
 
:Returns the currently entity in the players hands. Returns $null_entity if the player has nothing in his hands Dragging or shouldering a body counts as grabbing it. See also getDragged(), getShouldered(), getFrobbed().
 
==== scriptEvent vector '''getHinderance'''(string source); ====
 
:Used to get hinderance from a source.
 
==== scriptEvent float '''getImmobilization'''(string source); ====
 
:Used to get immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
==== scriptEvent float '''getInventoryOverlay'''(); ====
 
:Gets the default inventory overlay for the player. All other entities will return an invalid value.
 
==== scriptEvent float '''getMouseGesture'''(); ====
 
:Returns the results of the last mouse gesture in enum form. (see the definition for MOUSEDIR_* for which numbers correspond to which directions)
 
==== scriptEvent vector '''getMove'''(); ====
 
:Returns the movement relative to the player's view angles from the current user command. vector_x = forward, vector_y = right, vector_z = up
 
==== scriptEvent string '''getNextHinderance'''(string prefix, string lastMatch); ====
 
:Used to get the next hinderance from a source.
 
==== scriptEvent string '''getNextImmobilization'''(string prefix, string lastMatch); ====
 
:Used to get immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
==== scriptEvent string '''getNextTurnHinderance'''(string prefix, string lastMatch); ====
 
:Get the next hinderance on the view turning from a source
 
==== scriptEvent float '''getObjectiveComp'''(float ObjNum, float CompNum); ====
 
:Used to get the state of custom objective components
::''ObjNum'': Starts counting at 1
::''CompNum'': Starts counting at 1
 
==== scriptEvent float '''getObjectiveState'''(float ObjNum); ====
 
:Returns the current state of the objective with the number ObjNum.  State is one of the following: OBJ_INCOMPLETE = 0, OBJ_COMPLETE = 1, OBJ_INVALID = 2, OBJ_FAILED = 3
::''ObjNum'': Starts counting at 1
 
==== scriptEvent string '''getPreviousWeapon'''(); ====
 
:Returns weaponX where X is the number of the weapon the player was previously holding.
 
==== scriptEvent entity '''getShouldered'''(); ====
 
:Returns the currently shouldered body, otherwise $null_entity. See also getDragged(), getGrabbed() and getFrobbed().
 
==== scriptEvent vector '''getTurnHinderance'''(string source); ====
 
:* Get the hinderance on the view turning from a source
 
==== scriptEvent vector '''getViewAngles'''(); ====
 
:Returns the player view angles.
 
==== scriptEvent entity '''getWeaponEntity'''(); ====
 
:Returns the entity for the player's weapon
 
==== scriptEvent void '''giveHealthPool'''(float amount); ====
 
:This increases/decreases the healthpool of the player by the given amount. The healthpool is gradually decreased over time, healing (damaging?) the player.
 
==== scriptEvent entity '''heldEntity'''(); ====
 
:Returns the entity currently being held, or $null_entity if the player's hands are empty.
 
==== scriptEvent float '''holdEntity'''(entity entity); ====
 
:Forces the player to hold an entity (e.g. puts it into the grabber). Drops whatever is in the player's hands if $null_entity is passed to it. Returns 1 if successful, 0 if not.
 
==== scriptEvent void '''missionFailed'''(); ====
 
:No description
 
==== scriptEvent void '''missionSuccess'''(); ====
 
:No description
 
==== scriptEvent float '''mouseGestureFinished'''(); ====
 
:Returns true if the player is not currently doing a mouse gesture.
 
==== scriptEvent void '''objectiveCompUnlatch'''(float ObjNum, float CompNum); ====
 
:Unlatch an irreversible objective component that has latched into a state
 
==== scriptEvent void '''objectiveUnlatch'''(float ObjNum); ====
 
:Unlatch an irreversible objective that has latched into a state
 
==== scriptEvent void '''pauseGame'''(); ====
 
:Pauses the game. This should only be called for threads that are explicitly maintained by a special SDK method, because ordinary threads won't get executed during g_stopTime == true. Note: This is used by the objective GUI threads. Note: Must be called on the player entity, not the sys entity.
 
==== scriptEvent void '''playStartSound'''(); ====
 
:No description
 
==== scriptEvent void '''readLightgemModifierFromWorldspawn'''(); ====
 
:No description
 
==== scriptEvent void '''resetWeaponProjectile'''(string weaponName); ====
 
:Reloads the original projectile def name from the weaponDef. Used to revert a change made by the event changeWeaponProjectile().
 
==== scriptEvent void '''resetZoom'''(); ====
 
:Cancels any pending zoom transitions and resets the FOV to normal.
 
==== scriptEvent void '''ropeRemovalCleanup'''(entity ropeEnt); ====
 
:Called when rope arrow ropes are removed, removes stale pointers on the player object.
 
==== scriptEvent void '''selectWeapon'''(string weapon); ====
 
:Selects the weapon the player is holding.
 
==== scriptEvent void '''setActiveInventoryMapEnt'''(entity mapEnt); ====
 
:Notify the player about a new active map entity. This clears out any previously active maps.
 
==== scriptEvent void '''setFrobOnlyUsedByInv'''(float OnOff); ====
 
:Engages or disengages a mode where we only frobhilight entities that can be used by our current inventory item. This also disables general frobactions and only allows "used by" frob actions.
 
==== scriptEvent void '''setHinderance'''(string source, float mCap, float fCap); ====
 
:Used to set hinderance from a source.
::''mCap'': mCap values from all sources are multiplied together to define a cap
::''fCap'': fCap values are not additive, the smallest one among all the sources is used
 
==== scriptEvent void '''setImmobilization'''(string source, float type); ====
 
:Used to set immobilization from a source. Warning: Not a finalized version. It's subject to change, so use it at your own risk.)
 
==== scriptEvent void '''setLightgemModifier'''(string modifierName, float value); ====
 
:Sets the named lightgem modifier to a certain value. An example would be the player lantern: setLightgemModifier("lantern", 32). This way multiple modifiers can be set by concurrent script threads.
 
==== scriptEvent void '''setObjectiveComp'''(float ObjNum, float CompNum, float state); ====
 
:Used to set the state of custom objective components
::''ObjNum'': objective number. Starts counting at 1
::''CompNum'': component number. Starts counting at 1
::''state'': 1 or 0 for true or false
 
==== scriptEvent void '''setObjectiveEnabling'''(float ObjNum, string strIn); ====
 
:Set an objective's enabling objectives (objectives that must be completed before that objective may be completed).
::''strIn'': takes the form of a string that is a space-delimited list of integer objectives representing the new enabling objectives. E.g. : '1 2 3 4'
 
==== scriptEvent void '''setObjectiveOngoing'''(float ObjNum, float val); ====
 
:Sets objective ongoing.
::''val'': 1 for true, 0 for false
 
==== scriptEvent void '''setObjectiveOptional'''(float ObjNum, float val); ====
 
:Sets objective mandatory.
::''val'': 1 for true, 0 for false
 
==== scriptEvent void '''setObjectiveState'''(float ObjNum, float State); ====
 
:Used to set the state of objectives from the script. For example, use this to invalidate an objective when something happens in your mission. The first argument is the numerical index of the objective (taking 'user' objective indices, starting at 1). Choose from the following for the second argument: OBJ_INCOMPLETE, OBJ_COMPLETE, OBJ_INVALID, OBJ_FAILED. Use this on $player1 like $player1.setObjectiveState(1, OBJ_COMPLETE);
::''ObjNum'': Starts counting at 1
 
==== scriptEvent void '''setObjectiveText'''(float ObjNum, string newText); ====
 
:Modify the displayed text for an objective. Can also be a string template like #str_20000
::''ObjNum'': Starts counting at 1
 
==== scriptEvent void '''setObjectiveVisible'''(float ObjNum, float val); ====
 
:Sets objective visibility.
::''val'': 1 for true, 0 for false
 
==== scriptEvent void '''setTurnHinderance'''(string source, float mCap, float fCap); ====
 
:Set the hinderance on the view turning from a source
::''mCap'': mCap values from all sources are multiplied together to define a cap
::''fCap'': fCap values are not additive, the smallest one among all the sources is used
 
==== scriptEvent void '''setViewAngles'''(vector angles); ====
 
:Sets the player view angles, e.g. make the player facing this direction. 0 0 0 is east (along the X axis in DR), 0 90 0 north (along the Y axis in DR) 0 180 0 west, 0 270 0 south.
 
==== scriptEvent void '''startGamePlayTimer'''(); ====
 
:Resets the game play timer to zero and (re)starts it.
 
==== scriptEvent void '''startMouseGesture'''(float key, float thresh, float test, float inverted, float turnHinderance, float decideTime, float deadTime); ====
 
:Start tracking a mouse gesture that started when the key impulse was pressed. Discretizes analog mouse movement into a few different gesture possibilities. Impulse arg can also be a button, see the UB_* enum in usercmdgen.h. For now, only one mouse gesture check at a time.
::''thresh'': Waits until the threshold mouse input thresh is reached before deciding.
::''test'': determines which test to do (0 = up/down, 1 = left/right, 2 = 4 directions, 3 = 8 directions).
::''inverted'': inverts the movement if set to 1, does not if 0
::''turnHinderance'': Sets the max player view turn rate when checking this mouse gesture (0 => player view locked, 1.0 => no effect on view turning)
::''decideTime'': time in milliseconds after which the mouse gesture is auto-decided, in the event that the mouse movement threshold was not reached. A DecideTime of -1 means wait forever until the button is released.
::''deadTime'': how long after attack is pressed that mouse control remains dampened by the fraction turnHinderance.
 
==== scriptEvent void '''startZoom'''(float duration, float startFOV, float endFOV); ====
 
:Call this to start the zoom in event. The player FOV is gradually zoomed in until over the given timespan.
::''duration'': duration of the transition in msec
::''startFOV'': The start FOV, this is clamped to [1..179]
::''endFOV'': The end FOV, this is clamped to [1..179]
 
==== scriptEvent void '''stopFxFov'''(); ====
 
:No description
 
==== scriptEvent void '''stopMouseGesture'''(); ====
 
:No description
 
==== scriptEvent void '''triggerMissionEnd'''(); ====
 
:No description
 
==== scriptEvent void '''unpauseGame'''(); ====
 
:Unpauses the game. Most scripts are not executed during g_stopTime == true and won't get into the position of calling this.
 
==== scriptEvent float '''wasDamaged'''(); ====
 
:Check if the player was damaged this frame.
 
=== idProjectile ===
==== scriptEvent float '''getProjectileState'''(); ====
 
:Gets the current state of the projectile. States are defined in doom_defs.script
 
==== scriptEvent void '''launch'''(vector start, vector dir, vector velocity); ====
 
:Launches the projectile from <start> in direction <dir> with the given <velocity>
 
==== scriptEvent void '''TDM_Lock_OnLockPicked'''(); ====
 
:internal
 
=== CProjectileResult ===
==== scriptEvent entity '''getActualStruckEnt'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent vector '''getAxialDir'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent vector '''getFinalAngVel'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent vector '''getFinalVel'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent float '''getIncidenceAngle'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent float '''getProjMass'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent entity '''getStruckEnt'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent vector '''getSurfNormal'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent string '''getSurfType'''(); ====
 
:Getter for projectile result variable
 
==== scriptEvent float '''isVineFriendly'''(); ====
 
:Vine-arrow event
 
=== CTarget_SetRelations ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetEntityRelation ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_ChangeEntityRelation ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idThread ===
==== scriptEvent vector '''angToForward'''(vector angles); ====
 
:Returns a forward vector for the given Euler angles.
 
==== scriptEvent vector '''angToRight'''(vector angles); ====
 
:Returns a right vector for the given Euler angles.
 
==== scriptEvent vector '''angToUp'''(vector angles); ====
 
:Returns an up vector for the given Euler angles.
 
==== scriptEvent void '''assert'''(float condition); ====
 
:Breaks if the condition is zero. (Only works in debug builds.)
 
==== scriptEvent void '''cacheSoundShader'''(string shaderName); ====
 
:Ensure the specified sound shader is loaded by the system. Prevents cache misses when playing sound shaders.
::''shaderName'': the sound shader to cache
 
==== scriptEvent float '''canPlant'''(vector traceStart, vector traceEnd, entity ignore, entity vine); ====
 
:No description
 
==== scriptEvent float '''ceil'''(float x); ====
 
:Returns the smallest integer that is greater than or equal to the given value.
 
==== scriptEvent void '''clearPersistantArgs'''(); ====
 
:Clears data that persists between maps.
 
==== scriptEvent void '''clearSignalThread'''(float signalNum, entity ent); ====
 
:Clears the script callback function set for when the given signal is raised on the given entity.
 
==== scriptEvent void '''copySpawnArgs'''(entity ent); ====
 
:copies the spawn args from an entity
 
==== scriptEvent float '''cos'''(float degrees); ====
 
:Returns the cosine of the given angle in degrees.
 
==== scriptEvent vector '''CrossProduct'''(vector vec1, vector vec2); ====
 
:Returns the cross product of the two vectors.
 
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
==== scriptEvent void '''debugBounds'''(vector color, vector mins, vector maxs, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
==== scriptEvent void '''debugCircle'''(vector color, vector origin, vector dir, float radius, float numSteps, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
==== scriptEvent void '''debugLine'''(vector color, vector start, vector end, float lifetime); ====
 
:line drawing for debug visualization.  lifetime of 0 == 1 frame.
 
==== scriptEvent void '''debug_tdm_material'''(string file); ====
 
:For temporary debuging purposes only. Should be removed eventually.
 
==== scriptEvent float '''DotProduct'''(vector vec1, vector vec2); ====
 
:Returns the dot product of the two vectors.
 
==== scriptEvent void '''drawText'''(string text, vector origin, float scale, vector color, float align, float lifetime); ====
 
:text drawing for debugging. lifetime of 0 == 1 frame.
::''align'': 0 = left, 1 = center, 2 = right
 
==== scriptEvent void '''error'''(string text); ====
 
:Issues an error.
 
==== scriptEvent void '''fadeIn'''(vector color, float time); ====
 
:Fades towards the given color over the given time in seconds.
::''time'': in seconds
 
==== scriptEvent void '''fadeOut'''(vector color, float time); ====
 
:Fades from the given color over the given time in seconds.
::''time'': in seconds
 
==== scriptEvent void '''fadeTo'''(vector color, float alpha, float time); ====
 
:Fades to the given color up to the given alpha over the given time in seconds.
::''time'': in seconds
 
==== scriptEvent void '''firstPerson'''(); ====
 
:Returns view control to the player entity.
 
==== scriptEvent float '''floor'''(float x); ====
 
:Returns the largest integer that is less than or equal to the given value.
 
==== scriptEvent float '''getCurrentMissionNum'''(); ====
 
:Returns the number of the current mission (0-based, the first mission has number 0).
 
==== scriptEvent string '''getcvar'''(string name); ====
 
:Returns the string for a cvar.
 
==== scriptEvent float '''getDifficultyLevel'''(); ====
 
:Returns 0 (Easy), 1 (Medium) or 2 (Hard), depending on the difficulty level of the current mission.
 
==== scriptEvent string '''getDifficultyName'''(float difficultyLevel); ====
 
:Returns the (translated) name of the difficulty level passed as the argument.
::''difficultyLevel'': 0 (Easy), 1 (Medium), 2 (Hard)
 
==== scriptEvent entity '''getEntity'''(string name); ====
 
:Returns a reference to the entity with the specified name.
 
==== scriptEvent float '''getFrameTime'''(); ====
 
:returns the length of time between game frames.  this is not related to renderer frame rate.
 
==== scriptEvent entity '''getMainAmbientLight'''(); ====
 
:Returns the entity of the main ambient light.
 
==== scriptEvent float '''getMissionStatistic'''(string statisticName); ====
 
:Returns current mission statistic.
::''statisticName'': Can be one of (case insensitive):
::{|
|-
|gamePlayTime||gameplay time in seconds
|-
|damageDealt||damage dealt to enemies
|-
|damageReceived||damage received by player
|-
|healthReceived||health received by player
|-
|pocketsPicked||pockets picked by player
|-
|foundLoot||loot found by player
|-
|missionLoot||total loot available in mission
|-
|totalTimePlayerSeen||total time the player was seen by enemies in seconds
|-
|numberTimesPlayerSeen||number of times player was seen by enemies
|-
|numberTimesAISuspicious||number of times AI was 'observant' or 'suspicious'. A single AI passing through both alert levels will add 2 to the score.
|-
|numberTimesAISearched||number of times AI was 'investigating' or 'searching'. A single AI passing through both alert levels will add 2 to the score.
|-
|sightingScore||sighting score (number of times player was seen * weight)
|-
|stealthScore||stealth score (sighting score + alerts * weights)
|-
|killedByPlayer||number of enemies killed by player
|-
|knockedOutByPlayer||number of enemies knocked out by player
|-
|bodiesFound||number of times enemies have spotted a body
|}
 
==== scriptEvent float '''getPersistantFloat'''(string key); ====
 
:Returns the floating point value for the given persistent arg
 
==== scriptEvent string '''getPersistantString'''(string key); ====
 
:Returns the string for the given persistent arg
 
==== scriptEvent vector '''getPersistantVector'''(string key); ====
 
:Returns the vector for the given persistent arg
 
==== scriptEvent float '''getPortAISoundLoss'''(float handle); ====
 
:AI sound propagation scriptfunction on the sys object
 
==== scriptEvent float '''getPortPlayerSoundLoss'''(float handle); ====
 
:Player sound loss  scriptfunction on the sys object
 
==== scriptEvent float '''getPortSoundLoss'''(float handle); ====
 
:Sound propagation scriptfunction on the sys object
 
==== scriptEvent float '''getRelation'''(float team1, float team2); ====
 
:No description
 
==== scriptEvent float '''getTDMVersion'''(); ====
 
:Get the current TDM version as integer. The value will be 108 for v1.08, 109 for v1.09 and 200 for v2.00 etc.
 
==== scriptEvent float '''getTicsPerSecond'''(); ====
 
:returns the number of game frames per second.  this is not related to renderer frame rate.
 
==== scriptEvent float '''getTime'''(); ====
 
:Returns the current game time in seconds.
 
==== scriptEvent string '''getTraceBody'''(); ====
 
:Returns the number of the body part of the entity which was hit during the last call to trace or tracePoint
 
==== scriptEvent vector '''getTraceEndPos'''(); ====
 
:Returns the position the trace stopped due to a collision with solid geometry during the last call to trace or tracePoint
 
==== scriptEvent entity '''getTraceEntity'''(); ====
 
:Returns a reference to the entity which was hit during the last call to trace or tracePoint
 
==== scriptEvent float '''getTraceFraction'''(); ====
 
:Returns the fraction of movement completed during the last call to trace or tracePoint.
 
==== scriptEvent string '''getTraceJoint'''(); ====
 
:Returns the number of the skeletal joint closest to the location on the entity which was hit during the last call to trace or tracePoint
 
==== scriptEvent vector '''getTraceNormal'''(); ====
 
:Returns the normal of the hit plane during the last call to trace or tracePoint
 
==== scriptEvent void '''handleMissionEvent'''(entity objEnt, float eventType, string argument); ====
 
:Generic interface for passing on mission events from scripts to the SDK. Available since TDM 1.02
::''objEnt'': the entity that triggered this event (e.g. a readable)
::''eventType'': a numeric identifier (enumerated both in MissionData.h and tdm_defs.script) specifying the type of event
::''argument'': an optional string parameter, eventtype-specific.
 
==== scriptEvent float '''influenceActive'''(); ====
 
:Checks if an influence is active
 
==== scriptEvent float '''isClient'''(); ====
 
:networking - checks for client
 
==== scriptEvent float '''isMultiplayer'''(); ====
 
:checks if it's a multiplayer game
 
==== scriptEvent void '''killthread'''(string threadName); ====
 
:Kills all threads with the specified name
 
==== scriptEvent float '''log'''(float x); ====
 
:Returns the log of the given argument.
 
==== scriptEvent void '''logString'''(float logClass, float logType, string output); ====
 
:This is the script counterpart to DM_LOG
 
==== scriptEvent void '''music'''(string shaderName); ====
 
:Starts playing background music.
 
==== scriptEvent void '''offsetRelation'''(float team1, float team2, float val); ====
 
:No description
 
==== scriptEvent void '''onSignal'''(float signalNum, entity ent, string functionName); ====
 
:Sets a script callback function for when the given signal is raised on the given entity.
 
==== scriptEvent void '''pause'''(); ====
 
:Pauses the current thread.
 
==== scriptEvent float '''pointInLiquid'''(vector point, entity ignoreEntity); ====
 
:Checks if a point is in a liquid, returns 1 if this is the case.
 
==== scriptEvent float '''pow'''(float x, float y); ====
 
:Returns the power of x to y.
 
==== scriptEvent void '''print'''(string text); ====
 
:Prints the given string to the console.
 
==== scriptEvent void '''println'''(string text); ====
 
:Prints the given line to the console.
 
==== scriptEvent void '''radiusDamage'''(vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower); ====
 
:damages entities within a radius defined by the damageDef.  inflictor is the entity  causing the damage and can be the same as the attacker (in the case  of projectiles, the projectile is the inflictor, while the attacker is the character  that fired the projectile).
::''inflictor'': the entity causing the damage
::''ignore'': an entity to not cause damage to
::''dmgPower'': scales the damage (for cases where damage is dependent on time)
 
==== scriptEvent float '''random'''(float range); ====
 
:Returns a random value X where 0 <= X < range.
 
==== scriptEvent void '''say'''(string text); ====
 
:Multiplayer - Print this line on the network
 
==== scriptEvent void '''sessionCommand'''(string cmd); ====
 
:Sends the sessioncommand to the game
 
==== scriptEvent void '''setCamera'''(entity cameraEnt); ====
 
:Turns over view control to the given camera entity.
 
==== scriptEvent void '''setcvar'''(string name, string value); ====
 
:Sets a cvar.
 
==== scriptEvent void '''setPersistantArg'''(string key, string value); ====
 
:Sets a key/value pair that persists between maps
 
==== scriptEvent void '''setPortAISoundLoss'''(float handle, float value); ====
 
:AI sound propagation scriptfunction on the sys object
 
==== scriptEvent void '''setPortPlayerSoundLoss'''(float handle, float value); ====
 
:Player sound loss scriptfunction on the sys object
 
==== scriptEvent void '''setPortSoundLoss'''(float handle, float value); ====
 
:Sound propagation scriptfunction on the sys object
 
==== scriptEvent void '''setRelation'''(float team1, float team2, float val); ====
 
:No description
 
==== scriptEvent void '''setShaderParm'''(float parm, float value); ====
 
:Sets the value of the specified shader parm.
::''parm'': shader parm index
::''value'': new value
 
==== scriptEvent void '''setSpawnArg'''(string key, string value); ====
 
:Sets a key/value pair to be used when a new entity is spawned.
 
==== scriptEvent float '''sin'''(float degrees); ====
 
:Returns the sine of the given angle in degrees.
 
==== scriptEvent entity '''spawn'''(string classname); ====
 
:Creates an entity of the specified classname and returns a reference to the entity.
 
==== scriptEvent float '''SpawnFloat'''(string key, float default); ====
 
:Returns the floating point value for the given spawn argument.
 
==== scriptEvent string '''SpawnString'''(string key, string default); ====
 
:Returns the string for the given spawn argument.
 
==== scriptEvent vector '''SpawnVector'''(string key, vector default); ====
 
:Returns the vector for the given spawn argument.
 
==== scriptEvent float '''sqrt'''(float square); ====
 
:Returns the square root of the given number.
 
==== scriptEvent string '''strLeft'''(string text, float num); ====
 
:Returns a string composed of the first num characters
 
==== scriptEvent float '''strLength'''(string text); ====
 
:Returns the number of characters in the string
 
==== scriptEvent string '''strMid'''(string text, float start, float num); ====
 
:Returns a string composed of the characters from start to start + num
 
==== scriptEvent string '''strRight'''(string text, float num); ====
 
:Returns a string composed of the last num characters
 
==== scriptEvent string '''strSkip'''(string text, float num); ====
 
:Returns the string following the first num characters
 
==== scriptEvent float '''strToFloat'''(string text); ====
 
:Returns the numeric value of the given string.
 
==== scriptEvent float '''strToInt'''(string text); ====
 
:Returns the integer value of the given string.
 
==== scriptEvent void '''terminate'''(float threadNumber); ====
 
:Terminates a thread.
 
==== scriptEvent void '''threadname'''(string name); ====
 
:Sets the name of the current thread.
 
==== scriptEvent float '''trace'''(vector start, vector end, vector mins, vector maxs, float contents_mask, entity passEntity); ====
 
:Returns the fraction of movement completed before the box from 'mins' to 'maxs' hits solid geometry when moving from 'start' to 'end'. The 'passEntity' is considered non-solid during the move.
 
==== scriptEvent float '''tracePoint'''(vector start, vector end, float contents_mask, entity passEntity); ====
 
:Returns the fraction of movement completed before the trace hits solid geometry when moving from 'start' to 'end'. The 'passEntity' is considered non-solid during the move.
 
==== scriptEvent string '''translate'''(string input); ====
 
:Translates a string (like #str_12345) into the current language
 
==== scriptEvent void '''trigger'''(entity entityToTrigger); ====
 
:Triggers the given entity.
 
==== scriptEvent float '''vecLength'''(vector vec); ====
 
:Returns the length of the given vector.
 
==== scriptEvent vector '''vecNormalize'''(vector vec); ====
 
:Returns the normalized version of the given vector.
 
==== scriptEvent vector '''VecToAngles'''(vector vec); ====
 
:Returns Euler angles for the given direction.
 
==== scriptEvent void '''wait'''(float time); ====
 
:Suspends execution of the current thread for the given number of seconds.
 
==== scriptEvent void '''waitFor'''(entity mover); ====
 
:Waits for the given entity to complete its move.
 
==== scriptEvent void '''waitForRender'''(entity e); ====
 
:Suspends the current thread until 'e' might have been rendered. It's event based, so it doesn't waste CPU repeatedly checking inPVS(). e.inPVS() will very likely be true when the thread resumes. If e.inPVS() is true, calling waitForRender() will probably just wait a frame, unless D3 can figure out that the entity doesn't need to be rendered. Optimizations regarding shadowcasting lights may not apply to this function - it is based purely off whether or not the entity's bounding box is visible.
 
==== scriptEvent void '''waitForThread'''(float threadNumber); ====
 
:Waits for the given thread to terminate.
 
==== scriptEvent void '''waitFrame'''(); ====
 
:Suspends execution of current thread for one game frame.
 
==== scriptEvent void '''warning'''(string text); ====
 
:Issues a warning.
 
=== Seed ===
==== scriptEvent void '''cullAll'''(); ====
 
:Cull (remove from world) all entities.
 
==== scriptEvent void '''disable'''(); ====
 
:Disables the mover/trigger
 
==== scriptEvent void '''enable'''(); ====
 
:Enables the mover/trigger
 
=== idSound ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
==== scriptEvent void '''Off'''(); ====
 
:Turns the entity off.
 
==== scriptEvent void '''On'''(); ====
 
:Turns the entity on.
 
=== idTarget_Remove ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_Show ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_Damage ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SessionCommand ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_EndLevel ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_WaitForButton ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetGlobalShaderTime ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetShaderParm ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetShaderTime ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_FadeEntity ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_LightFadeIn ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_LightFadeOut ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_Give ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetModel ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetInfluence ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetKeyVal ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_SetFov ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_CallObjectFunction ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_PostScriptEvent ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_EnableLevelWeapons ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_RemoveWeapons ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTarget_FadeSoundClass ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_AddObjectives ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetObjectiveState ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetObjectiveVisibility ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetObjectiveComponentState ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_StartConversation ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetFrobable ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_CallScriptFunction ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_ChangeLockState ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_ChangeTarget ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_InterMissionTrigger ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== CTarget_SetTeam ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger ===
==== scriptEvent void '''disable'''(); ====
 
:Disables the mover/trigger
 
==== scriptEvent void '''enable'''(); ====
 
:Enables the mover/trigger
 
=== idTrigger_Multi ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_EntityName ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_Timer ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_Count ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_Hurt ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_Fade ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idTrigger_Touch ===
==== scriptEvent void '''activate'''(entity activator); ====
 
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
 
=== idWeapon ===
==== scriptEvent void '''addToClip'''(float amount); ====
 
:No description
 
==== scriptEvent void '''allowDrop'''(float allow); ====
 
:no description
 
==== scriptEvent float '''ammoAvailable'''(); ====
 
:Number of shots left in inventory
 
==== scriptEvent float '''ammoInClip'''(); ====
 
:No description
 
==== scriptEvent float '''animDone'''(float channel, float blendOutFrames); ====
 
:Returns true if the animation playing on the given channel is completed considering a number of blend frames.
 
==== scriptEvent float '''animIsPaused'''(float channel); ====
 
:Return whether the given anim channel is paused
 
==== scriptEvent float '''clipSize'''(); ====
 
:No description
 
==== scriptEvent entity '''createProjectile'''(); ====
 
:no description
 
==== scriptEvent void '''ejectBrass'''(); ====
 
:no description
 
==== scriptEvent void '''flashlight'''(float enable); ====
 
:no description
 
==== scriptEvent float '''getBlendFrames'''(float channel); ====
 
:Returns the number of frames to blend between animations on the given channel.
 
==== scriptEvent float '''getLightParm'''(float parmNum); ====
 
:Gets a shader parameter.
 
==== scriptEvent entity '''getOwner'''(); ====
 
:Returns the owning entity
 
==== scriptEvent entity '''getWorldModel'''(); ====
 
:Returns the entity that controls the world model
 
==== scriptEvent float '''isInvisible'''(); ====
 
:no description
 
==== scriptEvent void '''launchProjectiles'''(float num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower); ====
 
:no description
 
==== scriptEvent float '''melee'''(); ====
 
:no description
 
==== scriptEvent void '''netEndReload'''(); ====
 
:no description
 
==== scriptEvent void '''netReload'''(); ====
 
:no description
 
==== scriptEvent void '''nextWeapon'''(); ====
 
:No description
 
==== scriptEvent void '''pauseAnim'''(float channel, float bPause); ====
 
:Pause all animations playing on the given channel. NOTE: Can also be used used by idWeapons
::''bPause'': true = pause, false = unpause
 
==== scriptEvent float '''playAnim'''(float channel, string animName); ====
 
:Plays the given animation on the given channel.  Returns false if anim doesn't exist.
 
==== scriptEvent float '''playCycle'''(float channel, string animName); ====
 
:Continuously repeats the given animation on the given channel.  Returns false if anim doesn't exist.
 
==== scriptEvent void '''setBlendFrames'''(float channel, float blendFrame); ====
 
:Sets the number of frames to blend between animations on the given channel.
 
==== scriptEvent void '''setLightParm'''(float parmNum, float value); ====
 
:Sets a shader parameter.
 
==== scriptEvent void '''setLightParms'''(float parm0, float parm1, float parm2, float parm3); ====
 
:Sets the red/green/blue/alpha shader parms on the light and the model.
 
==== scriptEvent void '''showAttachment'''(string attName, float show); ====
 
:Show or hide an attachment.
::''show'': 1 shows attachment, 0 hides it.
 
==== scriptEvent void '''showAttachmentInd'''(float index, float show); ====
 
:Show or hide an attachment by array index.
::''index'': starts at 0
::''show'': 1 shows attachment, 0 hides it.
 
==== scriptEvent float '''totalAmmoCount'''(); ====
 
:Amount of ammo in inventory. since each shot may use more than 1 ammo, this is different than ammoAvailable()
 
==== scriptEvent void '''useAmmo'''(float amount); ====
 
:Eats the specified amount of ammo
 
==== scriptEvent void '''weaponHolstered'''(); ====
 
:no description
 
==== scriptEvent void '''weaponLowering'''(); ====
 
:no description
 
==== scriptEvent void '''weaponOutOfAmmo'''(); ====
 
:no description
 
==== scriptEvent void '''weaponReady'''(); ====
 
:no description
 
==== scriptEvent void '''weaponReloading'''(); ====
 
:no description
 
==== scriptEvent void '''weaponRising'''(); ====
 
:no description
 
==== scriptEvent void '''weaponState'''(string stateFunction, float blendFrames); ====
 
:no description
 
[[Category:Scripting]]

Latest revision as of 16:50, 15 July 2014