(7 intermediate revisions by 2 users not shown) Line 1:
Line 1:
This page has been generated automatically by the tdm_gen_script_event_doc console command.
This page has been generated automatically by the tdm_gen_script_event_doc console command.
Generated by The Dark Mod 2.10, code revision 9702, last update: 2021-12-12 12:20
Generated by The Dark Mod 2.14 , code revision 11087 , last update: 2026 -01 -14 19 :24
{{tdm-scripting-reference-intro}}
{{tdm-scripting-reference-intro}}
Line 53:
Line 53:
:Spawnclasses responding to this event: ''tdmVine''
:Spawnclasses responding to this event: ''tdmVine''
==== scriptEvent void '''addFrobPeer'''(entity peer); ====
:Adds the passed entity as a frob peer.
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
Line 117:
Line 122:
:Spawnclasses responding to this event: ''idWeapon''
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent vector '''angRotate'''(vector angles1, vector angles2); ====
:Rotates the given Euler angles by each other.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''angToForward'''(vector angles); ====
==== scriptEvent vector '''angToForward'''(vector angles); ====
Line 194:
Line 204:
:Spawnclasses responding to this event: ''idActor''
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''attack'''(entity enemy, float ignoreCollisions); ====
:Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable.
::''enemy'': enemy to attack
::''ignoreCollisions'': whether to ignore obstacles in the way to the enemy when planning to attack
:Spawnclasses responding to this event: ''idTurret''
==== scriptEvent void '''attackBegin'''(string damageDef); ====
==== scriptEvent void '''attackBegin'''(string damageDef); ====
Line 214:
Line 231:
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''attackPosition'''(vector targetPos, float ignoreCollisions); ====
:Direct the turret to manually attack a position. Use disableManualAttack() to disable.
::''targetPos'': position to attack
::''ignoreCollisions'': whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.
:Spawnclasses responding to this event: ''idTurret''
==== scriptEvent void '''bark'''(string sound); ====
==== scriptEvent void '''bark'''(string sound); ====
Line 284:
Line 308:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''callFunctionsByWildcard'''(string functionName); ====
:Calls global functions with names matching the specified wildcard in separate threads (in lexicographical order). INTERNAL: don't use in mission scripting!
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''callGlobalFunction'''(string functionName, entity other); ====
==== scriptEvent void '''callGlobalFunction'''(string functionName, entity other); ====
Line 343:
Line 372:
:no description
:no description
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI'', ''idSecurityCamera ''
==== scriptEvent float '''canSeeEntity'''(entity target, float useLighting); ====
==== scriptEvent float '''canSeeEntity'''(entity target, float useLighting); ====
Line 486:
Line 515:
:Spawnclasses responding to this event: ''idPlayer''
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''clearPersistantArgs'''(); ====
==== scriptEvent void '''clearPersistentArgs '''(); ====
:Clears data that persists between maps.
:Clears data that persists between maps.
Line 575:
Line 604:
:No description
:No description
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''createXrayOverlay'''(string guiFile); ====
:Creates a GUI overlay with X-ray material. (must be used on the player)
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 613:
Line 647:
:Spawnclasses responding to this event: ''idPlayer''
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''debug_tdm_material'''(string file); ====
:For temporary debuging purposes only. Should be removed eventually.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
Line 698:
Line 727:
:Spawnclasses responding to this event: ''idActor''
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent void '''disableManualAttack'''(); ====
:Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.
:Spawnclasses responding to this event: ''idTurret''
==== scriptEvent void '''disablePain'''(); ====
==== scriptEvent void '''disablePain'''(); ====
Line 1,002:
Line 1,036:
:Spawnclasses responding to this event: ''idWeapon''
:Spawnclasses responding to this event: ''idWeapon''
==== scriptEvent float '''flee'''(entity entToFleeFrom, float algorithm, float distanceOption); ====
==== scriptEvent void '''flee'''(entity entToFleeFrom); ====
:Flee from the given entity.
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''fleeFromPoint'''(vector pos ); ====
: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.
:Flee from the given position .
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
Line 1,079:
Line 1,118:
:Spawnclasses responding to this event: ''idAFEntity_Base''
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent string '''getAnimList'''(float channel); ====
:Returns a list of all animations and their anim rates.
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getAnimRate'''(float channel, string animName); ====
:Returns the rate for the given animation. Returns -1 if animation cannot be found.
::''animName'': The name of the animation.
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent string '''getAnimState'''(float channel); ====
==== scriptEvent string '''getAnimState'''(float channel); ====
Line 1,181:
Line 1,231:
:Returns the icon of the currently highlighted inventory item.
:Returns the icon of the currently highlighted inventory item.
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getCurInvItemCount'''(); ====
:Returns the item count of the currently highlighted inventory Item, if stackable.Returns - 1 if non - stackable
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 1,221:
Line 1,276:
:Returns the string for a cvar.
:Returns the string for a cvar.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getcvarf'''(string name); ====
:Returns float value for a cvar.
:Spawnclasses responding to this event: ''idThread''
:Spawnclasses responding to this event: ''idThread''
Line 1,253:
Line 1,313:
:no description
:no description
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI'', ''idSecurityCamera ''
==== scriptEvent vector '''getEnemyEyePos'''(); ====
==== scriptEvent vector '''getEnemyEyePos'''(); ====
Line 1,356:
Line 1,416:
:Returns the current health.
:Returns the current health.
:Spawnclasses responding to this event: ''idActor'', ''idSecurityCamera''
:Spawnclasses responding to this event: ''idEntity ''
==== scriptEvent vector '''getHinderance'''(string source); ====
==== scriptEvent vector '''getHinderance'''(string source); ====
Line 1,377:
Line 1,437:
:Spawnclasses responding to this event: ''CProjectileResult''
:Spawnclasses responding to this event: ''CProjectileResult''
==== scriptEvent float '''getInterceptTime'''(vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor); ====
:Returns how much time it will take for an interceptor like a projectile to intercept a moving target at the earliest possible opportunity. Returns 0 if an intercept is not possible or the speed of the target and interceptor are too similar.
::''velocityTarget'': current velocity of target
::''speedInterceptor'': speed of interceptor
::''positionTarget'': current position of target
::''positionInterceptor'': starting position of interceptor
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''getIntKey'''(string key); ====
==== scriptEvent float '''getIntKey'''(string key); ====
Line 1,446:
Line 1,515:
:Spawnclasses responding to this event: ''idAFEntity_Base''
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent vector '''getListenLoc'''(); ====
:Retrieves the location of the listener when leaning.
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''getLocation'''(); ====
==== scriptEvent entity '''getLocation'''(); ====
Line 1,451:
Line 1,525:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getLocationPoint'''(vector point); ====
:Returns the idLocation entity corresponding to the specified point's location.
::''point'': point whose location to check
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent entity '''GetLock'''(); ====
==== scriptEvent entity '''GetLock'''(); ====
Line 1,470:
Line 1,550:
:Gets mass of a body for an entity
:Gets mass of a body for an entity
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''getMaxHealth'''(); ====
:Gets the max health of this entity.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 1,553:
Line 1,638:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent entity '''getNextEnemy'''(entity lastMatch); ====
:Returns the next enemy that the security camera can see.
::''lastMatch'': search will start after this entity.Use $null_entity or pass an uninitialized entity variable to start a new search.The first result in a new search will be the player, if the camera can see him.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent entity '''getNextEntity'''(string key, string value, entity lastMatch); ====
==== scriptEvent entity '''getNextEntity'''(string key, string value, entity lastMatch); ====
Line 1,657:
Line 1,748:
:Spawnclasses responding to this event: ''idActor''
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''getPersistantFloat'''(string key); ====
==== scriptEvent float '''getPersistentFloat '''(string key); ====
:Returns the floating point value for the given persistent arg
:Returns the floating point value for the given persistent arg
:Spawnclasses responding to this event: ''idThread''
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getPersistantString'''(string key); ====
==== scriptEvent string '''getPersistentString '''(string key); ====
:Returns the string for the given persistent arg
:Returns the string for the given persistent arg
:Spawnclasses responding to this event: ''idThread''
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent vector '''getPersistantVector'''(string key); ====
==== scriptEvent vector '''getPersistentVector '''(string key); ====
:Returns the vector for the given persistent arg
:Returns the vector for the given persistent arg
Line 1,878:
Line 1,969:
:Returns the normal of the hit plane during the last call to trace or tracePoint
:Returns the normal of the hit plane during the last call to trace or tracePoint
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''getTraceSurfType'''(); ====
:Returns the type of the surface (i.e. metal, snow) which was hit during the last call to trace or tracePoint
:Spawnclasses responding to this event: ''idThread''
:Spawnclasses responding to this event: ''idThread''
Line 1,895:
Line 1,991:
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent float '''getTurretState'''(); ====
:Returns the turret's state. 0 = passive: no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.
:Spawnclasses responding to this event: ''idTurret''
==== scriptEvent vector '''getVectorKey'''(string key); ====
==== scriptEvent vector '''getVectorKey'''(string key); ====
Line 1,974:
Line 2,075:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''hasSeenEvidence'''(); ====
==== scriptEvent float '''hasInvItem '''(entity item ); ====
:This returns 1 when the AI has seen evidence of intruders before (an enemy, a body...)
:Tests whether the player has the specified item entity in his inventory.
: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''
:Spawnclasses responding to this event: ''idAI''
Line 1,994:
Line 2,100:
:Makes this entity invisible.
:Makes this entity invisible.
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''hideByLODBias'''(); ====
:internal
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 2,031:
Line 2,132:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''isAirborne'''(); ====
:Checks whether the player is in the air.
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''isAtRest'''(); ====
==== scriptEvent float '''isAtRest'''(); ====
Line 2,098:
Line 2,204:
:Returns true (nonzero) if the mover is currently locked.
:Returns true (nonzero) if the mover is currently locked.
:Spawnclasses responding to this event: ''CBinaryFrobMover''
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock ''
==== scriptEvent float '''isMoving'''(); ====
==== scriptEvent float '''isMoving'''(); ====
Line 2,115:
Line 2,221:
:Spawnclasses responding to this event: ''CBinaryFrobMover''
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== scriptEvent float '''isPeekLeaning'''(); ====
:Get whether the player is peek leaning (against a keyhole or crack)
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent float '''IsPickable'''(); ====
==== scriptEvent float '''IsPickable'''(); ====
:Returns true (nonzero) if this frobmover is pickable.
:Returns true (nonzero) if this frobmover is pickable.
:Spawnclasses responding to this event: ''CBinaryFrobMover''
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock ''
==== scriptEvent float '''isPlayerResponsibleForDeath'''(); ====
==== scriptEvent float '''isPlayerResponsibleForDeath'''(); ====
Line 2,168:
Line 2,279:
:Spawnclasses responding to this event: ''idProjectile''
:Spawnclasses responding to this event: ''idProjectile''
==== scriptEvent void '''launchGuided'''(vector start, vector dir, vector velocity, entity target); ====
:Launches the guided projectile from <start> in direction <dir> with the given <velocity> at <target entity>. Pass $null_entity to fire an unguided projectile.
:Spawnclasses responding to this event: ''idGuidedProjectile''
==== scriptEvent entity '''launchMissile'''(vector origin, vector angles); ====
==== scriptEvent entity '''launchMissile'''(vector origin, vector angles); ====
Line 2,202:
Line 2,318:
:Locks the mover. Calls to Open() will not succeed after this call.
:Locks the mover. Calls to Open() will not succeed after this call.
:Spawnclasses responding to this event: ''CBinaryFrobMover''
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock ''
==== scriptEvent float '''log'''(float x); ====
==== scriptEvent float '''log'''(float x); ====
Line 2,249:
Line 2,365:
:Spawnclasses responding to this event: ''idCombatNode''
:Spawnclasses responding to this event: ''idCombatNode''
==== scriptEvent float '''max'''(float x, float y); ====
:returns the larger of two provided float values.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''melee'''(); ====
==== scriptEvent float '''melee'''(); ====
Line 2,294:
Line 2,415:
:Spawnclasses responding to this event: ''idActor''
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''min'''(float x, float y); ====
:returns the smaller of two provided float values.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''missionFailed'''(); ====
==== scriptEvent void '''missionFailed'''(); ====
Line 2,444:
Line 2,570:
==== scriptEvent void '''Off'''(); ====
==== scriptEvent void '''Off'''(); ====
:Turns the entity off.
:Switches the emitter off.
:Spawnclasses responding to this event: ''idLight'', ''idSecurityCamera'', ''idSound''
:Spawnclasses responding to this event: ''idFuncEmitter'', ''idLight'', ''idSecurityCamera'', ''idSound''
==== scriptEvent void '''offsetRelation'''(float team1, float team2, float val); ====
==== scriptEvent void '''offsetRelation'''(float team1, float team2, float val); ====
Line 2,454:
Line 2,580:
==== scriptEvent void '''On'''(); ====
==== scriptEvent void '''On'''(); ====
:Turns the entity on.
:Switches the emitter on.
:Spawnclasses responding to this event: ''idLight'', ''idSecurityCamera'', ''idSound''
:Spawnclasses responding to this event: ''idFuncEmitter'', ''idLight'', ''idSecurityCamera'', ''idSound''
==== scriptEvent void '''onSignal'''(float signalNum, entity ent, string functionName); ====
==== scriptEvent void '''onSignal'''(float signalNum, entity ent, string functionName); ====
Line 2,536:
Line 2,662:
:Checks if a point is in a liquid, returns 1 if this is the case.
:Checks if a point is in a liquid, returns 1 if this is the case.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent float '''pointIsInBounds'''(vector point, vector mins, vector maxs); ====
:Returns true if the point is within the bounds specified.
::''point'': test whether this point is in the bounds
::''mins'': minimal corner of the bounds
::''maxs'': maximal corner of the bounds
:Spawnclasses responding to this event: ''idThread''
:Spawnclasses responding to this event: ''idThread''
Line 2,579:
Line 2,713:
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''projectDecal'''(vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle); ====
:Performs a trace from the specified origin and end positions, then projects a decal in that direction.
::''traceOrigin'': Start of the trace.
::''traceEnd'': End of the trace.
::''passEntity'': This entity will be considered non-solid by the trace.
::''decal'': Decal to be projected.
::''decalSize'': Size of the decal quad.
::''angle'': Angle of the decal quad.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''propagateSound'''(string soundName, float propVolMod, float msgTag); ====
==== scriptEvent void '''propagateSound'''(string soundName, float propVolMod, float msgTag); ====
Line 2,672:
Line 2,817:
:Removes all attached entities from the game
:Removes all attached entities from the game
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''removeFrobPeer'''(entity peer); ====
:Removes the passed entity as a frob peer.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 2,868:
Line 3,018:
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setAirAccelerate'''(float newAccelerate); ====
:Sets a multiplier for the player's horizontal acceleration while airborne. Default is 1.0.
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setAlertGracePeriod'''(float frac, float duration, float count); ====
==== scriptEvent void '''setAlertGracePeriod'''(float frac, float duration, float count); ====
Line 2,900:
Line 3,055:
:Sets a string which is placed in front of any animation names.
:Sets a string which is placed in front of any animation names.
:Spawnclasses responding to this event: ''idActor''
==== scriptEvent float '''setAnimRate'''(float channel, string animName, float animRate); ====
:Sets the animation rate to the given value. Returns 1 if successful, otherwise -1
::''animName'': The name of the animation.
::''animRate'': The rate to set the animation to.
:Spawnclasses responding to this event: ''idActor''
:Spawnclasses responding to this event: ''idActor''
Line 2,935:
Line 3,097:
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2).
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2). See also setColorVec for a variant that accepts a vector instead .
::''parm0'': red
::''parm0'': red
::''parm1'': green
::''parm1'': green
::''parm2'': blue
::''parm2'': blue
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setColorVec'''(vector newColor); ====
:Similar to setColor, but accepts the new RGB color as a vector instead of 3 different floats.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,000:
Line 3,167:
:Set whether the entity is frobable
:Set whether the entity is frobable
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setFrobActionScript'''(string frobActionScript); ====
:Changes the frob action script of this entity. Also updates the 'frob_action_script' spawnarg.
::''frobActionScript'': the new script to call when the entity is frobbed
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setFrobMaster'''(entity master); ====
:Sets the passed entity as the frob master. Pass null_entity to remove the current frob master, if any.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,007:
Line 3,185:
:Spawnclasses responding to this event: ''idPlayer''
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
==== scriptEvent void '''setGravity '''(vector newGravity ); ====
:Loads a new file into an existing GUI.
:Sets a new gravity vector for this entity. Note that non-upright vectors are poorly supported at present.
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
:Loads a new file into an existing GUI.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,036:
Line 3,219:
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
:Spawnclasses responding to this event: ''idActor'', ''idSecurityCamera''
:Spawnclasses responding to this event: ''idEntity ''
==== scriptEvent void '''setHinderance'''(string source, float mCap, float fCap); ====
==== scriptEvent void '''setHinderance'''(string source, float mCap, float fCap); ====
Line 3,096:
Line 3,279:
:Spawnclasses responding to this event: ''idAFEntity_Base''
:Spawnclasses responding to this event: ''idAFEntity_Base''
==== scriptEvent void '''setMaxHealth'''(float maxHealth); ====
:Use these to set the max health of AI or players. Note that the health bar GUI is limited to showing a max health of 100. If health exceeds max health after this, health will be set to be equal to max health (which would also update the AI_DEAD flag)
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setModel'''(string modelName); ====
==== scriptEvent void '''setModel'''(string modelName); ====
Line 3,135:
Line 3,323:
:Set an objective's enabling objectives (objectives that must be completed before that objective may be completed).
: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'
::''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 '''setObjectiveNotification'''(float ObjNote); ====
:Turns the notifications (sound ++ text) for objectives on/off.
::''ObjNote'': Turn notifications on/off
:Spawnclasses responding to this event: ''idPlayer''
:Spawnclasses responding to this event: ''idPlayer''
Line 3,189:
Line 3,383:
:Spawnclasses responding to this event: ''idPlayer''
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setPersistantArg'''(string key, string value); ====
==== scriptEvent void '''setPersistentArg '''(string key, string value); ====
:Sets a key/value pair that persists between maps
:Sets a key/value pair that persists between maps
Line 3,288:
Line 3,482:
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setSmoke'''(string particleDef); ====
:Changes the smoke particle of a func_smoke.
:Spawnclasses responding to this event: ''idFuncSmoke''
==== scriptEvent void '''setSmokeVisibility'''(float particle_num, float on); ====
==== scriptEvent void '''setSmokeVisibility'''(float particle_num, float on); ====
Line 3,295:
Line 3,494:
==== scriptEvent void '''setSolid'''(float solidity); ====
==== scriptEvent void '''setSolid'''(float solidity); ====
:Set the solidity of the entity for other entities.
:Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks .
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,365:
Line 3,564:
:Spawnclasses responding to this event: ''idAI''
:Spawnclasses responding to this event: ''idAI''
==== scriptEvent void '''setUsedBy'''(entity ent, float b_canUse); ====
:Allows to change which entities can use this entity.
::''ent'': specify an entity here, like a key
::''b_canUse'': whether the specified entity can use this entity
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''setViewAngles'''(vector angles); ====
==== scriptEvent void '''setViewAngles'''(vector angles); ====
Line 3,549:
Line 3,755:
:Switches the spotlight on or off. Respects the security camera's power state.
:Switches the spotlight on or off. Respects the security camera's power state.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_AI'''(float set); ====
:Set whether the camera can see AIs.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_animals'''(float set); ====
:Set whether the camera can see animals. Checked after seeAI or seeBodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_bodies'''(float set); ====
:Set whether the camera can see bodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
:Spawnclasses responding to this event: ''idSecurityCamera''
Line 3,569:
Line 3,790:
: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
: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 '''StimEmit'''(float type, float radius, vector stimOrigin); ====
:Emits a stim in a radius around the specified origin. The entity from which this event is called needs to have the corresponding stim setup on itself, it does not need to be active.
::''type'': Index ID of the stim to emit, i.e. 21 or STIM_TRIGGER for a trigger stim.
::''radius'': How far the stim will reach. Pass negative to use the radius settings on the entity.
::''stimOrigin'': Emit the stim from here.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,580:
Line 3,809:
:No description
:No description
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent void '''StimSetScriptBased'''(float type, float state); ====
:Converts a stim to being script-based. It will only be emitted when a script calls StimEmit on the entity.
::''type'': Index ID of the stim to alter, i.e. 21 or STIM_TRIGGER for a trigger stim.
::''state'': New state.
:Spawnclasses responding to this event: ''idEntity''
:Spawnclasses responding to this event: ''idEntity''
Line 3,820:
Line 4,056:
:Toggles the spotlight on/off.
:Toggles the spotlight on/off.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_AI'''(); ====
:Toggles whether the camera can see AIs.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_animals'''(); ====
:Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_bodies'''(); ====
:Toggles whether the camera can see bodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
:Spawnclasses responding to this event: ''idSecurityCamera''
Line 3,836:
Line 4,087:
: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.
: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''
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock ''
==== scriptEvent void '''ToggleOpen'''(); ====
==== scriptEvent void '''ToggleOpen'''(); ====
Line 3,927:
Line 4,178:
: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.
: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''
:Spawnclasses responding to this event: ''CBinaryFrobMover'', ''CFrobLock ''
==== scriptEvent void '''unpauseGame'''(); ====
==== scriptEvent void '''unpauseGame'''(); ====
Line 4,163:
Line 4,414:
:Plays footstep sound.
:Plays footstep sound.
==== scriptEvent string '''getAnimList'''(float channel); ====
:Returns a list of all animations and their anim rates.
==== scriptEvent float '''getAnimRate'''(float channel, string animName); ====
:Returns the rate for the given animation. Returns -1 if animation cannot be found.
::''animName'': The name of the animation.
==== scriptEvent string '''getAnimState'''(float channel); ====
==== scriptEvent string '''getAnimState'''(float channel); ====
Line 4,193:
Line 4,453:
:Returns the entity used for the character's head, if it has one.
:Returns the entity used for the character's head, if it has one.
==== scriptEvent float '''getHealth'''(); ====
:Returns the current health.
==== scriptEvent float '''getMeleeActPhase'''(); ====
==== scriptEvent float '''getMeleeActPhase'''(); ====
Line 4,349:
Line 4,605:
:Sets a string which is placed in front of any animation names.
:Sets a string which is placed in front of any animation names.
==== scriptEvent float '''setAnimRate'''(float channel, string animName, float animRate); ====
:Sets the animation rate to the given value. Returns 1 if successful, otherwise -1
::''animName'': The name of the animation.
::''animRate'': The rate to set the animation to.
==== scriptEvent void '''setAttackFlag'''(float combatType, float enabled); ====
==== scriptEvent void '''setAttackFlag'''(float combatType, float enabled); ====
Line 4,358:
Line 4,620:
:Sets the number of frames to blend between animations on the given channel.
: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); ====
==== scriptEvent void '''setNextState'''(string stateFunc); ====
Line 4,715:
Line 4,973:
:Launches a missile at entity specified by 'attack_target'. returns projectile fired
:Launches a missile at entity specified by 'attack_target'. returns projectile fired
==== scriptEvent float '''flee'''(entity entToFleeFrom, float algorithm, float distanceOption); ====
==== scriptEvent void '''flee'''(entity entToFleeFrom); ====
: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.
:Flee from the given entity.
==== scriptEvent void '''fleeFromPoint''' (vector pos ); ====
:Flee from the given position .
==== scriptEvent void '''foundBody'''(entity body); ====
==== scriptEvent void '''foundBody'''(entity body); ====
Line 5,270:
Line 5,532:
:Returns the number of models/particles this emitter has. Always >= 1.
:Returns the number of models/particles this emitter has. Always >= 1.
==== scriptEvent void '''Off'''(); ====
:Switches the emitter off.
==== scriptEvent void '''On'''(); ====
:Switches the emitter on.
=== idEntity ===
=== idEntity ===
Line 5,280:
Line 5,550:
:Causes this entity to activate all it's targets. Similar to how a trigger activates entities.
: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)
::''activator'': the entity that caused the action (usually the player)
==== scriptEvent void '''addFrobPeer'''(entity peer); ====
:Adds the passed entity as a frob peer.
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
==== scriptEvent void '''addInvItem'''(entity inv_item); ====
Line 5,394:
Line 5,668:
:No description
:No description
==== scriptEvent float '''createXrayOverlay'''(string guiFile); ====
:Creates a GUI overlay with X-ray material. (must be used on the player)
==== scriptEvent void '''damage'''(entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale); ====
==== scriptEvent void '''damage'''(entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale); ====
Line 5,473:
Line 5,751:
:Returns the icon of the currently highlighted inventory item.
:Returns the icon of the currently highlighted inventory item.
==== scriptEvent float '''getCurInvItemCount'''(); ====
:Returns the item count of the currently highlighted inventory Item, if stackable.Returns - 1 if non - stackable
==== scriptEvent entity '''getCurInvItemEntity'''(); ====
==== scriptEvent entity '''getCurInvItemEntity'''(); ====
Line 5,516:
Line 5,798:
:Returns a GUI parameter.
:Returns a GUI parameter.
==== scriptEvent float '''getHealth'''(); ====
:Returns the current health.
==== scriptEvent float '''getIntKey'''(string key); ====
==== scriptEvent float '''getIntKey'''(string key); ====
Line 5,549:
Line 5,835:
:Gets mass of a body for an entity
:Gets mass of a body for an entity
==== scriptEvent float '''getMaxHealth'''(); ====
:Gets the max health of this entity.
==== scriptEvent vector '''getMaxs'''(); ====
==== scriptEvent vector '''getMaxs'''(); ====
Line 5,625:
Line 5,915:
:checks if an entity's script object has a specific function
:checks if an entity's script object has a specific function
==== scriptEvent float '''hasInvItem'''(entity item); ====
:Tests whether the player has the specified item entity in his inventory.
==== scriptEvent float '''heal'''(string healDefName, float healScale); ====
==== scriptEvent float '''heal'''(string healDefName, float healScale); ====
Line 5,635:
Line 5,929:
:Makes this entity invisible.
:Makes this entity invisible.
==== scriptEvent void '''hideByLODBias'''(); ====
:internal
==== scriptEvent float '''inPVS'''(); ====
==== scriptEvent float '''inPVS'''(); ====
Line 5,735:
Line 6,025:
:Removes all attached entities from the game
:Removes all attached entities from the game
==== scriptEvent void '''removeFrobPeer'''(entity peer); ====
:Removes the passed entity as a frob peer.
==== scriptEvent void '''removeKey'''(string key); ====
==== scriptEvent void '''removeKey'''(string key); ====
Line 5,811:
Line 6,105:
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
==== scriptEvent void '''setColor'''(float parm0, float parm1, float parm2); ====
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2).
:Sets the RGB color of this entity (shader parms Parm0, Parm1, Parm2). See also setColorVec for a variant that accepts a vector instead .
::''parm0'': red
::''parm0'': red
::''parm1'': green
::''parm1'': green
::''parm2'': blue
::''parm2'': blue
==== scriptEvent void '''setColorVec'''(vector newColor); ====
:Similar to setColor, but accepts the new RGB color as a vector instead of 3 different floats.
==== scriptEvent void '''setContents'''(float contents); ====
==== scriptEvent void '''setContents'''(float contents); ====
Line 5,840:
Line 6,138:
:Set whether the entity is frobable
:Set whether the entity is frobable
==== scriptEvent void '''setFrobActionScript'''(string frobActionScript); ====
:Changes the frob action script of this entity. Also updates the 'frob_action_script' spawnarg.
::''frobActionScript'': the new script to call when the entity is frobbed
==== scriptEvent void '''setFrobMaster'''(entity master); ====
:Sets the passed entity as the frob master. Pass null_entity to remove the current frob master, if any.
==== scriptEvent void '''setGravity'''(vector newGravity); ====
:Sets a new gravity vector for this entity. Note that non-upright vectors are poorly supported at present.
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
==== scriptEvent void '''setGui'''(float handle, string guiFile); ====
Line 5,860:
Line 6,171:
: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.
: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 '''setHealth'''(float health); ====
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
==== scriptEvent void '''setKey'''(string key, string value); ====
==== scriptEvent void '''setKey'''(string key, string value); ====
Line 5,870:
Line 6,185:
: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.
: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 '''setMaxHealth'''(float maxHealth); ====
:Use these to set the max health of AI or players. Note that the health bar GUI is limited to showing a max health of 100. If health exceeds max health after this, health will be set to be equal to max health (which would also update the AI_DEAD flag)
==== scriptEvent void '''setModel'''(string modelName); ====
==== scriptEvent void '''setModel'''(string modelName); ====
Line 5,921:
Line 6,240:
==== scriptEvent void '''setSolid'''(float solidity); ====
==== scriptEvent void '''setSolid'''(float solidity); ====
:Set the solidity of the entity for other entities.
:Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks .
==== scriptEvent void '''setSoundVolume'''(float newLevel); ====
==== scriptEvent void '''setSoundVolume'''(float newLevel); ====
Line 5,934:
Line 6,253:
:No description
:No description
==== scriptEvent void '''setUsedBy'''(entity ent, float b_canUse); ====
:Allows to change which entities can use this entity.
::''ent'': specify an entity here, like a key
::''b_canUse'': whether the specified entity can use this entity
==== scriptEvent void '''setWorldOrigin'''(vector origin); ====
==== scriptEvent void '''setWorldOrigin'''(vector origin); ====
Line 5,971:
Line 6,296:
: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
: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 '''StimEmit'''(float type, float radius, vector stimOrigin); ====
:Emits a stim in a radius around the specified origin. The entity from which this event is called needs to have the corresponding stim setup on itself, it does not need to be active.
::''type'': Index ID of the stim to emit, i.e. 21 or STIM_TRIGGER for a trigger stim.
::''radius'': How far the stim will reach. Pass negative to use the radius settings on the entity.
::''stimOrigin'': Emit the stim from here.
==== scriptEvent void '''StimEnable'''(float type, float state); ====
==== scriptEvent void '''StimEnable'''(float type, float state); ====
Line 5,980:
Line 6,312:
:No description
:No description
==== scriptEvent void '''StimSetScriptBased'''(float type, float state); ====
:Converts a stim to being script-based. It will only be emitted when a script calls StimEmit on the entity.
::''type'': Index ID of the stim to alter, i.e. 21 or STIM_TRIGGER for a trigger stim.
::''state'': New state.
==== scriptEvent void '''stopSound'''(float channel, float netSync); ====
==== scriptEvent void '''stopSound'''(float channel, float netSync); ====
Line 6,075:
Line 6,413:
=== CFrobLock ===
=== CFrobLock ===
==== scriptEvent float '''IsLocked'''(); ====
:Returns true (nonzero) if the mover is currently locked.
==== 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'''(); ====
==== scriptEvent void '''Open'''(); ====
Line 6,087:
Line 6,437:
:internal
:internal
=== CFrobLockHandle ===
==== scriptEvent void '''ToggleLock'''(); ====
==== scriptEvent entity '''GetLock'''(); ====
: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 '''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.
=== CFrobLockHandle ===
==== scriptEvent entity '''GetLock'''(); ====
:Returns the associated lock of this handle.
:Returns the associated lock of this handle.
Line 6,177:
Line 6,535:
==== scriptEvent void '''Off'''(); ====
==== scriptEvent void '''Off'''(); ====
:Turns the entity off.
:Switches the emitter off.
==== scriptEvent void '''On'''(); ====
==== scriptEvent void '''On'''(); ====
:Turns the entity on.
:Switches the emitter on.
==== scriptEvent void '''setLightOrigin'''(vector pos); ====
==== scriptEvent void '''setLightOrigin'''(vector pos); ====
Line 6,298:
Line 6,656:
:Activates this entity as if it was activated by a trigger.
:Activates this entity as if it was activated by a trigger.
::''activator'': the entity that caused the action (usually the player)
::''activator'': the entity that caused the action (usually the player)
==== scriptEvent void '''setSmoke'''(string particleDef); ====
:Changes the smoke particle of a func_smoke.
=== idVacuumSeparatorEntity ===
=== idVacuumSeparatorEntity ===
Line 6,674:
Line 7,036:
:Gets the default inventory overlay for the player. All other entities will return an invalid value.
:Gets the default inventory overlay for the player. All other entities will return an invalid value.
==== scriptEvent vector '''getListenLoc'''(); ====
:Retrieves the location of the listener when leaning.
==== scriptEvent float '''getMouseGesture'''(); ====
==== scriptEvent float '''getMouseGesture'''(); ====
Line 6,742:
Line 7,108:
: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.
: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 float '''isAirborne'''(); ====
:Checks whether the player is in the air.
==== scriptEvent float '''isLeaning'''(); ====
==== scriptEvent float '''isLeaning'''(); ====
:Get whether the player is leaning
:Get whether the player is leaning
==== scriptEvent float '''isPeekLeaning'''(); ====
:Get whether the player is peek leaning (against a keyhole or crack)
==== scriptEvent void '''missionFailed'''(); ====
==== scriptEvent void '''missionFailed'''(); ====
Line 6,802:
Line 7,176:
:Notify the player about a new active map entity. This clears out any previously active maps.
:Notify the player about a new active map entity. This clears out any previously active maps.
==== scriptEvent void '''setAirAccelerate'''(float newAccelerate); ====
:Sets a multiplier for the player's horizontal acceleration while airborne. Default is 1.0.
==== scriptEvent void '''setFrobOnlyUsedByInv'''(float OnOff); ====
==== scriptEvent void '''setFrobOnlyUsedByInv'''(float OnOff); ====
Line 6,832:
Line 7,210:
:Set an objective's enabling objectives (objectives that must be completed before that objective may be completed).
: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'
::''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 '''setObjectiveNotification'''(float ObjNote); ====
:Turns the notifications (sound ++ text) for objectives on/off.
::''ObjNote'': Turn notifications on/off
==== scriptEvent void '''setObjectiveOngoing'''(float ObjNum, float val); ====
==== scriptEvent void '''setObjectiveOngoing'''(float ObjNum, float val); ====
Line 6,950:
Line 7,333:
:internal
:internal
=== idGuidedProjectile ===
==== scriptEvent void '''launchGuided'''(vector start, vector dir, vector velocity, entity target); ====
:Launches the guided projectile from <start> in direction <dir> with the given <velocity> at <target entity>. Pass $null_entity to fire an unguided projectile.
=== CProjectileResult ===
=== CProjectileResult ===
Line 7,014:
Line 7,402:
:Returns the angle in degrees with the given cosine.
:Returns the angle in degrees with the given cosine.
==== scriptEvent vector '''angRotate'''(vector angles1, vector angles2); ====
:Rotates the given Euler angles by each other.
==== scriptEvent vector '''angToForward'''(vector angles); ====
==== scriptEvent vector '''angToForward'''(vector angles); ====
Line 7,039:
Line 7,431:
:Ensure the specified sound shader is loaded by the system. Prevents cache misses when playing sound shaders.
:Ensure the specified sound shader is loaded by the system. Prevents cache misses when playing sound shaders.
::''shaderName'': the sound shader to cache
::''shaderName'': the sound shader to cache
==== scriptEvent void '''callFunctionsByWildcard'''(string functionName); ====
:Calls global functions with names matching the specified wildcard in separate threads (in lexicographical order). INTERNAL: don't use in mission scripting!
==== scriptEvent float '''canPlant'''(vector traceStart, vector traceEnd, entity ignore, entity vine); ====
==== scriptEvent float '''canPlant'''(vector traceStart, vector traceEnd, entity ignore, entity vine); ====
Line 7,048:
Line 7,444:
:Returns the smallest integer that is greater than or equal to the given value.
:Returns the smallest integer that is greater than or equal to the given value.
==== scriptEvent void '''clearPersistantArgs'''(); ====
==== scriptEvent void '''clearPersistentArgs '''(); ====
:Clears data that persists between maps.
:Clears data that persists between maps.
Line 7,067:
Line 7,463:
:Returns the cross product of the two vectors.
:Returns the cross product of the two vectors.
==== scriptEvent void '''debug_tdm_material'''(string file); ====
:For temporary debuging purposes only. Should be removed eventually.
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
==== scriptEvent void '''debugArrow'''(vector color, vector start, vector end, float size, float lifetime); ====
Line 7,140:
Line 7,532:
:Returns the string for a cvar.
:Returns the string for a cvar.
==== scriptEvent float '''getcvarf'''(string name); ====
:Returns float value for a cvar.
==== scriptEvent float '''getDifficultyLevel'''(); ====
==== scriptEvent float '''getDifficultyLevel'''(); ====
Line 7,157:
Line 7,553:
:returns the length of time between game frames. this is not related to renderer frame rate.
:returns the length of time between game frames. this is not related to renderer frame rate.
==== scriptEvent float '''getInterceptTime'''(vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor); ====
:Returns how much time it will take for an interceptor like a projectile to intercept a moving target at the earliest possible opportunity. Returns 0 if an intercept is not possible or the speed of the target and interceptor are too similar.
::''velocityTarget'': current velocity of target
::''speedInterceptor'': speed of interceptor
::''positionTarget'': current position of target
::''positionInterceptor'': starting position of interceptor
==== scriptEvent entity '''getLocationPoint'''(vector point); ====
:Returns the idLocation entity corresponding to the specified point's location.
::''point'': point whose location to check
==== scriptEvent entity '''getMainAmbientLight'''(); ====
==== scriptEvent entity '''getMainAmbientLight'''(); ====
Line 7,174:
Line 7,583:
::''lastMatch'': Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
::''lastMatch'': Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
==== scriptEvent float '''getPersistantFloat'''(string key); ====
==== scriptEvent float '''getPersistentFloat '''(string key); ====
:Returns the floating point value for the given persistent arg
:Returns the floating point value for the given persistent arg
==== scriptEvent string '''getPersistantString'''(string key); ====
==== scriptEvent string '''getPersistentString '''(string key); ====
:Returns the string for the given persistent arg
:Returns the string for the given persistent arg
==== scriptEvent vector '''getPersistantVector'''(string key); ====
==== scriptEvent vector '''getPersistentVector '''(string key); ====
:Returns the vector for the given persistent arg
:Returns the vector for the given persistent arg
Line 7,237:
Line 7,646:
:Returns the normal of the hit plane during the last call to trace or tracePoint
:Returns the normal of the hit plane during the last call to trace or tracePoint
==== scriptEvent string '''getTraceSurfType'''(); ====
:Returns the type of the surface (i.e. metal, snow) which was hit during the last call to trace or tracePoint
==== scriptEvent void '''handleMissionEvent'''(entity objEnt, float eventType, string argument); ====
==== scriptEvent void '''handleMissionEvent'''(entity objEnt, float eventType, string argument); ====
Line 7,260:
Line 7,673:
:This is the script counterpart to DM_LOG
:This is the script counterpart to DM_LOG
==== scriptEvent float '''max'''(float x, float y); ====
:returns the larger of two provided float values.
==== scriptEvent float '''min'''(float x, float y); ====
:returns the smaller of two provided float values.
==== scriptEvent void '''music'''(string shaderName); ====
==== scriptEvent void '''music'''(string shaderName); ====
Line 7,280:
Line 7,701:
:Checks if a point is in a liquid, returns 1 if this is the case.
:Checks if a point is in a liquid, returns 1 if this is the case.
==== scriptEvent float '''pointIsInBounds'''(vector point, vector mins, vector maxs); ====
:Returns true if the point is within the bounds specified.
::''point'': test whether this point is in the bounds
::''mins'': minimal corner of the bounds
::''maxs'': maximal corner of the bounds
==== scriptEvent float '''pow'''(float x, float y); ====
==== scriptEvent float '''pow'''(float x, float y); ====
Line 7,292:
Line 7,720:
:Prints the given line to the console.
:Prints the given line to the console.
==== scriptEvent void '''projectDecal'''(vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle); ====
:Performs a trace from the specified origin and end positions, then projects a decal in that direction.
::''traceOrigin'': Start of the trace.
::''traceEnd'': End of the trace.
::''passEntity'': This entity will be considered non-solid by the trace.
::''decal'': Decal to be projected.
::''decalSize'': Size of the decal quad.
::''angle'': Angle of the decal quad.
==== scriptEvent void '''radiusDamage'''(vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower); ====
==== scriptEvent void '''radiusDamage'''(vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower); ====
Line 7,324:
Line 7,762:
:Sets a cvar.
:Sets a cvar.
==== scriptEvent void '''setPersistantArg'''(string key, string value); ====
==== scriptEvent void '''setPersistentArg '''(string key, string value); ====
:Sets a key/value pair that persists between maps
:Sets a key/value pair that persists between maps
Line 7,494:
Line 7,932:
=== idSecurityCamera ===
=== idSecurityCamera ===
==== scriptEvent float '''getHealth'''(); ====
==== scriptEvent float '''canSee '''(entity ent ); ====
:Returns the current health.
:no description
==== scriptEvent float '''getSecurityCameraState'''(); ====
==== scriptEvent entity '''getEnemy'''(); ====
:no description
==== scriptEvent entity '''getNextEnemy'''(entity lastMatch); ====
:Returns the next enemy that the security camera can see.
::''lastMatch'': search will start after this entity.Use $null_entity or pass an uninitialized entity variable to start a new search.The first result in a new search will be the player, if the camera can see him.
==== scriptEvent float '''getSecurityCameraState'''(); ====
:Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
:Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
Line 7,508:
Line 7,955:
==== scriptEvent void '''Off'''(); ====
==== scriptEvent void '''Off'''(); ====
:Turns the entity off.
:Switches the emitter off.
==== scriptEvent void '''On'''(); ====
==== scriptEvent void '''On'''(); ====
:Turns the entity on.
:Switches the emitter on.
==== scriptEvent void '''setHealth'''(float health); ====
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
==== scriptEvent void '''setSightThreshold'''(float sightThreshold); ====
==== scriptEvent void '''setSightThreshold'''(float sightThreshold); ====
Line 7,525:
Line 7,968:
:Switches the spotlight on or off. Respects the security camera's power state.
:Switches the spotlight on or off. Respects the security camera's power state.
==== scriptEvent void '''state_see_AI'''(float set); ====
:Set whether the camera can see AIs.
==== scriptEvent void '''state_see_animals'''(float set); ====
:Set whether the camera can see animals. Checked after seeAI or seeBodies.
==== scriptEvent void '''state_see_bodies'''(float set); ====
:Set whether the camera can see bodies.
==== scriptEvent void '''state_see_player'''(float set); ====
==== scriptEvent void '''state_see_player'''(float set); ====
Line 7,537:
Line 7,992:
:Toggles the spotlight on/off.
:Toggles the spotlight on/off.
==== scriptEvent void '''toggle_see_AI'''(); ====
:Toggles whether the camera can see AIs.
==== scriptEvent void '''toggle_see_animals'''(); ====
:Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
==== scriptEvent void '''toggle_see_bodies'''(); ====
:Toggles whether the camera can see bodies.
==== scriptEvent void '''toggle_see_player'''(); ====
==== scriptEvent void '''toggle_see_player'''(); ====
Line 7,567:
Line 8,034:
==== scriptEvent void '''Off'''(); ====
==== scriptEvent void '''Off'''(); ====
:Turns the entity off.
:Switches the emitter off.
==== scriptEvent void '''On'''(); ====
==== scriptEvent void '''On'''(); ====
:Turns the entity on.
:Switches the emitter on.
=== idTarget_Remove ===
=== idTarget_Remove ===
Line 7,828:
Line 8,295:
::''activator'': the entity that caused the action (usually the player)
::''activator'': the entity that caused the action (usually the player)
=== idWeapon ===
=== idTurret ===
==== scriptEvent void '''addToClip'''(float amount); ====
==== scriptEvent void '''attack '''(entity enemy , float ignoreCollisions ); ====
: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); ====
:Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable.
::''enemy '': enemy to attack
:: ''ignoreCollisions '': whether to ignore obstacles in the way to the enemy when planning to attack
:Return whether the given anim channel is paused
==== scriptEvent void '''attackPosition'''(vector targetPos, float ignoreCollisions); ====
==== scriptEvent float '''clipSize'''(); ====
:Direct the turret to manually attack a position. Use disableManualAttack() to disable.
::''targetPos '': position to attack
:: ''ignoreCollisions '': whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.
:No description
==== scriptEvent void '''disableManualAttack'''(); ====
==== scriptEvent entity '''createProjectile'''(); ====
:Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.
:no description
==== scriptEvent float '''getTurretState'''(); ====
==== scriptEvent void '''ejectBrass'''(); ====
:Returns the turret 's state. 0 = passive : no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.
: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); ====
:Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. 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]]
This page has been generated automatically by the tdm_gen_script_event_doc console command.
Generated by The Dark Mod 2.10, code revision 9814, last update: 2022-01-26 09:57
{{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 float '''acos'''(float cosine); ====
:Returns the angle in degrees with the given cosine.
:Spawnclasses responding to this event: ''idThread''
==== 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_ItemRemove'', ''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'', ''idListener'', ''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 '''applyImpulse'''(entity source, float bodyid, vector point, vector impulse); ====
:Applies an impulse to the entity. Example: entity.applyImpulse($player1, 0, entity.getOrigin(), '0 0 2');
::''source'': Pass $null_entity or the entity that applies the impulse
::''bodyid'': For articulated figures, ID of the body, 0 for the first (main) body. Otherwise use 0.
::''point'': Point on the body where the impulse is applied to
::''impulse'': Vector of the impulse
:Spawnclasses responding to this event: ''idEntity''
==== scriptEvent float '''asin'''(float sine); ====
:Returns the angle in degrees with the given sine.
:Spawnclasses responding to this event: ''idThread''
==== 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'', ''idSecurityCamera''
==== 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 '''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 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 '''debug_tdm_material'''(string file); ====
:For temporary debuging purposes only. Should be removed eventually.
:Spawnclasses responding to this event: ''idThread''
==== 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 '''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 float '''emitParticle'''(string particle, float startTime, float diversity, vector origin, vector angle); ====
:Start a particle effect in the world without using an entity emitter. Will emit one quad per particle stage when first called with sys.getTime() as the start time. Designed to be called once per frame with the same startTime each call to achieve a normal particle effect, or on demand with sys.getTime() as the startTime for finer grained control, 1 quad at a time. Returns True (1) if there are more particles to be emitted from the stage, False (0) if the stage has released all its quads.
::''particle'': String: name of particle effect.
::''startTime'': Game seconds since map start: use sys.getTime() for the first call unless you want to back-date the particle so that it starts part way through its cycle.
::''diversity'': Randomizer value between 0 and 1. All particles with the same diversity will have the same path and rotation. Use sys.random(1) for a random path.
::''origin'': Origin of the particle effect.
::''angle'': Axis for the particle effect. Use $<entityname>.getAngles() to align the particle to an entity. use '0 0 0' for an upright (world-aligned) particle effect.
:Spawnclasses responding to this event: ''idThread''
==== 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 '''getCalibratedLightgemValue'''(); ====
:Returns the calibrated light gem value.
: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'', ''idSecurityCamera''
==== 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 float '''getEntityFlag'''(string flagName); ====
:Returns the value of the specified entity flag.
::''flagName'': Can be one of (case insensitive): notarget: if true never attack or target this entity noknockback: if true no knockback from hits takedamage: if true this entity can be damaged hidden: if true this entity is not visible bindOrientated: if true both the master orientation is used for binding solidForTeam: if true this entity is considered solid when a physics team mate pushes entities forcePhysicsUpdate: if true always update from the physics whether the object moved or not selected: if true the entity is selected for editing neverDormant: if true the entity never goes dormant isDormant: if true the entity is dormant hasAwakened: before a monster has been awakened the first time, use full PVS for dormant instead of area-connected invisible: if true this entity cannot be seen inaudible: if true this entity cannot be heard
:Spawnclasses responding to this event: ''idEntity''
==== 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 '''GetFractionalPosition'''(); ====
:Returns a fraction between 0.00 (closed) and 1.00 (open).
:Spawnclasses responding to this event: ''CBinaryFrobMover''
==== 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: ''idEntity''
==== 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 '''getLocationPoint'''(vector point); ====
:Returns the idLocation entity corresponding to the specified point's location.
::''point'': point whose location to check
:Spawnclasses responding to this event: ''idThread''
==== 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. Updates only when AI lose sight of player 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 secretsFound: number of secrets found by the player secretsTotal: total number of secrets in the mission
: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 entity '''getNextEntity'''(string key, string value, entity lastMatch); ====
:Discover all entities in the map. Returns $null_entity when no more found.
::''key'': Optional string: prefix for spawnarg key match. E.g. "target" will match "target", "target1" etc.
::''value'': Optional string: spawnarg value to match. Can be used independently of ''key''. If ''key'' is not set, all spawnargs will be checked for the value.
::''lastMatch'': Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
:Spawnclasses responding to this event: ''idThread''
==== 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 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 '''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 float '''getObjectiveVisible'''(float ObjNum); ====
:Returns the current visibility of the objective with the number ObjNum.
::''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 tdm_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 '''getSecurityCameraState'''(); ====
:Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent string '''getShader'''(); ====
:Gets the shader name used by the light.
:Spawnclasses responding to this event: ''idLight''
==== 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 '''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 entity '''getSpotLight'''(); ====
:Returns the spotlight used by the camera. Returns null_entity if none is used.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== 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 string '''getTraceSurfType'''(); ====
:Returns the type of the surface (i.e. metal, snow) which was hit 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 '''getVectorToIdealOrigin'''(); ====
:Returns the vector from where the AI is to where he ideally should be
:Spawnclasses responding to this event: ''idAI''
==== 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 '''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 '''isLeaning'''(); ====
:Get whether the player is leaning
:Spawnclasses responding to this event: ''idPlayer''
==== 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 '''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, but be sure to give it the topmost bindmaster
: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'', ''idSecurityCamera'', ''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'', ''idSecurityCamera'', ''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); ====
:Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. Plays the given animation on the given channel. Returns false if anim doesn't exist.
:Spawnclasses responding to this event: ''idActor'', ''idWeapon''
==== scriptEvent float '''playCustomAnim'''(string animName); ====
:Plays the given animation on legs and torso. Returns false if anim doesn't exist.
:Spawnclasses responding to this event: ''idAI''
==== 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 '''pointIsInBounds'''(vector point, vector mins, vector maxs); ====
:Returns true if the point is within the bounds specified.
::''point'': test whether this point is in the bounds
::''mins'': minimal corner of the bounds
::''maxs'': maximal corner of the bounds
: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 '''projectDecal'''(vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle); ====
:Performs a trace from the specified origin and end positions, then projects a decal in that direction.
::''traceOrigin'': Start of the trace.
::''traceEnd'': End of the trace.
::''passEntity'': This entity will be considered non-solid by the trace.
::''decal'': Decal to be projected.
::''decalSize'': Size of the decal quad.
::''angle'': Angle of the decal quad.
:Spawnclasses responding to this event: ''idThread''
==== 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 '''reskinCollisionModel'''(); ====
:For use after setSkin() on moveables and static models, if the CM needs to be refreshed to update surface properties after a skin change. CM will be regenerated from the original model file with the new skin.
:Spawnclasses responding to this event: ''idEntity''
==== 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 '''saveConDump'''(string cmd, string cmd); ====
:Saves condump into FM directory; first argument is appended to dump filename, everything before last occurence of second argument is removed
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''saveGame'''(string filename); ====
:No description
:Spawnclasses responding to this event: ''idPlayer''
==== 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: ''idEntity''
==== 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 '''setPeekOverlayBackground'''(); ====
:Sets the background overlay for peeking, depending on aspect ratio.
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setPeekView'''(float OnOff, vector origin); ====
:Toggle whether we should use a view from a peek entity as the player's view
:Spawnclasses responding to this event: ''idPlayer''
==== 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 '''setSavePermissions'''(float permission); ====
:No description
::''permission'': 0
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent void '''setSecretsFound'''(float secrets); ====
:Set how many secrets the player has found. Use getMissionStatistic() for getting the current value.
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent void '''setSecretsTotal'''(float secrets); ====
:Set how many secrets exist in the map in total. Use getMissionStatistic() for getting the current value.
:Spawnclasses responding to this event: ''idThread''
==== 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 '''setSightThreshold'''(float sightThreshold); ====
:Set the sight threshold of the security camera: how lit up the player's lightgem needs to be in order to be seen. 0.0 to 1.0
:Spawnclasses responding to this event: ''idSecurityCamera''
==== 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 '''setSolid'''(float solidity); ====
:Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks.
:Spawnclasses responding to this event: ''idEntity''
==== 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 '''setSpyglassOverlayBackground'''(); ====
:Sets the background overlay for the spyglass, depending on aspect ratio.
:Spawnclasses responding to this event: ''idPlayer''
==== 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 '''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 '''state_light'''(float set); ====
:Switches the spotlight on or off. Respects the security camera's power state.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_AI'''(float set); ====
:Set whether the camera can see AIs.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_animals'''(float set); ====
:Set whether the camera can see animals. Checked after seeAI or seeBodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_bodies'''(float set); ====
:Set whether the camera can see bodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_see_player'''(float set); ====
:Set whether the camera can see the player.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''state_sweep'''(float set); ====
:Enables or disables the camera's sweeping.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== 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 '''stopPatrol'''(); ====
:Stops an AI from patrolling
:Spawnclasses responding to this event: ''idAI''
==== 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 float '''strFind'''(string text, string find, float casesensitive, float start, float end); ====
:Return the position of the given substring, counting from 0, or -1 if not found.
::''casesensitive'': 0
::''start'': 0
::''end'': -1
:Spawnclasses responding to this event: ''idThread''
==== 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 '''strRemove'''(string text, string remove); ====
:Replace all occurances of the given substring with "". Example: StrRemove("abba","bb") results in "aa".
:Spawnclasses responding to this event: ''idThread''
==== scriptEvent string '''strReplace'''(string text, string remove, string replace); ====
:Replace all occurances of the given string with the replacement string. Example: StrRemove("abba","bb","ccc") results in "accca".
: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 '''testEvent1'''(float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food); ====
:No description
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent entity '''testEvent2'''(float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp); ====
:No description
:Spawnclasses responding to this event: ''idPlayer''
==== scriptEvent vector '''testEvent3'''(entity ent_prevres, vector vec_123, float float_pi, entity ent_player); ====
:No description
:Spawnclasses responding to this event: ''idPlayer''
==== 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 '''toggle_light'''(); ====
:Toggles the spotlight on/off.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_AI'''(); ====
:Toggles whether the camera can see AIs.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_animals'''(); ====
:Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_bodies'''(); ====
:Toggles whether the camera can see bodies.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_see_player'''(); ====
:Toggles whether the camera can see the player.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== scriptEvent void '''toggle_sweep'''(); ====
:Toggles the camera sweep.
:Spawnclasses responding to this event: ''idSecurityCamera''
==== 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 '''VecRotate'''(vector vector, vector angles); ====
:Rotates a vector by the specified angles.
: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 ==
=== idClass ===
==== scriptEvent void '''remove'''(); ====
:Removes the entity from the game. For AI, use kill() instead.
=== 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 '''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); ====
:Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. 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 '''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 entity '''closestReachableEnemy'''(); ====
:Used for determining tactile alert targets
==== scriptEvent entity '''closestReachableEnemyOfEntity'''(entity team_mate); ====
:Finds another character's closest reachable enemy
==== 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 '''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 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 '''getVectorToIdealOrigin'''(); ====
:Returns the vector from where the AI is to where he ideally should be
==== 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 float '''playCustomAnim'''(string animName); ====
:Plays the given animation on legs and torso. Returns false if anim doesn't exist.
==== 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 '''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 void '''stopMove'''(); ====
:no description
==== scriptEvent void '''stopPatrol'''(); ====
:Stops an AI from patrolling
==== 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 '''GetFractionalPosition'''(); ====
:Returns a fraction between 0.00 (closed) and 1.00 (open).
==== 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 '''applyImpulse'''(entity source, float bodyid, vector point, vector impulse); ====
:Applies an impulse to the entity. Example: entity.applyImpulse($player1, 0, entity.getOrigin(), '0 0 2');
::''source'': Pass $null_entity or the entity that applies the impulse
::''bodyid'': For articulated figures, ID of the body, 0 for the first (main) body. Otherwise use 0.
::''point'': Point on the body where the impulse is applied to
::''impulse'': Vector of the impulse
==== 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 float '''getEntityFlag'''(string flagName); ====
:Returns the value of the specified entity flag.
::''flagName'': Can be one of (case insensitive): notarget: if true never attack or target this entity noknockback: if true no knockback from hits takedamage: if true this entity can be damaged hidden: if true this entity is not visible bindOrientated: if true both the master orientation is used for binding solidForTeam: if true this entity is considered solid when a physics team mate pushes entities forcePhysicsUpdate: if true always update from the physics whether the object moved or not selected: if true the entity is selected for editing neverDormant: if true the entity never goes dormant isDormant: if true the entity is dormant hasAwakened: before a monster has been awakened the first time, use full PVS for dormant instead of area-connected invisible: if true this entity cannot be seen inaudible: if true this entity cannot be heard
==== 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 '''getHealth'''(); ====
:Returns the current health.
==== 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, but be sure to give it the topmost bindmaster
==== 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 '''reskinCollisionModel'''(); ====
:For use after setSkin() on moveables and static models, if the CM needs to be refreshed to update surface properties after a skin change. CM will be regenerated from the original model file with the new skin.
==== 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 '''setHealth'''(float health); ====
:Use these to set the health of AI or players (this also updates the AI_DEAD flag)
==== 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 '''setSolid'''(float solidity); ====
:Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks.
==== 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)
=== 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 string '''getShader'''(); ====
:Gets the shader name used by the light.
==== 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
=== idListener ===
==== 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)
=== 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 float '''getCalibratedLightgemValue'''(); ====
:Returns the calibrated light gem value.
==== 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 float '''getObjectiveVisible'''(float ObjNum); ====
:Returns the current visibility of the objective with the number ObjNum.
::''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 float '''isLeaning'''(); ====
:Get whether the player is leaning
==== 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 '''saveGame'''(string filename); ====
:No description
==== 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 '''setPeekOverlayBackground'''(); ====
:Sets the background overlay for peeking, depending on aspect ratio.
==== scriptEvent void '''setPeekView'''(float OnOff, vector origin); ====
:Toggle whether we should use a view from a peek entity as the player's view
==== scriptEvent void '''setSavePermissions'''(float permission); ====
:No description
::''permission'': 0
==== scriptEvent void '''setSpyglassOverlayBackground'''(); ====
:Sets the background overlay for the spyglass, depending on aspect ratio.
==== 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 float '''testEvent1'''(float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food); ====
:No description
==== scriptEvent entity '''testEvent2'''(float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp); ====
:No description
==== scriptEvent vector '''testEvent3'''(entity ent_prevres, vector vec_123, float float_pi, entity ent_player); ====
: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 tdm_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 float '''acos'''(float cosine); ====
:Returns the angle in degrees with the given cosine.
==== 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 float '''asin'''(float sine); ====
:Returns the angle in degrees with the given sine.
==== 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 '''debug_tdm_material'''(string file); ====
:For temporary debuging purposes only. Should be removed eventually.
==== 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 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 float '''emitParticle'''(string particle, float startTime, float diversity, vector origin, vector angle); ====
:Start a particle effect in the world without using an entity emitter. Will emit one quad per particle stage when first called with sys.getTime() as the start time. Designed to be called once per frame with the same startTime each call to achieve a normal particle effect, or on demand with sys.getTime() as the startTime for finer grained control, 1 quad at a time. Returns True (1) if there are more particles to be emitted from the stage, False (0) if the stage has released all its quads.
::''particle'': String: name of particle effect.
::''startTime'': Game seconds since map start: use sys.getTime() for the first call unless you want to back-date the particle so that it starts part way through its cycle.
::''diversity'': Randomizer value between 0 and 1. All particles with the same diversity will have the same path and rotation. Use sys.random(1) for a random path.
::''origin'': Origin of the particle effect.
::''angle'': Axis for the particle effect. Use $<entityname>.getAngles() to align the particle to an entity. use '0 0 0' for an upright (world-aligned) particle effect.
==== 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 '''getLocationPoint'''(vector point); ====
:Returns the idLocation entity corresponding to the specified point's location.
::''point'': point whose location to check
==== 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. Updates only when AI lose sight of player 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 secretsFound: number of secrets found by the player secretsTotal: total number of secrets in the mission
==== scriptEvent entity '''getNextEntity'''(string key, string value, entity lastMatch); ====
:Discover all entities in the map. Returns $null_entity when no more found.
::''key'': Optional string: prefix for spawnarg key match. E.g. "target" will match "target", "target1" etc.
::''value'': Optional string: spawnarg value to match. Can be used independently of ''key''. If ''key'' is not set, all spawnargs will be checked for the value.
::''lastMatch'': Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
==== 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 string '''getTraceSurfType'''(); ====
:Returns the type of the surface (i.e. metal, snow) which was hit 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 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 '''pointIsInBounds'''(vector point, vector mins, vector maxs); ====
:Returns true if the point is within the bounds specified.
::''point'': test whether this point is in the bounds
::''mins'': minimal corner of the bounds
::''maxs'': maximal corner of the bounds
==== 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 '''projectDecal'''(vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle); ====
:Performs a trace from the specified origin and end positions, then projects a decal in that direction.
::''traceOrigin'': Start of the trace.
::''traceEnd'': End of the trace.
::''passEntity'': This entity will be considered non-solid by the trace.
::''decal'': Decal to be projected.
::''decalSize'': Size of the decal quad.
::''angle'': Angle of the decal quad.
==== 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 '''saveConDump'''(string cmd, string cmd); ====
:Saves condump into FM directory; first argument is appended to dump filename, everything before last occurence of second argument is removed
==== 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 '''setSecretsFound'''(float secrets); ====
:Set how many secrets the player has found. Use getMissionStatistic() for getting the current value.
==== scriptEvent void '''setSecretsTotal'''(float secrets); ====
:Set how many secrets exist in the map in total. Use getMissionStatistic() for getting the current value.
==== 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 float '''strFind'''(string text, string find, float casesensitive, float start, float end); ====
:Return the position of the given substring, counting from 0, or -1 if not found.
::''casesensitive'': 0
::''start'': 0
::''end'': -1
==== 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 '''strRemove'''(string text, string remove); ====
:Replace all occurances of the given substring with "". Example: StrRemove("abba","bb") results in "aa".
==== scriptEvent string '''strReplace'''(string text, string remove, string replace); ====
:Replace all occurances of the given string with the replacement string. Example: StrRemove("abba","bb","ccc") results in "accca".
==== 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 '''VecRotate'''(vector vector, vector angles); ====
:Rotates a vector by the specified angles.
==== 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.
=== idSecurityCamera ===
==== scriptEvent float '''canSee'''(entity ent); ====
:no description
==== scriptEvent entity '''getEnemy'''(); ====
:no description
==== scriptEvent float '''getSecurityCameraState'''(); ====
:Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
==== scriptEvent entity '''getSpotLight'''(); ====
:Returns the spotlight used by the camera. Returns null_entity if none is used.
==== scriptEvent void '''Off'''(); ====
:Turns the entity off.
==== scriptEvent void '''On'''(); ====
:Turns the entity on.
==== scriptEvent void '''setSightThreshold'''(float sightThreshold); ====
:Set the sight threshold of the security camera: how lit up the player's lightgem needs to be in order to be seen. 0.0 to 1.0
==== scriptEvent void '''state_light'''(float set); ====
:Switches the spotlight on or off. Respects the security camera's power state.
==== scriptEvent void '''state_see_AI'''(float set); ====
:Set whether the camera can see AIs.
==== scriptEvent void '''state_see_animals'''(float set); ====
:Set whether the camera can see animals. Checked after seeAI or seeBodies.
==== scriptEvent void '''state_see_bodies'''(float set); ====
:Set whether the camera can see bodies.
==== scriptEvent void '''state_see_player'''(float set); ====
:Set whether the camera can see the player.
==== scriptEvent void '''state_sweep'''(float set); ====
:Enables or disables the camera's sweeping.
==== scriptEvent void '''toggle_light'''(); ====
:Toggles the spotlight on/off.
==== scriptEvent void '''toggle_see_AI'''(); ====
:Toggles whether the camera can see AIs.
==== scriptEvent void '''toggle_see_animals'''(); ====
:Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
==== scriptEvent void '''toggle_see_bodies'''(); ====
:Toggles whether the camera can see bodies.
==== scriptEvent void '''toggle_see_player'''(); ====
:Toggles whether the camera can see the player.
==== scriptEvent void '''toggle_sweep'''(); ====
:Toggles the camera sweep.
=== 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)
=== CTarget_ItemRemove ===
==== 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 ===
=== idWeapon ===
This page has been generated automatically by the tdm_gen_script_event_doc console command.
Generated by The Dark Mod 2.14, code revision 11087, last update: 2026-01-14 19:24
General utility functions not related to specific entities are listed under idThread. They're accessed in scripts using the dummy "sys" object, e.g. sys.waitFrame() , or float brown_position = sys.strFind("The quick brown fox", "brown", 0, 0, -1) .
Contents
1 TDM Script Event Reference
1.1 All Events
1.1.1 Alphabetic List
1.1.1.1 scriptEvent void accelSound (string sound);
1.1.1.2 scriptEvent void accelTime (float time);
1.1.1.3 scriptEvent void accelTo (float speed, float time);
1.1.1.4 scriptEvent float acos (float cosine);
1.1.1.5 scriptEvent void activate (entity activator);
1.1.1.6 scriptEvent void activateContacts ();
1.1.1.7 scriptEvent void activateTargets (entity activator);
1.1.1.8 scriptEvent void addDescendant (entity vine);
1.1.1.9 scriptEvent void addFrobPeer (entity peer);
1.1.1.10 scriptEvent void addInvItem (entity inv_item);
1.1.1.11 scriptEvent void addItemToInv (entity target);
1.1.1.12 scriptEvent void addTarget (entity target);
1.1.1.13 scriptEvent void addToClip (float amount);
1.1.1.14 scriptEvent void alert (string type, float val);
1.1.1.15 scriptEvent void alertAI (string type, float amount, entity actor);
1.1.1.16 scriptEvent void allowDamage ();
1.1.1.17 scriptEvent void allowDrop (float allow);
1.1.1.18 scriptEvent void allowHiddenMovement (float enable);
1.1.1.19 scriptEvent void allowMovement (float allow);
1.1.1.20 scriptEvent float ammoAvailable ();
1.1.1.21 scriptEvent float ammoInClip ();
1.1.1.22 scriptEvent vector angRotate (vector angles1, vector angles2);
1.1.1.23 scriptEvent vector angToForward (vector angles);
1.1.1.24 scriptEvent vector angToRight (vector angles);
1.1.1.25 scriptEvent vector angToUp (vector angles);
1.1.1.26 scriptEvent float animDistance (float channel, string animName);
1.1.1.27 scriptEvent float animDone (float channel, float blendOutFrames);
1.1.1.28 scriptEvent float animIsPaused (float channel);
1.1.1.29 scriptEvent float animLength (float channel, string animName);
1.1.1.30 scriptEvent void animState (float channel, string stateFunction, float blendFrame);
1.1.1.31 scriptEvent void animTurn (float angle);
1.1.1.32 scriptEvent void applyImpulse (entity source, float bodyid, vector point, vector impulse);
1.1.1.33 scriptEvent float asin (float sine);
1.1.1.34 scriptEvent void assert (float condition);
1.1.1.35 scriptEvent void attach (entity ent, string attName);
1.1.1.36 scriptEvent void attachToPos (entity ent, string position, string attName);
1.1.1.37 scriptEvent void attack (entity enemy, float ignoreCollisions);
1.1.1.38 scriptEvent void attackBegin (string damageDef);
1.1.1.39 scriptEvent void attackEnd ();
1.1.1.40 scriptEvent float attackMelee (string damageDef);
1.1.1.41 scriptEvent entity attackMissile (string jointName);
1.1.1.42 scriptEvent void attackPosition (vector targetPos, float ignoreCollisions);
1.1.1.43 scriptEvent void bark (string sound);
1.1.1.44 scriptEvent void becomeNonSolid ();
1.1.1.45 scriptEvent float becomeRagdoll ();
1.1.1.46 scriptEvent void becomeSolid ();
1.1.1.47 scriptEvent void bind (entity master);
1.1.1.48 scriptEvent void bindPosition (entity master);
1.1.1.49 scriptEvent void bindToBody (entity master, float bodyID, float orientated);
1.1.1.50 scriptEvent void bindToJoint (entity master, string boneName, float rotateWithMaster);
1.1.1.51 scriptEvent void bob (float speed, float phase, vector distance);
1.1.1.52 scriptEvent void burn ();
1.1.1.53 scriptEvent void cacheSoundShader (string shaderName);
1.1.1.54 scriptEvent void callFunction (string functionName);
1.1.1.55 scriptEvent void callFunctionsByWildcard (string functionName);
1.1.1.56 scriptEvent void callGlobalFunction (string functionName, entity other);
1.1.1.57 scriptEvent void callGui (float handle, string namedEvent);
1.1.1.58 scriptEvent float canBecomeSolid ();
1.1.1.59 scriptEvent float canBeUsedBy (entity ent);
1.1.1.60 scriptEvent float canHitEnemy ();
1.1.1.61 scriptEvent float canHitEnemyFromAnim (string anim);
1.1.1.62 scriptEvent float canHitEnemyFromJoint (string jointname);
1.1.1.63 scriptEvent float canPlant (vector traceStart, vector traceEnd, entity ignore, entity vine);
1.1.1.64 scriptEvent float canReachEnemy ();
1.1.1.65 scriptEvent float canReachEntity (entity ent);
1.1.1.66 scriptEvent float canReachPosition (vector pos);
1.1.1.67 scriptEvent float canSee (entity ent);
1.1.1.68 scriptEvent float canSeeEntity (entity target, float useLighting);
1.1.1.69 scriptEvent float canSeeExt (entity ent, float b_useFOV, float b_useLighting);
1.1.1.70 scriptEvent float canSeePositionExt (vector position, float b_useFOV, float b_useLighting);
1.1.1.71 scriptEvent float canWater ();
1.1.1.72 scriptEvent float ceil (float x);
1.1.1.73 scriptEvent void changeEntityRelation (entity ent, float relationChange);
1.1.1.74 scriptEvent void changeInvIcon (string name, string category, string icon);
1.1.1.75 scriptEvent void changeInvItemCount (string name, string category, float amount);
1.1.1.76 scriptEvent void changeInvLightgemModifier (string name, string category, float amount);
1.1.1.77 scriptEvent float changeLootAmount (float type, float amount);
1.1.1.78 scriptEvent void changeWeaponName (string weaponName, string displayName);
1.1.1.79 scriptEvent void changeWeaponProjectile (string weaponName, string projectileDefName);
1.1.1.80 scriptEvent void chargeAttack (string damageDef);
1.1.1.81 scriptEvent void checkAAS ();
1.1.1.82 scriptEvent void checkAbsence ();
1.1.1.83 scriptEvent void checkAnim (float channel, string animName);
1.1.1.84 scriptEvent string chooseAnim (float channel, string animName);
1.1.1.85 scriptEvent void clearActiveInventoryMap ();
1.1.1.86 scriptEvent void clearActiveInventoryMapEnt ();
1.1.1.87 scriptEvent void clearAllJoints ();
1.1.1.88 scriptEvent void clearBurn ();
1.1.1.89 scriptEvent void clearController ();
1.1.1.90 scriptEvent void clearEnemy ();
1.1.1.91 scriptEvent void clearFlyOffset ();
1.1.1.92 scriptEvent void clearJoint (float jointnum);
1.1.1.93 scriptEvent void clearMouseDeadTime ();
1.1.1.94 scriptEvent void clearPersistentArgs ();
1.1.1.95 scriptEvent void clearSignal (float signalNum);
1.1.1.96 scriptEvent void clearSignalThread (float signalNum, entity ent);
1.1.1.97 scriptEvent void clearWatered ();
1.1.1.98 scriptEvent float clipSize ();
1.1.1.99 scriptEvent void Close ();
1.1.1.100 scriptEvent void closePortal ();
1.1.1.101 scriptEvent entity closestEnemyToPoint (vector point);
1.1.1.102 scriptEvent entity closestReachableEnemy ();
1.1.1.103 scriptEvent entity closestReachableEnemyOfEntity (entity team_mate);
1.1.1.104 scriptEvent void copyBind (entity other);
1.1.1.105 scriptEvent void copySpawnArgs (entity ent);
1.1.1.106 scriptEvent float cos (float degrees);
1.1.1.107 scriptEvent entity createMissile (string jointname);
1.1.1.108 scriptEvent entity createMissileFromDef (string defName, string jointName);
1.1.1.109 scriptEvent float createOverlay (string guiFile, float layer);
1.1.1.110 scriptEvent entity createProjectile ();
1.1.1.111 scriptEvent void CreateTimer (float stimId, float hour, float minutes, float seconds, float milliseconds);
1.1.1.112 scriptEvent float createXrayOverlay (string guiFile);
1.1.1.113 scriptEvent vector CrossProduct (vector vec1, vector vec2);
1.1.1.114 scriptEvent void cullAll ();
1.1.1.115 scriptEvent void customDeath ();
1.1.1.116 scriptEvent void damage (entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale);
1.1.1.117 scriptEvent void dampenSound (float dampen);
1.1.1.118 scriptEvent void deathMenu ();
1.1.1.119 scriptEvent void debugArrow (vector color, vector start, vector end, float size, float lifetime);
1.1.1.120 scriptEvent void debugBounds (vector color, vector mins, vector maxs, float lifetime);
1.1.1.121 scriptEvent void debugCircle (vector color, vector origin, vector dir, float radius, float numSteps, float lifetime);
1.1.1.122 scriptEvent void debugLine (vector color, vector start, vector end, float lifetime);
1.1.1.123 scriptEvent void decelSound (string sound);
1.1.1.124 scriptEvent void decelTime (float time);
1.1.1.125 scriptEvent void decelTo (float speed, float time);
1.1.1.126 scriptEvent void destroyOverlay (float handle);
1.1.1.127 scriptEvent void directDamage (entity damageTarget, string damageDef);
1.1.1.128 scriptEvent void disable ();
1.1.1.129 scriptEvent void disableAFPush ();
1.1.1.130 scriptEvent void disableAnimchannel (float channel);
1.1.1.131 scriptEvent void disableClip ();
1.1.1.132 scriptEvent void disableEyeFocus ();
1.1.1.133 scriptEvent void disableGravity ();
1.1.1.134 scriptEvent void DisableLegIK (float num);
1.1.1.135 scriptEvent void disableManualAttack ();
1.1.1.136 scriptEvent void disablePain ();
1.1.1.137 scriptEvent void disableSplineAngles ();
1.1.1.138 scriptEvent void DisableWalkIK ();
1.1.1.139 scriptEvent void disableWeapon ();
1.1.1.140 scriptEvent float distanceTo (entity other);
1.1.1.141 scriptEvent float distanceToPoint (vector point);
1.1.1.142 scriptEvent float DotProduct (vector vec1, vector vec2);
1.1.1.143 scriptEvent void drawText (string text, vector origin, float scale, vector color, float align, float lifetime);
1.1.1.144 scriptEvent void dropAttachment (string attName);
1.1.1.145 scriptEvent void dropAttachmentInd (float index);
1.1.1.146 scriptEvent void dropTorch ();
1.1.1.147 scriptEvent void ejectBrass ();
1.1.1.148 scriptEvent float emitParticle (string particle, float startTime, float diversity, vector origin, vector angle);
1.1.1.149 scriptEvent void emitterAddModel (string modelName, vector modelOffset);
1.1.1.150 scriptEvent float emitterGetNumModels ();
1.1.1.151 scriptEvent void emptyHand (string hand);
1.1.1.152 scriptEvent void enable ();
1.1.1.153 scriptEvent void enableAFPush ();
1.1.1.154 scriptEvent void enableAnim (float channel, float blendFrames);
1.1.1.155 scriptEvent void enableClip ();
1.1.1.156 scriptEvent void enableDamage (float enable);
1.1.1.157 scriptEvent void enableEyeFocus ();
1.1.1.158 scriptEvent void enableGravity ();
1.1.1.159 scriptEvent void EnableLegIK (float num);
1.1.1.160 scriptEvent void enablePain ();
1.1.1.161 scriptEvent void enableSplineAngles ();
1.1.1.162 scriptEvent void EnableWalkIK ();
1.1.1.163 scriptEvent void enableWeapon ();
1.1.1.164 scriptEvent float endState ();
1.1.1.165 scriptEvent void endZoom (float duration);
1.1.1.166 scriptEvent float enemyInCombatCone (entity combatNode, float use_current_enemy_location);
1.1.1.167 scriptEvent float enemyPositionValid ();
1.1.1.168 scriptEvent float enemyRange ();
1.1.1.169 scriptEvent float enemyRange2D ();
1.1.1.170 scriptEvent float entityInAttackCone (entity ent);
1.1.1.171 scriptEvent void error (string text);
1.1.1.172 scriptEvent void exitTeleporter ();
1.1.1.173 scriptEvent void extinguishLights ();
1.1.1.174 scriptEvent void faceEnemy ();
1.1.1.175 scriptEvent void faceEntity (entity ent);
1.1.1.176 scriptEvent float facingIdeal ();
1.1.1.177 scriptEvent void fadeIn (vector color, float time);
1.1.1.178 scriptEvent void fadeInLight (float time);
1.1.1.179 scriptEvent void fadeOut (vector color, float time);
1.1.1.180 scriptEvent void fadeOutLight (float time);
1.1.1.181 scriptEvent void fadeSound (float channel, float newLevel, float fadeTime);
1.1.1.182 scriptEvent void fadeTo (vector color, float alpha, float time);
1.1.1.183 scriptEvent void fadeToLight (vector color, float time);
1.1.1.184 scriptEvent entity findActorsInBounds (vector mins, vector maxs);
1.1.1.185 scriptEvent entity findEnemy (float onlyInFov);
1.1.1.186 scriptEvent entity findEnemyAI (float onlyInFov);
1.1.1.187 scriptEvent entity findEnemyInCombatNodes ();
1.1.1.188 scriptEvent entity findFriendlyAI (float team);
1.1.1.189 scriptEvent void finishAction (string action);
1.1.1.190 scriptEvent void finishChannelAction (float channel, string animname);
1.1.1.191 scriptEvent entity fireMissileAtTarget (string jointname, string targetname);
1.1.1.192 scriptEvent void firstPerson ();
1.1.1.193 scriptEvent void flashlight (float enable);
1.1.1.194 scriptEvent void flee (entity entToFleeFrom);
1.1.1.195 scriptEvent void fleeFromPoint (vector pos);
1.1.1.196 scriptEvent float floor (float x);
1.1.1.197 scriptEvent void footstep ();
1.1.1.198 scriptEvent void foundBody (entity body);
1.1.1.199 scriptEvent float frob ();
1.1.1.200 scriptEvent void frobHilight (float state);
1.1.1.201 scriptEvent void frobRidable (entity playerController);
1.1.1.202 scriptEvent void Gas_Knockout (entity inflictor);
1.1.1.203 scriptEvent entity getActualStruckEnt ();
1.1.1.204 scriptEvent float getAcuity (string type);
1.1.1.205 scriptEvent entity getAlertActor ();
1.1.1.206 scriptEvent float getAlertLevelOfOtherAI (entity otherEntity);
1.1.1.207 scriptEvent vector getAngles ();
1.1.1.208 scriptEvent vector getAngularVelocity ();
1.1.1.209 scriptEvent vector getAngularVelocityB (float id);
1.1.1.210 scriptEvent string getAnimList (float channel);
1.1.1.211 scriptEvent float getAnimRate (float channel, string animName);
1.1.1.212 scriptEvent string getAnimState (float channel);
1.1.1.213 scriptEvent entity getAttachment (string attName);
1.1.1.214 scriptEvent entity getAttachmentInd (float index);
1.1.1.215 scriptEvent entity getAttacker ();
1.1.1.216 scriptEvent float getAttackFlag (float combatType);
1.1.1.217 scriptEvent float getAudThresh ();
1.1.1.218 scriptEvent vector getAxialDir ();
1.1.1.219 scriptEvent entity getBindChild (float ind);
1.1.1.220 scriptEvent entity getBindMaster ();
1.1.1.221 scriptEvent float getBlendFrames (float channel);
1.1.1.222 scriptEvent float getBoolKey (string key);
1.1.1.223 scriptEvent float getButtons ();
1.1.1.224 scriptEvent float getCalibratedLightgemValue ();
1.1.1.225 scriptEvent float getClipMask ();
1.1.1.226 scriptEvent entity getClosestHiddenTarget (string entity_type);
1.1.1.227 scriptEvent vector getColor ();
1.1.1.228 scriptEvent entity getCombatNode ();
1.1.1.229 scriptEvent float getContents ();
1.1.1.230 scriptEvent string getCurInvCategory ();
1.1.1.231 scriptEvent string getCurInvIcon ();
1.1.1.232 scriptEvent float getCurInvItemCount ();
1.1.1.233 scriptEvent entity getCurInvItemEntity ();
1.1.1.234 scriptEvent string getCurInvItemId ();
1.1.1.235 scriptEvent string getCurInvItemName ();
1.1.1.236 scriptEvent float getCurrentMissionNum ();
1.1.1.237 scriptEvent string getCurrentWeapon ();
1.1.1.238 scriptEvent float getCurrentYaw ();
1.1.1.239 scriptEvent string getCurWeaponName ();
1.1.1.240 scriptEvent string getcvar (string name);
1.1.1.241 scriptEvent float getcvarf (string name);
1.1.1.242 scriptEvent float getDifficultyLevel ();
1.1.1.243 scriptEvent string getDifficultyName (float difficultyLevel);
1.1.1.244 scriptEvent entity GetDoor ();
1.1.1.245 scriptEvent entity GetDoorhandle ();
1.1.1.246 scriptEvent entity getDragged ();
1.1.1.247 scriptEvent entity getEnemy ();
1.1.1.248 scriptEvent vector getEnemyEyePos ();
1.1.1.249 scriptEvent vector getEnemyPos ();
1.1.1.250 scriptEvent entity getEntity (string name);
1.1.1.251 scriptEvent float getEntityFlag (string flagName);
1.1.1.252 scriptEvent entity getEntityKey (string key);
1.1.1.253 scriptEvent vector getEyePos ();
1.1.1.254 scriptEvent vector getFinalAngVel ();
1.1.1.255 scriptEvent vector getFinalVel ();
1.1.1.256 scriptEvent float getFloatKey (string key);
1.1.1.257 scriptEvent float getFov ();
1.1.1.258 scriptEvent float GetFractionalPosition ();
1.1.1.259 scriptEvent float getFrameTime ();
1.1.1.260 scriptEvent entity getFrobbed ();
1.1.1.261 scriptEvent entity getGrabbed ();
1.1.1.262 scriptEvent string getGui (float handle);
1.1.1.263 scriptEvent float getGuiFloat (float handle, string key);
1.1.1.264 scriptEvent float getGuiInt (float handle, string key);
1.1.1.265 scriptEvent string getGuiString (float handle, string key);
1.1.1.266 scriptEvent entity getHead ();
1.1.1.267 scriptEvent float getHealth ();
1.1.1.268 scriptEvent vector getHinderance (string source);
1.1.1.269 scriptEvent string getIdealWeapon ();
1.1.1.270 scriptEvent float getImmobilization (string source);
1.1.1.271 scriptEvent float getIncidenceAngle ();
1.1.1.272 scriptEvent float getInterceptTime (vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor);
1.1.1.273 scriptEvent float getIntKey (string key);
1.1.1.274 scriptEvent float getInventoryOverlay ();
1.1.1.275 scriptEvent vector getJointAngle (float jointnum);
1.1.1.276 scriptEvent float getJointHandle (string jointname);
1.1.1.277 scriptEvent vector getJointPos (float jointnum);
1.1.1.278 scriptEvent vector getJumpVelocity (vector pos, float speed, float max_jump_height);
1.1.1.279 scriptEvent string getKey (string key);
1.1.1.280 scriptEvent vector getLightInPVS (float falloff, float scaling);
1.1.1.281 scriptEvent float getLightLevel ();
1.1.1.282 scriptEvent vector getLightOrigin ();
1.1.1.283 scriptEvent float getLightParm (float parmNum);
1.1.1.284 scriptEvent vector getLinearVelocity ();
1.1.1.285 scriptEvent vector getLinearVelocityB (float id);
1.1.1.286 scriptEvent vector getListenLoc ();
1.1.1.287 scriptEvent entity getLocation ();
1.1.1.288 scriptEvent entity getLocationPoint (vector point);
1.1.1.289 scriptEvent entity GetLock ();
1.1.1.290 scriptEvent float getLootAmount (float type);
1.1.1.291 scriptEvent entity getMainAmbientLight ();
1.1.1.292 scriptEvent float getMass (float body);
1.1.1.293 scriptEvent float getMaxHealth ();
1.1.1.294 scriptEvent vector getMaxs ();
1.1.1.295 scriptEvent float getMeleeActPhase ();
1.1.1.296 scriptEvent float getMeleeActState ();
1.1.1.297 scriptEvent float getMeleeActType ();
1.1.1.298 scriptEvent float getMeleeLastActTime ();
1.1.1.299 scriptEvent float getMeleeLastHitByType ();
1.1.1.300 scriptEvent float getMeleeResult ();
1.1.1.301 scriptEvent vector getMins ();
1.1.1.302 scriptEvent float getMissionStatistic (string statisticName);
1.1.1.303 scriptEvent float getMouseGesture ();
1.1.1.304 scriptEvent vector getMove ();
1.1.1.305 scriptEvent string getMoveAnim ();
1.1.1.306 scriptEvent float getMoveSpeed ();
1.1.1.307 scriptEvent float getMoveTime ();
1.1.1.308 scriptEvent float getMoveType ();
1.1.1.309 scriptEvent string getName ();
1.1.1.310 scriptEvent entity getNextEnemy (entity lastMatch);
1.1.1.311 scriptEvent entity getNextEntity (string key, string value, entity lastMatch);
1.1.1.312 scriptEvent string getNextHinderance (string prefix, string lastMatch);
1.1.1.313 scriptEvent string getNextIdleAnim ();
1.1.1.314 scriptEvent string getNextImmobilization (string prefix, string lastMatch);
1.1.1.315 scriptEvent entity getNextInvItem ();
1.1.1.316 scriptEvent string getNextKey (string prefix, string lastMatch);
1.1.1.317 scriptEvent string getNextTurnHinderance (string prefix, string lastMatch);
1.1.1.318 scriptEvent float getNumAttachments ();
1.1.1.319 scriptEvent float getNumBodies ();
1.1.1.320 scriptEvent float getNumMeleeWeapons ();
1.1.1.321 scriptEvent float getNumRangedWeapons ();
1.1.1.322 scriptEvent float getObjectiveComp (float ObjNum, float CompNum);
1.1.1.323 scriptEvent float getObjectiveState (float ObjNum);
1.1.1.324 scriptEvent float getObjectiveVisible (float ObjNum);
1.1.1.325 scriptEvent vector getObservationPosition (vector targetPoint, float visualAcuityZeroToOne);
1.1.1.326 scriptEvent entity getObstacle ();
1.1.1.327 scriptEvent vector getOrigin ();
1.1.1.328 scriptEvent entity getOwner ();
1.1.1.329 scriptEvent string getPainAnim ();
1.1.1.330 scriptEvent float getPersistentFloat (string key);
1.1.1.331 scriptEvent string getPersistentString (string key);
1.1.1.332 scriptEvent vector getPersistentVector (string key);
1.1.1.333 scriptEvent float getPortAISoundLoss (float handle);
1.1.1.334 scriptEvent float getPortalHandle ();
1.1.1.335 scriptEvent float getPortPlayerSoundLoss (float handle);
1.1.1.336 scriptEvent float getPortSoundLoss (float handle);
1.1.1.337 scriptEvent entity getPrevInvItem ();
1.1.1.338 scriptEvent string getPreviousWeapon ();
1.1.1.339 scriptEvent entity getPrime ();
1.1.1.340 scriptEvent float getProjectileState ();
1.1.1.341 scriptEvent float getProjMass ();
1.1.1.342 scriptEvent vector getRadius ();
1.1.1.343 scriptEvent entity getRandomTarget (string entity_type);
1.1.1.344 scriptEvent vector getReachableEntityPosition (entity ent);
1.1.1.345 scriptEvent float getRelation (float team1, float team2);
1.1.1.346 scriptEvent float getRelationEnt (entity ent);
1.1.1.347 scriptEvent entity GetResponseEntity ();
1.1.1.348 scriptEvent float getSecurityCameraState ();
1.1.1.349 scriptEvent string getShader ();
1.1.1.350 scriptEvent float getShaderParm (float parm);
1.1.1.351 scriptEvent entity getShouldered ();
1.1.1.352 scriptEvent vector getSize ();
1.1.1.353 scriptEvent vector getSndDir ();
1.1.1.354 scriptEvent float getSoundLoss ();
1.1.1.355 scriptEvent float getSoundVolume (string soundName);
1.1.1.356 scriptEvent entity getSpotLight ();
1.1.1.357 scriptEvent string getState ();
1.1.1.358 scriptEvent entity getStruckEnt ();
1.1.1.359 scriptEvent vector getSurfNormal ();
1.1.1.360 scriptEvent string getSurfType ();
1.1.1.361 scriptEvent entity getTactEnt ();
1.1.1.362 scriptEvent entity getTalkTarget ();
1.1.1.363 scriptEvent entity getTarget (float num);
1.1.1.364 scriptEvent float getTDMVersion ();
1.1.1.365 scriptEvent float getTeam ();
1.1.1.366 scriptEvent float getTicsPerSecond ();
1.1.1.367 scriptEvent float getTime ();
1.1.1.368 scriptEvent string getTraceBody ();
1.1.1.369 scriptEvent vector getTraceEndPos ();
1.1.1.370 scriptEvent entity getTraceEntity ();
1.1.1.371 scriptEvent float getTraceFraction ();
1.1.1.372 scriptEvent string getTraceJoint ();
1.1.1.373 scriptEvent vector getTraceNormal ();
1.1.1.374 scriptEvent string getTraceSurfType ();
1.1.1.375 scriptEvent float getTurnDelta ();
1.1.1.376 scriptEvent vector getTurnHinderance (string source);
1.1.1.377 scriptEvent float getTurnRate ();
1.1.1.378 scriptEvent float getTurretState ();
1.1.1.379 scriptEvent vector getVectorKey (string key);
1.1.1.380 scriptEvent vector getVectorToIdealOrigin ();
1.1.1.381 scriptEvent vector getViewAngles ();
1.1.1.382 scriptEvent vector getVinePlantLoc ();
1.1.1.383 scriptEvent vector getVinePlantNormal ();
1.1.1.384 scriptEvent vector getVisDir ();
1.1.1.385 scriptEvent entity getWeaponEntity ();
1.1.1.386 scriptEvent entity getWorldModel ();
1.1.1.387 scriptEvent vector getWorldOrigin ();
1.1.1.388 scriptEvent void gib (string damageDefName);
1.1.1.389 scriptEvent void giveHealthPool (float amount);
1.1.1.390 scriptEvent void handleMissionEvent (entity objEnt, float eventType, string argument);
1.1.1.391 scriptEvent float hasAnim (float channel, string animName);
1.1.1.392 scriptEvent float hasEnemies ();
1.1.1.393 scriptEvent float hasFunction (string functionName);
1.1.1.394 scriptEvent float hasInvItem (entity item);
1.1.1.395 scriptEvent float hasSeenEvidence ();
1.1.1.396 scriptEvent float heal (string healDefName, float healScale);
1.1.1.397 scriptEvent entity heldEntity ();
1.1.1.398 scriptEvent void hide ();
1.1.1.399 scriptEvent float holdEntity (entity entity);
1.1.1.400 scriptEvent float idleAnim (float channel, string animName);
1.1.1.401 scriptEvent void ignoreDamage ();
1.1.1.402 scriptEvent float inAnimState (float channel, string stateFunc);
1.1.1.403 scriptEvent float influenceActive ();
1.1.1.404 scriptEvent float inPVS ();
1.1.1.405 scriptEvent float isAirborne ();
1.1.1.406 scriptEvent float isAtRest ();
1.1.1.407 scriptEvent float isDroppable ();
1.1.1.408 scriptEvent float isEnemy (entity ent);
1.1.1.409 scriptEvent float isEntityHidden (entity ent, float f_sightThreshold);
1.1.1.410 scriptEvent float isFriend (entity ent);
1.1.1.411 scriptEvent float isFrobable ();
1.1.1.412 scriptEvent float isHidden ();
1.1.1.413 scriptEvent float isHilighted ();
1.1.1.414 scriptEvent float isInLiquid ();
1.1.1.415 scriptEvent float isInvisible ();
1.1.1.416 scriptEvent float isLeaning ();
1.1.1.417 scriptEvent float isLight ();
1.1.1.418 scriptEvent float IsLocked ();
1.1.1.419 scriptEvent float isMoving ();
1.1.1.420 scriptEvent float isNeutral (entity ent);
1.1.1.421 scriptEvent float IsOpen ();
1.1.1.422 scriptEvent float isPeekLeaning ();
1.1.1.423 scriptEvent float IsPickable ();
1.1.1.424 scriptEvent float isPlayerResponsibleForDeath ();
1.1.1.425 scriptEvent float isRotating ();
1.1.1.426 scriptEvent float isType (string spawnclass);
1.1.1.427 scriptEvent float isVineFriendly ();
1.1.1.428 scriptEvent void kickObstacles (entity kickEnt, float force);
1.1.1.429 scriptEvent void kill ();
1.1.1.430 scriptEvent void killthread (string threadName);
1.1.1.431 scriptEvent void KO_Knockout (entity inflictor);
1.1.1.432 scriptEvent void launch (vector start, vector dir, vector velocity);
1.1.1.433 scriptEvent void launchGuided (vector start, vector dir, vector velocity, entity target);
1.1.1.434 scriptEvent entity launchMissile (vector origin, vector angles);
1.1.1.435 scriptEvent void launchMissiles (string projectilename, string sound, string launchbone, string targetbone, float numshots, float framedelay);
1.1.1.436 scriptEvent void launchProjectiles (float num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower);
1.1.1.437 scriptEvent void leftFoot ();
1.1.1.438 scriptEvent float loadExternalData (string declFile, string prefix);
1.1.1.439 scriptEvent void locateEnemy ();
1.1.1.440 scriptEvent void Lock ();
1.1.1.441 scriptEvent float log (float x);
1.1.1.442 scriptEvent void logString (float logClass, float logType, string output);
1.1.1.443 scriptEvent void lookAt (entity focusEntity, float duration);
1.1.1.444 scriptEvent void lookAtAngles (float yawAngleClockwise, float pitchAngleUp, float rollAngle, float durationInSeconds);
1.1.1.445 scriptEvent void lookAtEnemy (float duration);
1.1.1.446 scriptEvent void lookAtPosition (vector lookAtWorldPosition, float durationInSeconds);
1.1.1.447 scriptEvent string lookupReplacementAnim (string anim);
1.1.1.448 scriptEvent void markUsed ();
1.1.1.449 scriptEvent float max (float x, float y);
1.1.1.450 scriptEvent float melee ();
1.1.1.451 scriptEvent void meleeActionFinished ();
1.1.1.452 scriptEvent void meleeActionHeld ();
1.1.1.453 scriptEvent void meleeActionReleased ();
1.1.1.454 scriptEvent void meleeAttackStarted (float attType);
1.1.1.455 scriptEvent float meleeAttackToJoint (string joint, string damageDef);
1.1.1.456 scriptEvent float meleeBestParry ();
1.1.1.457 scriptEvent string meleeNameForNum (float num);
1.1.1.458 scriptEvent void meleeParryStarted (float parType);
1.1.1.459 scriptEvent float min (float x, float y);
1.1.1.460 scriptEvent void missionFailed ();
1.1.1.461 scriptEvent void missionSuccess ();
1.1.1.462 scriptEvent float mouseGestureFinished ();
1.1.1.463 scriptEvent void move (float angle, float distance);
1.1.1.464 scriptEvent void moveOutOfRange (entity ent, float range);
1.1.1.465 scriptEvent void moveSound (string sound);
1.1.1.466 scriptEvent float moveStatus ();
1.1.1.467 scriptEvent void moveTo (entity targetEntity);
1.1.1.468 scriptEvent void moveToAttackPosition (entity ent, string attack_anim);
1.1.1.469 scriptEvent void moveToCover ();
1.1.1.470 scriptEvent void moveToCoverFrom (entity ent);
1.1.1.471 scriptEvent void moveToEnemy ();
1.1.1.472 scriptEvent void moveToEnemyHeight ();
1.1.1.473 scriptEvent void moveToEntity (entity destination);
1.1.1.474 scriptEvent void moveToPos (vector pos);
1.1.1.475 scriptEvent void moveToPosition (vector position);
1.1.1.476 scriptEvent void music (string shaderName);
1.1.1.477 scriptEvent void muzzleFlash (string jointname);
1.1.1.478 scriptEvent void netEndReload ();
1.1.1.479 scriptEvent void netReload ();
1.1.1.480 scriptEvent entity nextEnemy (entity lastEnemy);
1.1.1.481 scriptEvent void nextWeapon ();
1.1.1.482 scriptEvent void noShadows (float noShadows);
1.1.1.483 scriptEvent void noShadowsDelayed (float noShadows, float delay);
1.1.1.484 scriptEvent float numBindChildren ();
1.1.1.485 scriptEvent float numSmokeEmitters ();
1.1.1.486 scriptEvent float numTargets ();
1.1.1.487 scriptEvent void objectiveCompUnlatch (float ObjNum, float CompNum);
1.1.1.488 scriptEvent void objectiveUnlatch (float ObjNum);
1.1.1.489 scriptEvent void Off ();
1.1.1.490 scriptEvent void offsetRelation (float team1, float team2, float val);
1.1.1.491 scriptEvent void On ();
1.1.1.492 scriptEvent void onSignal (float signalNum, entity ent, string functionName);
1.1.1.493 scriptEvent void Open ();
1.1.1.494 scriptEvent void OpenDoor (float master);
1.1.1.495 scriptEvent void openPortal ();
1.1.1.496 scriptEvent void Operate ();
1.1.1.497 scriptEvent void overrideAnim (float channel);
1.1.1.498 scriptEvent void pause ();
1.1.1.499 scriptEvent void pauseAnim (float channel, float bPause);
1.1.1.500 scriptEvent void pauseGame ();
1.1.1.501 scriptEvent void performRelight ();
1.1.1.502 scriptEvent float playAndLipSync (string soundName, string animName);
1.1.1.503 scriptEvent float playAnim (float channel, string animName);
1.1.1.504 scriptEvent float playCustomAnim (string animName);
1.1.1.505 scriptEvent float playCycle (float channel, string animName);
1.1.1.506 scriptEvent void playStartSound ();
1.1.1.507 scriptEvent float pointInLiquid (vector point, entity ignoreEntity);
1.1.1.508 scriptEvent float pointIsInBounds (vector point, vector mins, vector maxs);
1.1.1.509 scriptEvent float pow (float x, float y);
1.1.1.510 scriptEvent void preBurn ();
1.1.1.511 scriptEvent vector predictEnemyPos (float time);
1.1.1.512 scriptEvent void preventPain (float duration);
1.1.1.513 scriptEvent void print (string text);
1.1.1.514 scriptEvent void println (string text);
1.1.1.515 scriptEvent void processBlindStim (entity stimSource, float skipVisibilityCheck);
1.1.1.516 scriptEvent void processVisualStim (entity stimSource);
1.1.1.517 scriptEvent void projectDecal (vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle);
1.1.1.518 scriptEvent void propagateSound (string soundName, float propVolMod, float msgTag);
1.1.1.519 scriptEvent void propSound (string name);
1.1.1.520 scriptEvent void propSoundMod (string name, float volMod);
1.1.1.521 scriptEvent vector pushPointIntoAAS (vector post);
1.1.1.522 scriptEvent void pushState (string stateName);
1.1.1.523 scriptEvent void radiusDamage (vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower);
1.1.1.524 scriptEvent void radiusDamageFromJoint (string jointname, string damageDef);
1.1.1.525 scriptEvent float random (float range);
1.1.1.526 scriptEvent entity randomPath ();
1.1.1.527 scriptEvent entity randomTarget (string ignoreName);
1.1.1.528 scriptEvent float rangedThreatTo (entity target);
1.1.1.529 scriptEvent void readLightgemModifierFromWorldspawn ();
1.1.1.530 scriptEvent void reAttachToCoords (string attName, string joint, vector offset, vector angles);
1.1.1.531 scriptEvent void reAttachToPos (string attName, string position);
1.1.1.532 scriptEvent void reloadTorchReplacementAnims ();
1.1.1.533 scriptEvent void remove ();
1.1.1.534 scriptEvent void removeBinds ();
1.1.1.535 scriptEvent void removeFrobPeer (entity peer);
1.1.1.536 scriptEvent void removeInitialSplineAngles ();
1.1.1.537 scriptEvent void removeKey (string key);
1.1.1.538 scriptEvent void removeReplacementAnim (string anim);
1.1.1.539 scriptEvent void removeTarget (entity target);
1.1.1.540 scriptEvent float replaceInvItem (entity oldItem, entity newItem);
1.1.1.541 scriptEvent void ResetTimer (float stimId);
1.1.1.542 scriptEvent void resetWeaponProjectile (string weaponName);
1.1.1.543 scriptEvent void resetZoom ();
1.1.1.544 scriptEvent void reskinCollisionModel ();
1.1.1.545 scriptEvent void respawn ();
1.1.1.546 scriptEvent void ResponseAdd (float type);
1.1.1.547 scriptEvent void ResponseAllow (float type, entity responder);
1.1.1.548 scriptEvent void ResponseEnable (float type, float state);
1.1.1.549 scriptEvent void ResponseIgnore (float type, entity responder);
1.1.1.550 scriptEvent void ResponseRemove (float type);
1.1.1.551 scriptEvent void ResponseSetAction (float type, string action);
1.1.1.552 scriptEvent void ResponseTrigger (entity source, float stimType);
1.1.1.553 scriptEvent void restartPatrol ();
1.1.1.554 scriptEvent void RestartTimer (float stimId);
1.1.1.555 scriptEvent void restoreAddedEnts ();
1.1.1.556 scriptEvent void restoreMove ();
1.1.1.557 scriptEvent void restorePosition ();
1.1.1.558 scriptEvent void rightFoot ();
1.1.1.559 scriptEvent void ropeRemovalCleanup (entity ropeEnt);
1.1.1.560 scriptEvent void rotate (vector angleSpeed);
1.1.1.561 scriptEvent void rotateDownTo (float axis, float angle);
1.1.1.562 scriptEvent void rotateOnce (vector angles);
1.1.1.563 scriptEvent void rotateTo (vector angles);
1.1.1.564 scriptEvent void rotateUpTo (float axis, float angle);
1.1.1.565 scriptEvent void saveConDump (string cmd, string cmd);
1.1.1.566 scriptEvent void saveGame (string filename);
1.1.1.567 scriptEvent void saveMove ();
1.1.1.568 scriptEvent void say (string text);
1.1.1.569 scriptEvent void scaleVine (float factor);
1.1.1.570 scriptEvent void selectWeapon (string weapon);
1.1.1.571 scriptEvent void sessionCommand (string cmd);
1.1.1.572 scriptEvent void setActiveInventoryMapEnt (entity mapEnt);
1.1.1.573 scriptEvent void setAcuity (string type, float val);
1.1.1.574 scriptEvent void setAirAccelerate (float newAccelerate);
1.1.1.575 scriptEvent void setAlertGracePeriod (float frac, float duration, float count);
1.1.1.576 scriptEvent void setAlertLevel (float newLevel);
1.1.1.577 scriptEvent void setAngles (vector angles);
1.1.1.578 scriptEvent void setAngularVelocity (vector velocity);
1.1.1.579 scriptEvent void setAngularVelocityB (vector velocity, float id);
1.1.1.580 scriptEvent void setAnimPrefix (string prefix);
1.1.1.581 scriptEvent float setAnimRate (float channel, string animName, float animRate);
1.1.1.582 scriptEvent void setAttackFlag (float combatType, float enabled);
1.1.1.583 scriptEvent void setAudThresh (float val);
1.1.1.584 scriptEvent void setBlendFrames (float channel, float blendFrame);
1.1.1.585 scriptEvent void setBoneMod (float allowBoneMod);
1.1.1.586 scriptEvent void setCamera (entity cameraEnt);
1.1.1.587 scriptEvent void setClipMask (float clipMask);
1.1.1.588 scriptEvent void setColor (float parm0, float parm1, float parm2);
1.1.1.589 scriptEvent void setColorVec (vector newColor);
1.1.1.590 scriptEvent void SetConstraintPosition (string constraintName, vector position);
1.1.1.591 scriptEvent void setContents (float contents);
1.1.1.592 scriptEvent void setController (entity playerController);
1.1.1.593 scriptEvent float setCurInvCategory (string categoryName);
1.1.1.594 scriptEvent entity setCurInvItem (string itemName);
1.1.1.595 scriptEvent void setcvar (string name, string value);
1.1.1.596 scriptEvent void setDroppable (float droppable);
1.1.1.597 scriptEvent void setEnemy (entity enemy);
1.1.1.598 scriptEvent void setEntityRelation (entity ent, float relation);
1.1.1.599 scriptEvent void setFlyOffset (float offset);
1.1.1.600 scriptEvent void setFlySpeed (float speed);
1.1.1.601 scriptEvent void setFrobable (float frobable);
1.1.1.602 scriptEvent void setFrobActionScript (string frobActionScript);
1.1.1.603 scriptEvent void setFrobMaster (entity master);
1.1.1.604 scriptEvent void setFrobOnlyUsedByInv (float OnOff);
1.1.1.605 scriptEvent void setGravity (vector newGravity);
1.1.1.606 scriptEvent void setGui (float handle, string guiFile);
1.1.1.607 scriptEvent void setGuiFloat (float handle, string key, float val);
1.1.1.608 scriptEvent void setGuiInt (float handle, string key, float val);
1.1.1.609 scriptEvent void setGuiString (float handle, string key, string val);
1.1.1.610 scriptEvent void setGuiStringFromKey (float handle, string key, entity src, string srcKey);
1.1.1.611 scriptEvent void setHealth (float health);
1.1.1.612 scriptEvent void setHinderance (string source, float mCap, float fCap);
1.1.1.613 scriptEvent void setImmobilization (string source, float type);
1.1.1.614 scriptEvent void setJointAngle (float jointnum, float transform_type, vector angles);
1.1.1.615 scriptEvent void setJointPos (float jointnum, float transform_type, vector pos);
1.1.1.616 scriptEvent void setKey (string key, string value);
1.1.1.617 scriptEvent void setLightgemModifier (string modifierName, float value);
1.1.1.618 scriptEvent void setLightOrigin (vector pos);
1.1.1.619 scriptEvent void setLightParm (float parmNum, float value);
1.1.1.620 scriptEvent void setLightParms (float parm0, float parm1, float parm2, float parm3);
1.1.1.621 scriptEvent void setLinearVelocity (vector velocity);
1.1.1.622 scriptEvent void setLinearVelocityB (vector velocity, float id);
1.1.1.623 scriptEvent void setMaxHealth (float maxHealth);
1.1.1.624 scriptEvent void setModel (string modelName);
1.1.1.625 scriptEvent void setMoveType (float movetype);
1.1.1.626 scriptEvent void setName (string name);
1.1.1.627 scriptEvent void setNeverDormant (float enable);
1.1.1.628 scriptEvent void setNextState (string stateFunc);
1.1.1.629 scriptEvent void setObjectiveComp (float ObjNum, float CompNum, float state);
1.1.1.630 scriptEvent void setObjectiveEnabling (float ObjNum, string strIn);
1.1.1.631 scriptEvent void setObjectiveNotification (float ObjNote);
1.1.1.632 scriptEvent void setObjectiveOngoing (float ObjNum, float val);
1.1.1.633 scriptEvent void setObjectiveOptional (float ObjNum, float val);
1.1.1.634 scriptEvent void setObjectiveState (float ObjNum, float State);
1.1.1.635 scriptEvent void setObjectiveText (float ObjNum, string newText);
1.1.1.636 scriptEvent void setObjectiveVisible (float ObjNum, float val);
1.1.1.637 scriptEvent void setOrigin (vector origin);
1.1.1.638 scriptEvent void setOwner (entity owner);
1.1.1.639 scriptEvent void setPeekOverlayBackground ();
1.1.1.640 scriptEvent void setPeekView (float OnOff, vector origin);
1.1.1.641 scriptEvent void setPersistentArg (string key, string value);
1.1.1.642 scriptEvent void setPortAISoundLoss (float handle, float value);
1.1.1.643 scriptEvent void setPortPlayerSoundLoss (float handle, float value);
1.1.1.644 scriptEvent void setPortSoundLoss (float handle, float value);
1.1.1.645 scriptEvent void setPrime (entity vine);
1.1.1.646 scriptEvent void setRadius (float radius);
1.1.1.647 scriptEvent void setRadiusXYZ (float x, float y, float z);
1.1.1.648 scriptEvent void setRelation (float team1, float team2, float val);
1.1.1.649 scriptEvent void setReplacementAnim (string animToReplace, string replacement);
1.1.1.650 scriptEvent void setSavePermissions (float permission);
1.1.1.651 scriptEvent void setSecretsFound (float secrets);
1.1.1.652 scriptEvent void setSecretsTotal (float secrets);
1.1.1.653 scriptEvent void setShader (string shader);
1.1.1.654 scriptEvent void setShaderParm (float parm, float value);
1.1.1.655 scriptEvent void setShaderParms (float parm0, float parm1, float parm2, float parm3);
1.1.1.656 scriptEvent void setSightThreshold (float sightThreshold);
1.1.1.657 scriptEvent void setSize (vector min, vector max);
1.1.1.658 scriptEvent void setSkin (string skinName);
1.1.1.659 scriptEvent void setSmoke (string particleDef);
1.1.1.660 scriptEvent void setSmokeVisibility (float particle_num, float on);
1.1.1.661 scriptEvent void setSolid (float solidity);
1.1.1.662 scriptEvent void setSoundLoss (float loss);
1.1.1.663 scriptEvent void setSoundVolume (float newLevel);
1.1.1.664 scriptEvent void setSpawnArg (string key, string value);
1.1.1.665 scriptEvent void setSpyglassOverlayBackground ();
1.1.1.666 scriptEvent void setStartedOff ();
1.1.1.667 scriptEvent void setState (string stateFunc);
1.1.1.668 scriptEvent void setSyncedAnimWeight (float channel, float animindex, float weight);
1.1.1.669 scriptEvent void setTalkState (float state);
1.1.1.670 scriptEvent void setTalkTarget (entity target);
1.1.1.671 scriptEvent void setTeam (float newTeam);
1.1.1.672 scriptEvent void SetTimerState (float stimId, float state);
1.1.1.673 scriptEvent void setTurnHinderance (string source, float mCap, float fCap);
1.1.1.674 scriptEvent void setTurnRate (float rate);
1.1.1.675 scriptEvent void setUsedBy (entity ent, float b_canUse);
1.1.1.676 scriptEvent void setViewAngles (vector angles);
1.1.1.677 scriptEvent void setWatered ();
1.1.1.678 scriptEvent void setWorldOrigin (vector origin);
1.1.1.679 scriptEvent void shooterFireProjectile ();
1.1.1.680 scriptEvent float shooterGetAmmo ();
1.1.1.681 scriptEvent float shooterGetState ();
1.1.1.682 scriptEvent void shooterSetAmmo (float newAmmo);
1.1.1.683 scriptEvent void shooterSetState (float state);
1.1.1.684 scriptEvent void show ();
1.1.1.685 scriptEvent void showAttachment (string attName, float show);
1.1.1.686 scriptEvent void showAttachmentInd (float index, float show);
1.1.1.687 scriptEvent void shrivel (float time);
1.1.1.688 scriptEvent float sin (float degrees);
1.1.1.689 scriptEvent void slideTo (vector position, float time);
1.1.1.690 scriptEvent void smoking (float state);
1.1.1.691 scriptEvent entity spawn (string classname);
1.1.1.692 scriptEvent float SpawnFloat (string key, float default);
1.1.1.693 scriptEvent string SpawnString (string key, string default);
1.1.1.694 scriptEvent entity spawnThrowableProjectile (string projectileName, string jointName);
1.1.1.695 scriptEvent vector SpawnVector (string key, vector default);
1.1.1.696 scriptEvent void speed (float speed);
1.1.1.697 scriptEvent float sqrt (float square);
1.1.1.698 scriptEvent void start ();
1.1.1.699 scriptEvent void startFx (string fx);
1.1.1.700 scriptEvent void startGamePlayTimer ();
1.1.1.701 scriptEvent void startMouseGesture (float key, float thresh, float test, float inverted, float turnHinderance, float decideTime, float deadTime);
1.1.1.702 scriptEvent void startRagdoll ();
1.1.1.703 scriptEvent float startSound (string sound, float channel, float netSync);
1.1.1.704 scriptEvent float startSoundShader (string shaderName, float channel);
1.1.1.705 scriptEvent void startSpline (entity spline);
1.1.1.706 scriptEvent void StartTimer (float stimId);
1.1.1.707 scriptEvent void startZoom (float duration, float startFOV, float endFOV);
1.1.1.708 scriptEvent void state_light (float set);
1.1.1.709 scriptEvent void state_see_AI (float set);
1.1.1.710 scriptEvent void state_see_animals (float set);
1.1.1.711 scriptEvent void state_see_bodies (float set);
1.1.1.712 scriptEvent void state_see_player (float set);
1.1.1.713 scriptEvent void state_sweep (float set);
1.1.1.714 scriptEvent void StimAdd (float type, float radius);
1.1.1.715 scriptEvent void StimClearIgnoreList (float type);
1.1.1.716 scriptEvent void StimEmit (float type, float radius, vector stimOrigin);
1.1.1.717 scriptEvent void StimEnable (float type, float state);
1.1.1.718 scriptEvent void StimRemove (float type);
1.1.1.719 scriptEvent void StimSetScriptBased (float type, float state);
1.1.1.720 scriptEvent void stop ();
1.1.1.721 scriptEvent void stopAnim (float channel, float frames);
1.1.1.722 scriptEvent void stopFxFov ();
1.1.1.723 scriptEvent void stopMouseGesture ();
1.1.1.724 scriptEvent void stopMove ();
1.1.1.725 scriptEvent void stopMoving ();
1.1.1.726 scriptEvent void stopPatrol ();
1.1.1.727 scriptEvent void stopRagdoll ();
1.1.1.728 scriptEvent void stopRotating ();
1.1.1.729 scriptEvent void stopSound (float channel, float netSync);
1.1.1.730 scriptEvent void stopSpline ();
1.1.1.731 scriptEvent void stopThinking ();
1.1.1.732 scriptEvent void StopTimer (float stimId);
1.1.1.733 scriptEvent float strFind (string text, string find, float casesensitive, float start, float end);
1.1.1.734 scriptEvent string strLeft (string text, float num);
1.1.1.735 scriptEvent float strLength (string text);
1.1.1.736 scriptEvent string strMid (string text, float start, float num);
1.1.1.737 scriptEvent string strRemove (string text, string remove);
1.1.1.738 scriptEvent string strReplace (string text, string remove, string replace);
1.1.1.739 scriptEvent string strRight (string text, float num);
1.1.1.740 scriptEvent string strSkip (string text, float num);
1.1.1.741 scriptEvent float strToFloat (string text);
1.1.1.742 scriptEvent float strToInt (string text);
1.1.1.743 scriptEvent void sway (float speed, float phase, vector angles);
1.1.1.744 scriptEvent void Switch (float newState);
1.1.1.745 scriptEvent void switchState (string stateName);
1.1.1.746 scriptEvent void syncAnimChannels (float fromChannel, float toChannel, float blendFrames);
1.1.1.747 scriptEvent void Tap ();
1.1.1.748 scriptEvent void TDM_Lock_OnLockPicked ();
1.1.1.749 scriptEvent void TDM_Lock_StatusUpdate ();
1.1.1.750 scriptEvent void teleportTo (entity other);
1.1.1.751 scriptEvent void terminate (float threadNumber);
1.1.1.752 scriptEvent float testAnimAttack (string animname);
1.1.1.753 scriptEvent float testAnimMove (string animname);
1.1.1.754 scriptEvent float testAnimMoveTowardEnemy (string animname);
1.1.1.755 scriptEvent float testChargeAttack ();
1.1.1.756 scriptEvent float testEvent1 (float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food);
1.1.1.757 scriptEvent entity testEvent2 (float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp);
1.1.1.758 scriptEvent vector testEvent3 (entity ent_prevres, vector vec_123, float float_pi, entity ent_player);
1.1.1.759 scriptEvent float testMeleeAttack ();
1.1.1.760 scriptEvent float testMoveToPosition (vector position);
1.1.1.761 scriptEvent void threadname (string name);
1.1.1.762 scriptEvent void throwAF ();
1.1.1.763 scriptEvent void throwMoveable ();
1.1.1.764 scriptEvent void time (float time);
1.1.1.765 scriptEvent void Toggle ();
1.1.1.766 scriptEvent void toggle_light ();
1.1.1.767 scriptEvent void toggle_see_AI ();
1.1.1.768 scriptEvent void toggle_see_animals ();
1.1.1.769 scriptEvent void toggle_see_bodies ();
1.1.1.770 scriptEvent void toggle_see_player ();
1.1.1.771 scriptEvent void toggle_sweep ();
1.1.1.772 scriptEvent void ToggleLock ();
1.1.1.773 scriptEvent void ToggleOpen ();
1.1.1.774 scriptEvent float totalAmmoCount ();
1.1.1.775 scriptEvent float touches (entity other);
1.1.1.776 scriptEvent float trace (vector start, vector end, vector mins, vector maxs, float contents_mask, entity passEntity);
1.1.1.777 scriptEvent float tracePoint (vector start, vector end, float contents_mask, entity passEntity);
1.1.1.778 scriptEvent string translate (string input);
1.1.1.779 scriptEvent float travelDistanceBetweenEntities (entity source, entity dest);
1.1.1.780 scriptEvent float travelDistanceBetweenPoints (vector source, vector dest);
1.1.1.781 scriptEvent float travelDistanceToEntity (entity destination);
1.1.1.782 scriptEvent float travelDistanceToPoint (vector destination);
1.1.1.783 scriptEvent void trigger (entity entityToTrigger);
1.1.1.784 scriptEvent void triggerMissionEnd ();
1.1.1.785 scriptEvent void triggerParticles (string jointName);
1.1.1.786 scriptEvent void turnTo (float yaw);
1.1.1.787 scriptEvent void turnToEntity (entity ent);
1.1.1.788 scriptEvent void turnToPos (vector pos);
1.1.1.789 scriptEvent void unbind ();
1.1.1.790 scriptEvent void Unlock ();
1.1.1.791 scriptEvent void unpauseGame ();
1.1.1.792 scriptEvent void useAmmo (float amount);
1.1.1.793 scriptEvent float vecLength (vector vec);
1.1.1.794 scriptEvent vector vecNormalize (vector vec);
1.1.1.795 scriptEvent vector VecRotate (vector vector, vector angles);
1.1.1.796 scriptEvent vector VecToAngles (vector vec);
1.1.1.797 scriptEvent entity visScan ();
1.1.1.798 scriptEvent void wait (float time);
1.1.1.799 scriptEvent void waitAction (string name);
1.1.1.800 scriptEvent void waitFor (entity mover);
1.1.1.801 scriptEvent void waitForRender (entity e);
1.1.1.802 scriptEvent void waitForThread (float threadNumber);
1.1.1.803 scriptEvent void waitFrame ();
1.1.1.804 scriptEvent void waitMove ();
1.1.1.805 scriptEvent void wakeOnFlashlight (float enable);
1.1.1.806 scriptEvent void wander ();
1.1.1.807 scriptEvent void warning (string text);
1.1.1.808 scriptEvent float wasDamaged ();
1.1.1.809 scriptEvent void weaponHolstered ();
1.1.1.810 scriptEvent void weaponLowering ();
1.1.1.811 scriptEvent void weaponOutOfAmmo ();
1.1.1.812 scriptEvent void weaponReady ();
1.1.1.813 scriptEvent void weaponReloading ();
1.1.1.814 scriptEvent void weaponRising ();
1.1.1.815 scriptEvent void weaponState (string stateFunction, float blendFrames);
1.2 Events by Spawnclass / Entity Type
1.2.1 idClass
1.2.2 idActor
1.2.2.1 scriptEvent float animDistance (float channel, string animName);
1.2.2.2 scriptEvent float animDone (float channel, float blendOutFrames);
1.2.2.3 scriptEvent float animIsPaused (float channel);
1.2.2.4 scriptEvent float animLength (float channel, string animName);
1.2.2.5 scriptEvent void animState (float channel, string stateFunction, float blendFrame);
1.2.2.6 scriptEvent void attach (entity ent, string attName);
1.2.2.7 scriptEvent void attachToPos (entity ent, string position, string attName);
1.2.2.8 scriptEvent void checkAnim (float channel, string animName);
1.2.2.9 scriptEvent string chooseAnim (float channel, string animName);
1.2.2.10 scriptEvent entity closestEnemyToPoint (vector point);
1.2.2.11 scriptEvent void disableAnimchannel (float channel);
1.2.2.12 scriptEvent void disableEyeFocus ();
1.2.2.13 scriptEvent void DisableLegIK (float num);
1.2.2.14 scriptEvent void disablePain ();
1.2.2.15 scriptEvent void DisableWalkIK ();
1.2.2.16 scriptEvent void dropAttachment (string attName);
1.2.2.17 scriptEvent void dropAttachmentInd (float index);
1.2.2.18 scriptEvent void enableAnim (float channel, float blendFrames);
1.2.2.19 scriptEvent void enableEyeFocus ();
1.2.2.20 scriptEvent void EnableLegIK (float num);
1.2.2.21 scriptEvent void enablePain ();
1.2.2.22 scriptEvent void EnableWalkIK ();
1.2.2.23 scriptEvent void finishAction (string action);
1.2.2.24 scriptEvent void finishChannelAction (float channel, string animname);
1.2.2.25 scriptEvent void footstep ();
1.2.2.26 scriptEvent string getAnimList (float channel);
1.2.2.27 scriptEvent float getAnimRate (float channel, string animName);
1.2.2.28 scriptEvent string getAnimState (float channel);
1.2.2.29 scriptEvent entity getAttachment (string attName);
1.2.2.30 scriptEvent entity getAttachmentInd (float index);
1.2.2.31 scriptEvent float getAttackFlag (float combatType);
1.2.2.32 scriptEvent float getBlendFrames (float channel);
1.2.2.33 scriptEvent vector getEyePos ();
1.2.2.34 scriptEvent entity getHead ();
1.2.2.35 scriptEvent float getMeleeActPhase ();
1.2.2.36 scriptEvent float getMeleeActState ();
1.2.2.37 scriptEvent float getMeleeActType ();
1.2.2.38 scriptEvent float getMeleeLastActTime ();
1.2.2.39 scriptEvent float getMeleeLastHitByType ();
1.2.2.40 scriptEvent float getMeleeResult ();
1.2.2.41 scriptEvent float getNumAttachments ();
1.2.2.42 scriptEvent float getNumMeleeWeapons ();
1.2.2.43 scriptEvent float getNumRangedWeapons ();
1.2.2.44 scriptEvent string getPainAnim ();
1.2.2.45 scriptEvent string getState ();
1.2.2.46 scriptEvent float hasAnim (float channel, string animName);
1.2.2.47 scriptEvent float hasEnemies ();
1.2.2.48 scriptEvent float idleAnim (float channel, string animName);
1.2.2.49 scriptEvent float inAnimState (float channel, string stateFunc);
1.2.2.50 scriptEvent void leftFoot ();
1.2.2.51 scriptEvent string lookupReplacementAnim (string anim);
1.2.2.52 scriptEvent void meleeActionFinished ();
1.2.2.53 scriptEvent void meleeActionHeld ();
1.2.2.54 scriptEvent void meleeActionReleased ();
1.2.2.55 scriptEvent void meleeAttackStarted (float attType);
1.2.2.56 scriptEvent float meleeBestParry ();
1.2.2.57 scriptEvent string meleeNameForNum (float num);
1.2.2.58 scriptEvent void meleeParryStarted (float parType);
1.2.2.59 scriptEvent entity nextEnemy (entity lastEnemy);
1.2.2.60 scriptEvent void overrideAnim (float channel);
1.2.2.61 scriptEvent void pauseAnim (float channel, float bPause);
1.2.2.62 scriptEvent float playAnim (float channel, string animName);
1.2.2.63 scriptEvent float playCycle (float channel, string animName);
1.2.2.64 scriptEvent void preventPain (float duration);
1.2.2.65 scriptEvent void reAttachToCoords (string attName, string joint, vector offset, vector angles);
1.2.2.66 scriptEvent void reAttachToPos (string attName, string position);
1.2.2.67 scriptEvent void reloadTorchReplacementAnims ();
1.2.2.68 scriptEvent void removeReplacementAnim (string anim);
1.2.2.69 scriptEvent void rightFoot ();
1.2.2.70 scriptEvent void setAnimPrefix (string prefix);
1.2.2.71 scriptEvent float setAnimRate (float channel, string animName, float animRate);
1.2.2.72 scriptEvent void setAttackFlag (float combatType, float enabled);
1.2.2.73 scriptEvent void setBlendFrames (float channel, float blendFrame);
1.2.2.74 scriptEvent void setNextState (string stateFunc);
1.2.2.75 scriptEvent void setReplacementAnim (string animToReplace, string replacement);
1.2.2.76 scriptEvent void setState (string stateFunc);
1.2.2.77 scriptEvent void setSyncedAnimWeight (float channel, float animindex, float weight);
1.2.2.78 scriptEvent void showAttachment (string attName, float show);
1.2.2.79 scriptEvent void showAttachmentInd (float index, float show);
1.2.2.80 scriptEvent void stopAnim (float channel, float frames);
1.2.2.81 scriptEvent void syncAnimChannels (float fromChannel, float toChannel, float blendFrames);
1.2.3 idAFEntity_Base
1.2.4 idAFEntity_Gibbable
1.2.5 idAFEntity_Generic
1.2.6 idAFEntity_WithAttachedHead
1.2.7 CAIVehicle
1.2.8 idCombatNode
1.2.9 idAI
1.2.9.1 scriptEvent void activate (entity activator);
1.2.9.2 scriptEvent void alert (string type, float val);
1.2.9.3 scriptEvent void alertAI (string type, float amount, entity actor);
1.2.9.4 scriptEvent void allowDamage ();
1.2.9.5 scriptEvent void allowHiddenMovement (float enable);
1.2.9.6 scriptEvent void allowMovement (float allow);
1.2.9.7 scriptEvent void animTurn (float angle);
1.2.9.8 scriptEvent void attackBegin (string damageDef);
1.2.9.9 scriptEvent void attackEnd ();
1.2.9.10 scriptEvent float attackMelee (string damageDef);
1.2.9.11 scriptEvent entity attackMissile (string jointName);
1.2.9.12 scriptEvent void bark (string sound);
1.2.9.13 scriptEvent void becomeNonSolid ();
1.2.9.14 scriptEvent float becomeRagdoll ();
1.2.9.15 scriptEvent void becomeSolid ();
1.2.9.16 scriptEvent void burn ();
1.2.9.17 scriptEvent float canBecomeSolid ();
1.2.9.18 scriptEvent float canHitEnemy ();
1.2.9.19 scriptEvent float canHitEnemyFromAnim (string anim);
1.2.9.20 scriptEvent float canHitEnemyFromJoint (string jointname);
1.2.9.21 scriptEvent float canReachEnemy ();
1.2.9.22 scriptEvent float canReachEntity (entity ent);
1.2.9.23 scriptEvent float canReachPosition (vector pos);
1.2.9.24 scriptEvent float canSee (entity ent);
1.2.9.25 scriptEvent float canSeeExt (entity ent, float b_useFOV, float b_useLighting);
1.2.9.26 scriptEvent float canSeePositionExt (vector position, float b_useFOV, float b_useLighting);
1.2.9.27 scriptEvent void chargeAttack (string damageDef);
1.2.9.28 scriptEvent void clearBurn ();
1.2.9.29 scriptEvent void clearEnemy ();
1.2.9.30 scriptEvent void clearFlyOffset ();
1.2.9.31 scriptEvent entity closestReachableEnemy ();
1.2.9.32 scriptEvent entity closestReachableEnemyOfEntity (entity team_mate);
1.2.9.33 scriptEvent entity createMissile (string jointname);
1.2.9.34 scriptEvent entity createMissileFromDef (string defName, string jointName);
1.2.9.35 scriptEvent void directDamage (entity damageTarget, string damageDef);
1.2.9.36 scriptEvent void disableAFPush ();
1.2.9.37 scriptEvent void disableClip ();
1.2.9.38 scriptEvent void disableGravity ();
1.2.9.39 scriptEvent void dropTorch ();
1.2.9.40 scriptEvent void emptyHand (string hand);
1.2.9.41 scriptEvent void enableAFPush ();
1.2.9.42 scriptEvent void enableClip ();
1.2.9.43 scriptEvent void enableGravity ();
1.2.9.44 scriptEvent float endState ();
1.2.9.45 scriptEvent float enemyInCombatCone (entity combatNode, float use_current_enemy_location);
1.2.9.46 scriptEvent float enemyPositionValid ();
1.2.9.47 scriptEvent float enemyRange ();
1.2.9.48 scriptEvent float enemyRange2D ();
1.2.9.49 scriptEvent float entityInAttackCone (entity ent);
1.2.9.50 scriptEvent void faceEnemy ();
1.2.9.51 scriptEvent void faceEntity (entity ent);
1.2.9.52 scriptEvent float facingIdeal ();
1.2.9.53 scriptEvent entity findActorsInBounds (vector mins, vector maxs);
1.2.9.54 scriptEvent entity findEnemy (float onlyInFov);
1.2.9.55 scriptEvent entity findEnemyAI (float onlyInFov);
1.2.9.56 scriptEvent entity findEnemyInCombatNodes ();
1.2.9.57 scriptEvent entity findFriendlyAI (float team);
1.2.9.58 scriptEvent entity fireMissileAtTarget (string jointname, string targetname);
1.2.9.59 scriptEvent void flee (entity entToFleeFrom);
1.2.9.60 scriptEvent void fleeFromPoint (vector pos);
1.2.9.61 scriptEvent void foundBody (entity body);
1.2.9.62 scriptEvent void Gas_Knockout (entity inflictor);
1.2.9.63 scriptEvent float getAcuity (string type);
1.2.9.64 scriptEvent entity getAlertActor ();
1.2.9.65 scriptEvent float getAlertLevelOfOtherAI (entity otherEntity);
1.2.9.66 scriptEvent entity getAttacker ();
1.2.9.67 scriptEvent float getAudThresh ();
1.2.9.68 scriptEvent entity getClosestHiddenTarget (string entity_type);
1.2.9.69 scriptEvent entity getCombatNode ();
1.2.9.70 scriptEvent float getCurrentYaw ();
1.2.9.71 scriptEvent entity getEnemy ();
1.2.9.72 scriptEvent vector getEnemyEyePos ();
1.2.9.73 scriptEvent vector getEnemyPos ();
1.2.9.74 scriptEvent vector getJumpVelocity (vector pos, float speed, float max_jump_height);
1.2.9.75 scriptEvent float getMoveType ();
1.2.9.76 scriptEvent string getNextIdleAnim ();
1.2.9.77 scriptEvent vector getObservationPosition (vector targetPoint, float visualAcuityZeroToOne);
1.2.9.78 scriptEvent entity getObstacle ();
1.2.9.79 scriptEvent entity getRandomTarget (string entity_type);
1.2.9.80 scriptEvent vector getReachableEntityPosition (entity ent);
1.2.9.81 scriptEvent float getRelationEnt (entity ent);
1.2.9.82 scriptEvent vector getSndDir ();
1.2.9.83 scriptEvent entity getTactEnt ();
1.2.9.84 scriptEvent entity getTalkTarget ();
1.2.9.85 scriptEvent float getTurnDelta ();
1.2.9.86 scriptEvent float getTurnRate ();
1.2.9.87 scriptEvent vector getVectorToIdealOrigin ();
1.2.9.88 scriptEvent vector getVisDir ();
1.2.9.89 scriptEvent float hasSeenEvidence ();
1.2.9.90 scriptEvent void ignoreDamage ();
1.2.9.91 scriptEvent float isEntityHidden (entity ent, float f_sightThreshold);
1.2.9.92 scriptEvent float isPlayerResponsibleForDeath ();
1.2.9.93 scriptEvent void kickObstacles (entity kickEnt, float force);
1.2.9.94 scriptEvent void kill ();
1.2.9.95 scriptEvent void KO_Knockout (entity inflictor);
1.2.9.96 scriptEvent entity launchMissile (vector origin, vector angles);
1.2.9.97 scriptEvent void locateEnemy ();
1.2.9.98 scriptEvent void lookAt (entity focusEntity, float duration);
1.2.9.99 scriptEvent void lookAtAngles (float yawAngleClockwise, float pitchAngleUp, float rollAngle, float durationInSeconds);
1.2.9.100 scriptEvent void lookAtEnemy (float duration);
1.2.9.101 scriptEvent void lookAtPosition (vector lookAtWorldPosition, float durationInSeconds);
1.2.9.102 scriptEvent float meleeAttackToJoint (string joint, string damageDef);
1.2.9.103 scriptEvent void moveOutOfRange (entity ent, float range);
1.2.9.104 scriptEvent float moveStatus ();
1.2.9.105 scriptEvent void moveToAttackPosition (entity ent, string attack_anim);
1.2.9.106 scriptEvent void moveToCover ();
1.2.9.107 scriptEvent void moveToCoverFrom (entity ent);
1.2.9.108 scriptEvent void moveToEnemy ();
1.2.9.109 scriptEvent void moveToEnemyHeight ();
1.2.9.110 scriptEvent void moveToEntity (entity destination);
1.2.9.111 scriptEvent void moveToPosition (vector position);
1.2.9.112 scriptEvent void muzzleFlash (string jointname);
1.2.9.113 scriptEvent float numSmokeEmitters ();
1.2.9.114 scriptEvent void performRelight ();
1.2.9.115 scriptEvent float playAndLipSync (string soundName, string animName);
1.2.9.116 scriptEvent float playCustomAnim (string animName);
1.2.9.117 scriptEvent void preBurn ();
1.2.9.118 scriptEvent vector predictEnemyPos (float time);
1.2.9.119 scriptEvent void processBlindStim (entity stimSource, float skipVisibilityCheck);
1.2.9.120 scriptEvent void processVisualStim (entity stimSource);
1.2.9.121 scriptEvent vector pushPointIntoAAS (vector post);
1.2.9.122 scriptEvent void pushState (string stateName);
1.2.9.123 scriptEvent void radiusDamageFromJoint (string jointname, string damageDef);
1.2.9.124 scriptEvent entity randomPath ();
1.2.9.125 scriptEvent void restartPatrol ();
1.2.9.126 scriptEvent void restoreMove ();
1.2.9.127 scriptEvent void saveMove ();
1.2.9.128 scriptEvent void setAcuity (string type, float val);
1.2.9.129 scriptEvent void setAlertGracePeriod (float frac, float duration, float count);
1.2.9.130 scriptEvent void setAlertLevel (float newLevel);
1.2.9.131 scriptEvent void setAudThresh (float val);
1.2.9.132 scriptEvent void setBoneMod (float allowBoneMod);
1.2.9.133 scriptEvent void setEnemy (entity enemy);
1.2.9.134 scriptEvent void setFlyOffset (float offset);
1.2.9.135 scriptEvent void setFlySpeed (float speed);
1.2.9.136 scriptEvent void setMoveType (float movetype);
1.2.9.137 scriptEvent void setSmokeVisibility (float particle_num, float on);
1.2.9.138 scriptEvent void setTalkState (float state);
1.2.9.139 scriptEvent void setTalkTarget (entity target);
1.2.9.140 scriptEvent void setTurnRate (float rate);
1.2.9.141 scriptEvent void shrivel (float time);
1.2.9.142 scriptEvent void slideTo (vector position, float time);
1.2.9.143 scriptEvent entity spawnThrowableProjectile (string projectileName, string jointName);
1.2.9.144 scriptEvent void stopMove ();
1.2.9.145 scriptEvent void stopPatrol ();
1.2.9.146 scriptEvent void stopRagdoll ();
1.2.9.147 scriptEvent void stopThinking ();
1.2.9.148 scriptEvent void switchState (string stateName);
1.2.9.149 scriptEvent float testAnimAttack (string animname);
1.2.9.150 scriptEvent float testAnimMove (string animname);
1.2.9.151 scriptEvent float testAnimMoveTowardEnemy (string animname);
1.2.9.152 scriptEvent float testChargeAttack ();
1.2.9.153 scriptEvent float testMeleeAttack ();
1.2.9.154 scriptEvent float testMoveToPosition (vector position);
1.2.9.155 scriptEvent void throwAF ();
1.2.9.156 scriptEvent void throwMoveable ();
1.2.9.157 scriptEvent float travelDistanceBetweenEntities (entity source, entity dest);
1.2.9.158 scriptEvent float travelDistanceBetweenPoints (vector source, vector dest);
1.2.9.159 scriptEvent float travelDistanceToEntity (entity destination);
1.2.9.160 scriptEvent float travelDistanceToPoint (vector destination);
1.2.9.161 scriptEvent void triggerParticles (string jointName);
1.2.9.162 scriptEvent void turnTo (float yaw);
1.2.9.163 scriptEvent void turnToEntity (entity ent);
1.2.9.164 scriptEvent void turnToPos (vector pos);
1.2.9.165 scriptEvent entity visScan ();
1.2.9.166 scriptEvent void waitAction (string name);
1.2.9.167 scriptEvent void waitMove ();
1.2.9.168 scriptEvent void wakeOnFlashlight (float enable);
1.2.9.169 scriptEvent void wander ();
1.2.10 idTestModel
1.2.11 CBinaryFrobMover
1.2.12 idBrittleFracture
1.2.13 idCameraView
1.2.14 idCameraAnim
1.2.15 idFuncEmitter
1.2.16 idEntity
1.2.16.1 scriptEvent void activateContacts ();
1.2.16.2 scriptEvent void activateTargets (entity activator);
1.2.16.3 scriptEvent void addFrobPeer (entity peer);
1.2.16.4 scriptEvent void addInvItem (entity inv_item);
1.2.16.5 scriptEvent void addItemToInv (entity target);
1.2.16.6 scriptEvent void addTarget (entity target);
1.2.16.7 scriptEvent void applyImpulse (entity source, float bodyid, vector point, vector impulse);
1.2.16.8 scriptEvent void bind (entity master);
1.2.16.9 scriptEvent void bindPosition (entity master);
1.2.16.10 scriptEvent void bindToBody (entity master, float bodyID, float orientated);
1.2.16.11 scriptEvent void bindToJoint (entity master, string boneName, float rotateWithMaster);
1.2.16.12 scriptEvent void cacheSoundShader (string shaderName);
1.2.16.13 scriptEvent void callFunction (string functionName);
1.2.16.14 scriptEvent void callGlobalFunction (string functionName, entity other);
1.2.16.15 scriptEvent void callGui (float handle, string namedEvent);
1.2.16.16 scriptEvent float canBeUsedBy (entity ent);
1.2.16.17 scriptEvent float canSeeEntity (entity target, float useLighting);
1.2.16.18 scriptEvent void changeEntityRelation (entity ent, float relationChange);
1.2.16.19 scriptEvent void changeInvIcon (string name, string category, string icon);
1.2.16.20 scriptEvent void changeInvItemCount (string name, string category, float amount);
1.2.16.21 scriptEvent void changeInvLightgemModifier (string name, string category, float amount);
1.2.16.22 scriptEvent float changeLootAmount (float type, float amount);
1.2.16.23 scriptEvent void checkAbsence ();
1.2.16.24 scriptEvent void copyBind (entity other);
1.2.16.25 scriptEvent float createOverlay (string guiFile, float layer);
1.2.16.26 scriptEvent void CreateTimer (float stimId, float hour, float minutes, float seconds, float milliseconds);
1.2.16.27 scriptEvent float createXrayOverlay (string guiFile);
1.2.16.28 scriptEvent void damage (entity inflictor, entity attacker, vector dir, string damageDefName, float damageScale);
1.2.16.29 scriptEvent void destroyOverlay (float handle);
1.2.16.30 scriptEvent float distanceTo (entity other);
1.2.16.31 scriptEvent float distanceToPoint (vector point);
1.2.16.32 scriptEvent void extinguishLights ();
1.2.16.33 scriptEvent void fadeSound (float channel, float newLevel, float fadeTime);
1.2.16.34 scriptEvent float frob ();
1.2.16.35 scriptEvent void frobHilight (float state);
1.2.16.36 scriptEvent vector getAngles ();
1.2.16.37 scriptEvent vector getAngularVelocity ();
1.2.16.38 scriptEvent entity getBindChild (float ind);
1.2.16.39 scriptEvent entity getBindMaster ();
1.2.16.40 scriptEvent float getBoolKey (string key);
1.2.16.41 scriptEvent float getClipMask ();
1.2.16.42 scriptEvent vector getColor ();
1.2.16.43 scriptEvent float getContents ();
1.2.16.44 scriptEvent string getCurInvCategory ();
1.2.16.45 scriptEvent string getCurInvIcon ();
1.2.16.46 scriptEvent float getCurInvItemCount ();
1.2.16.47 scriptEvent entity getCurInvItemEntity ();
1.2.16.48 scriptEvent string getCurInvItemId ();
1.2.16.49 scriptEvent string getCurInvItemName ();
1.2.16.50 scriptEvent float getEntityFlag (string flagName);
1.2.16.51 scriptEvent entity getEntityKey (string key);
1.2.16.52 scriptEvent float getFloatKey (string key);
1.2.16.53 scriptEvent string getGui (float handle);
1.2.16.54 scriptEvent float getGuiFloat (float handle, string key);
1.2.16.55 scriptEvent float getGuiInt (float handle, string key);
1.2.16.56 scriptEvent string getGuiString (float handle, string key);
1.2.16.57 scriptEvent float getHealth ();
1.2.16.58 scriptEvent float getIntKey (string key);
1.2.16.59 scriptEvent string getKey (string key);
1.2.16.60 scriptEvent vector getLightInPVS (float falloff, float scaling);
1.2.16.61 scriptEvent vector getLinearVelocity ();
1.2.16.62 scriptEvent entity getLocation ();
1.2.16.63 scriptEvent float getLootAmount (float type);
1.2.16.64 scriptEvent float getMass (float body);
1.2.16.65 scriptEvent float getMaxHealth ();
1.2.16.66 scriptEvent vector getMaxs ();
1.2.16.67 scriptEvent vector getMins ();
1.2.16.68 scriptEvent string getName ();
1.2.16.69 scriptEvent entity getNextInvItem ();
1.2.16.70 scriptEvent string getNextKey (string prefix, string lastMatch);
1.2.16.71 scriptEvent vector getOrigin ();
1.2.16.72 scriptEvent entity getPrevInvItem ();
1.2.16.73 scriptEvent entity GetResponseEntity ();
1.2.16.74 scriptEvent float getShaderParm (float parm);
1.2.16.75 scriptEvent vector getSize ();
1.2.16.76 scriptEvent float getSoundVolume (string soundName);
1.2.16.77 scriptEvent entity getTarget (float num);
1.2.16.78 scriptEvent float getTeam ();
1.2.16.79 scriptEvent vector getVectorKey (string key);
1.2.16.80 scriptEvent vector getVinePlantLoc ();
1.2.16.81 scriptEvent vector getVinePlantNormal ();
1.2.16.82 scriptEvent vector getWorldOrigin ();
1.2.16.83 scriptEvent float hasFunction (string functionName);
1.2.16.84 scriptEvent float hasInvItem (entity item);
1.2.16.85 scriptEvent float heal (string healDefName, float healScale);
1.2.16.86 scriptEvent void hide ();
1.2.16.87 scriptEvent float inPVS ();
1.2.16.88 scriptEvent float isDroppable ();
1.2.16.89 scriptEvent float isEnemy (entity ent);
1.2.16.90 scriptEvent float isFriend (entity ent);
1.2.16.91 scriptEvent float isFrobable ();
1.2.16.92 scriptEvent float isHidden ();
1.2.16.93 scriptEvent float isHilighted ();
1.2.16.94 scriptEvent float isInLiquid ();
1.2.16.95 scriptEvent float isLight ();
1.2.16.96 scriptEvent float isNeutral (entity ent);
1.2.16.97 scriptEvent float isType (string spawnclass);
1.2.16.98 scriptEvent float loadExternalData (string declFile, string prefix);
1.2.16.99 scriptEvent void noShadows (float noShadows);
1.2.16.100 scriptEvent void noShadowsDelayed (float noShadows, float delay);
1.2.16.101 scriptEvent float numBindChildren ();
1.2.16.102 scriptEvent float numTargets ();
1.2.16.103 scriptEvent void propagateSound (string soundName, float propVolMod, float msgTag);
1.2.16.104 scriptEvent void propSound (string name);
1.2.16.105 scriptEvent void propSoundMod (string name, float volMod);
1.2.16.106 scriptEvent entity randomTarget (string ignoreName);
1.2.16.107 scriptEvent float rangedThreatTo (entity target);
1.2.16.108 scriptEvent void removeBinds ();
1.2.16.109 scriptEvent void removeFrobPeer (entity peer);
1.2.16.110 scriptEvent void removeKey (string key);
1.2.16.111 scriptEvent void removeTarget (entity target);
1.2.16.112 scriptEvent float replaceInvItem (entity oldItem, entity newItem);
1.2.16.113 scriptEvent void ResetTimer (float stimId);
1.2.16.114 scriptEvent void reskinCollisionModel ();
1.2.16.115 scriptEvent void ResponseAdd (float type);
1.2.16.116 scriptEvent void ResponseAllow (float type, entity responder);
1.2.16.117 scriptEvent void ResponseEnable (float type, float state);
1.2.16.118 scriptEvent void ResponseIgnore (float type, entity responder);
1.2.16.119 scriptEvent void ResponseRemove (float type);
1.2.16.120 scriptEvent void ResponseSetAction (float type, string action);
1.2.16.121 scriptEvent void ResponseTrigger (entity source, float stimType);
1.2.16.122 scriptEvent void RestartTimer (float stimId);
1.2.16.123 scriptEvent void restorePosition ();
1.2.16.124 scriptEvent void setAngles (vector angles);
1.2.16.125 scriptEvent void setAngularVelocity (vector velocity);
1.2.16.126 scriptEvent void setClipMask (float clipMask);
1.2.16.127 scriptEvent void setColor (float parm0, float parm1, float parm2);
1.2.16.128 scriptEvent void setColorVec (vector newColor);
1.2.16.129 scriptEvent void setContents (float contents);
1.2.16.130 scriptEvent float setCurInvCategory (string categoryName);
1.2.16.131 scriptEvent entity setCurInvItem (string itemName);
1.2.16.132 scriptEvent void setDroppable (float droppable);
1.2.16.133 scriptEvent void setEntityRelation (entity ent, float relation);
1.2.16.134 scriptEvent void setFrobable (float frobable);
1.2.16.135 scriptEvent void setFrobActionScript (string frobActionScript);
1.2.16.136 scriptEvent void setFrobMaster (entity master);
1.2.16.137 scriptEvent void setGravity (vector newGravity);
1.2.16.138 scriptEvent void setGui (float handle, string guiFile);
1.2.16.139 scriptEvent void setGuiFloat (float handle, string key, float val);
1.2.16.140 scriptEvent void setGuiInt (float handle, string key, float val);
1.2.16.141 scriptEvent void setGuiString (float handle, string key, string val);
1.2.16.142 scriptEvent void setGuiStringFromKey (float handle, string key, entity src, string srcKey);
1.2.16.143 scriptEvent void setHealth (float health);
1.2.16.144 scriptEvent void setKey (string key, string value);
1.2.16.145 scriptEvent void setLinearVelocity (vector velocity);
1.2.16.146 scriptEvent void setMaxHealth (float maxHealth);
1.2.16.147 scriptEvent void setModel (string modelName);
1.2.16.148 scriptEvent void setName (string name);
1.2.16.149 scriptEvent void setNeverDormant (float enable);
1.2.16.150 scriptEvent void setOrigin (vector origin);
1.2.16.151 scriptEvent void setOwner (entity owner);
1.2.16.152 scriptEvent void setShaderParm (float parm, float value);
1.2.16.153 scriptEvent void setShaderParms (float parm0, float parm1, float parm2, float parm3);
1.2.16.154 scriptEvent void setSize (vector min, vector max);
1.2.16.155 scriptEvent void setSkin (string skinName);
1.2.16.156 scriptEvent void setSolid (float solidity);
1.2.16.157 scriptEvent void setSoundVolume (float newLevel);
1.2.16.158 scriptEvent void setTeam (float newTeam);
1.2.16.159 scriptEvent void SetTimerState (float stimId, float state);
1.2.16.160 scriptEvent void setUsedBy (entity ent, float b_canUse);
1.2.16.161 scriptEvent void setWorldOrigin (vector origin);
1.2.16.162 scriptEvent void show ();
1.2.16.163 scriptEvent void startFx (string fx);
1.2.16.164 scriptEvent float startSound (string sound, float channel, float netSync);
1.2.16.165 scriptEvent float startSoundShader (string shaderName, float channel);
1.2.16.166 scriptEvent void StartTimer (float stimId);
1.2.16.167 scriptEvent void StimAdd (float type, float radius);
1.2.16.168 scriptEvent void StimClearIgnoreList (float type);
1.2.16.169 scriptEvent void StimEmit (float type, float radius, vector stimOrigin);
1.2.16.170 scriptEvent void StimEnable (float type, float state);
1.2.16.171 scriptEvent void StimRemove (float type);
1.2.16.172 scriptEvent void StimSetScriptBased (float type, float state);
1.2.16.173 scriptEvent void stopSound (float channel, float netSync);
1.2.16.174 scriptEvent void StopTimer (float stimId);
1.2.16.175 scriptEvent void teleportTo (entity other);
1.2.16.176 scriptEvent float touches (entity other);
1.2.16.177 scriptEvent void unbind ();
1.2.16.178 scriptEvent void wait (float time);
1.2.16.179 scriptEvent void waitFrame ();
1.2.17 idAnimatedEntity
1.2.18 CFrobButton
1.2.19 CFrobDoor
1.2.20 CFrobDoorHandle
1.2.21 CFrobHandle
1.2.22 CFrobLever
1.2.23 CFrobLock
1.2.24 CFrobLockHandle
1.2.25 tdmFuncShooter
1.2.26 idEntityFx
1.2.27 idItem
1.2.28 idMoveableItem
1.2.29 idLight
1.2.30 idListener
1.2.31 idPlayerStart
1.2.32 idActivator
1.2.33 idPathCorner
1.2.34 idDamagable
1.2.35 idExplodable
1.2.36 idForceField
1.2.37 idAnimated
1.2.38 idStaticEntity
1.2.39 idFuncSmoke
1.2.40 idVacuumSeparatorEntity
1.2.41 idPortalEntity
1.2.42 idBeam
1.2.43 idShaking
1.2.44 idEarthQuake
1.2.45 idFuncPortal
1.2.46 idFuncAASPortal
1.2.47 idFuncAASObstacle
1.2.48 idPhantomObjects
1.2.49 idPortalSky
1.2.50 tdmVine
1.2.51 idMoveable
1.2.52 idMover
1.2.53 idMover_Binary
1.2.54 idRotater
1.2.55 idRiser
1.2.56 idPlayer
1.2.56.1 scriptEvent void changeWeaponName (string weaponName, string displayName);
1.2.56.2 scriptEvent void changeWeaponProjectile (string weaponName, string projectileDefName);
1.2.56.3 scriptEvent void checkAAS ();
1.2.56.4 scriptEvent void clearActiveInventoryMap ();
1.2.56.5 scriptEvent void clearActiveInventoryMapEnt ();
1.2.56.6 scriptEvent void clearMouseDeadTime ();
1.2.56.7 scriptEvent void customDeath ();
1.2.56.8 scriptEvent void deathMenu ();
1.2.56.9 scriptEvent void disableWeapon ();
1.2.56.10 scriptEvent void enableWeapon ();
1.2.56.11 scriptEvent void endZoom (float duration);
1.2.56.12 scriptEvent void exitTeleporter ();
1.2.56.13 scriptEvent float getButtons ();
1.2.56.14 scriptEvent float getCalibratedLightgemValue ();
1.2.56.15 scriptEvent string getCurrentWeapon ();
1.2.56.16 scriptEvent string getCurWeaponName ();
1.2.56.17 scriptEvent entity getDragged ();
1.2.56.18 scriptEvent float getFov ();
1.2.56.19 scriptEvent entity getFrobbed ();
1.2.56.20 scriptEvent entity getGrabbed ();
1.2.56.21 scriptEvent vector getHinderance (string source);
1.2.56.22 scriptEvent float getImmobilization (string source);
1.2.56.23 scriptEvent float getInventoryOverlay ();
1.2.56.24 scriptEvent vector getListenLoc ();
1.2.56.25 scriptEvent float getMouseGesture ();
1.2.56.26 scriptEvent vector getMove ();
1.2.56.27 scriptEvent string getNextHinderance (string prefix, string lastMatch);
1.2.56.28 scriptEvent string getNextImmobilization (string prefix, string lastMatch);
1.2.56.29 scriptEvent string getNextTurnHinderance (string prefix, string lastMatch);
1.2.56.30 scriptEvent float getObjectiveComp (float ObjNum, float CompNum);
1.2.56.31 scriptEvent float getObjectiveState (float ObjNum);
1.2.56.32 scriptEvent float getObjectiveVisible (float ObjNum);
1.2.56.33 scriptEvent string getPreviousWeapon ();
1.2.56.34 scriptEvent entity getShouldered ();
1.2.56.35 scriptEvent vector getTurnHinderance (string source);
1.2.56.36 scriptEvent vector getViewAngles ();
1.2.56.37 scriptEvent entity getWeaponEntity ();
1.2.56.38 scriptEvent void giveHealthPool (float amount);
1.2.56.39 scriptEvent entity heldEntity ();
1.2.56.40 scriptEvent float holdEntity (entity entity);
1.2.56.41 scriptEvent float isAirborne ();
1.2.56.42 scriptEvent float isLeaning ();
1.2.56.43 scriptEvent float isPeekLeaning ();
1.2.56.44 scriptEvent void missionFailed ();
1.2.56.45 scriptEvent void missionSuccess ();
1.2.56.46 scriptEvent float mouseGestureFinished ();
1.2.56.47 scriptEvent void objectiveCompUnlatch (float ObjNum, float CompNum);
1.2.56.48 scriptEvent void objectiveUnlatch (float ObjNum);
1.2.56.49 scriptEvent void pauseGame ();
1.2.56.50 scriptEvent void playStartSound ();
1.2.56.51 scriptEvent void readLightgemModifierFromWorldspawn ();
1.2.56.52 scriptEvent void resetWeaponProjectile (string weaponName);
1.2.56.53 scriptEvent void resetZoom ();
1.2.56.54 scriptEvent void ropeRemovalCleanup (entity ropeEnt);
1.2.56.55 scriptEvent void saveGame (string filename);
1.2.56.56 scriptEvent void selectWeapon (string weapon);
1.2.56.57 scriptEvent void setActiveInventoryMapEnt (entity mapEnt);
1.2.56.58 scriptEvent void setAirAccelerate (float newAccelerate);
1.2.56.59 scriptEvent void setFrobOnlyUsedByInv (float OnOff);
1.2.56.60 scriptEvent void setHinderance (string source, float mCap, float fCap);
1.2.56.61 scriptEvent void setImmobilization (string source, float type);
1.2.56.62 scriptEvent void setLightgemModifier (string modifierName, float value);
1.2.56.63 scriptEvent void setObjectiveComp (float ObjNum, float CompNum, float state);
1.2.56.64 scriptEvent void setObjectiveEnabling (float ObjNum, string strIn);
1.2.56.65 scriptEvent void setObjectiveNotification (float ObjNote);
1.2.56.66 scriptEvent void setObjectiveOngoing (float ObjNum, float val);
1.2.56.67 scriptEvent void setObjectiveOptional (float ObjNum, float val);
1.2.56.68 scriptEvent void setObjectiveState (float ObjNum, float State);
1.2.56.69 scriptEvent void setObjectiveText (float ObjNum, string newText);
1.2.56.70 scriptEvent void setObjectiveVisible (float ObjNum, float val);
1.2.56.71 scriptEvent void setPeekOverlayBackground ();
1.2.56.72 scriptEvent void setPeekView (float OnOff, vector origin);
1.2.56.73 scriptEvent void setSavePermissions (float permission);
1.2.56.74 scriptEvent void setSpyglassOverlayBackground ();
1.2.56.75 scriptEvent void setTurnHinderance (string source, float mCap, float fCap);
1.2.56.76 scriptEvent void setViewAngles (vector angles);
1.2.56.77 scriptEvent void startGamePlayTimer ();
1.2.56.78 scriptEvent void startMouseGesture (float key, float thresh, float test, float inverted, float turnHinderance, float decideTime, float deadTime);
1.2.56.79 scriptEvent void startZoom (float duration, float startFOV, float endFOV);
1.2.56.80 scriptEvent void stopFxFov ();
1.2.56.81 scriptEvent void stopMouseGesture ();
1.2.56.82 scriptEvent float testEvent1 (float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food);
1.2.56.83 scriptEvent entity testEvent2 (float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp);
1.2.56.84 scriptEvent vector testEvent3 (entity ent_prevres, vector vec_123, float float_pi, entity ent_player);
1.2.56.85 scriptEvent void triggerMissionEnd ();
1.2.56.86 scriptEvent void unpauseGame ();
1.2.56.87 scriptEvent float wasDamaged ();
1.2.57 idProjectile
1.2.58 idGuidedProjectile
1.2.59 CProjectileResult
1.2.60 CTarget_SetRelations
1.2.61 CTarget_SetEntityRelation
1.2.62 CTarget_ChangeEntityRelation
1.2.63 idThread
1.2.63.1 scriptEvent float acos (float cosine);
1.2.63.2 scriptEvent vector angRotate (vector angles1, vector angles2);
1.2.63.3 scriptEvent vector angToForward (vector angles);
1.2.63.4 scriptEvent vector angToRight (vector angles);
1.2.63.5 scriptEvent vector angToUp (vector angles);
1.2.63.6 scriptEvent float asin (float sine);
1.2.63.7 scriptEvent void assert (float condition);
1.2.63.8 scriptEvent void cacheSoundShader (string shaderName);
1.2.63.9 scriptEvent void callFunctionsByWildcard (string functionName);
1.2.63.10 scriptEvent float canPlant (vector traceStart, vector traceEnd, entity ignore, entity vine);
1.2.63.11 scriptEvent float ceil (float x);
1.2.63.12 scriptEvent void clearPersistentArgs ();
1.2.63.13 scriptEvent void clearSignalThread (float signalNum, entity ent);
1.2.63.14 scriptEvent void copySpawnArgs (entity ent);
1.2.63.15 scriptEvent float cos (float degrees);
1.2.63.16 scriptEvent vector CrossProduct (vector vec1, vector vec2);
1.2.63.17 scriptEvent void debugArrow (vector color, vector start, vector end, float size, float lifetime);
1.2.63.18 scriptEvent void debugBounds (vector color, vector mins, vector maxs, float lifetime);
1.2.63.19 scriptEvent void debugCircle (vector color, vector origin, vector dir, float radius, float numSteps, float lifetime);
1.2.63.20 scriptEvent void debugLine (vector color, vector start, vector end, float lifetime);
1.2.63.21 scriptEvent float DotProduct (vector vec1, vector vec2);
1.2.63.22 scriptEvent void drawText (string text, vector origin, float scale, vector color, float align, float lifetime);
1.2.63.23 scriptEvent float emitParticle (string particle, float startTime, float diversity, vector origin, vector angle);
1.2.63.24 scriptEvent void error (string text);
1.2.63.25 scriptEvent void fadeIn (vector color, float time);
1.2.63.26 scriptEvent void fadeOut (vector color, float time);
1.2.63.27 scriptEvent void fadeTo (vector color, float alpha, float time);
1.2.63.28 scriptEvent void firstPerson ();
1.2.63.29 scriptEvent float floor (float x);
1.2.63.30 scriptEvent float getCurrentMissionNum ();
1.2.63.31 scriptEvent string getcvar (string name);
1.2.63.32 scriptEvent float getcvarf (string name);
1.2.63.33 scriptEvent float getDifficultyLevel ();
1.2.63.34 scriptEvent string getDifficultyName (float difficultyLevel);
1.2.63.35 scriptEvent entity getEntity (string name);
1.2.63.36 scriptEvent float getFrameTime ();
1.2.63.37 scriptEvent float getInterceptTime (vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor);
1.2.63.38 scriptEvent entity getLocationPoint (vector point);
1.2.63.39 scriptEvent entity getMainAmbientLight ();
1.2.63.40 scriptEvent float getMissionStatistic (string statisticName);
1.2.63.41 scriptEvent entity getNextEntity (string key, string value, entity lastMatch);
1.2.63.42 scriptEvent float getPersistentFloat (string key);
1.2.63.43 scriptEvent string getPersistentString (string key);
1.2.63.44 scriptEvent vector getPersistentVector (string key);
1.2.63.45 scriptEvent float getPortAISoundLoss (float handle);
1.2.63.46 scriptEvent float getPortPlayerSoundLoss (float handle);
1.2.63.47 scriptEvent float getPortSoundLoss (float handle);
1.2.63.48 scriptEvent float getRelation (float team1, float team2);
1.2.63.49 scriptEvent float getTDMVersion ();
1.2.63.50 scriptEvent float getTicsPerSecond ();
1.2.63.51 scriptEvent float getTime ();
1.2.63.52 scriptEvent string getTraceBody ();
1.2.63.53 scriptEvent vector getTraceEndPos ();
1.2.63.54 scriptEvent entity getTraceEntity ();
1.2.63.55 scriptEvent float getTraceFraction ();
1.2.63.56 scriptEvent string getTraceJoint ();
1.2.63.57 scriptEvent vector getTraceNormal ();
1.2.63.58 scriptEvent string getTraceSurfType ();
1.2.63.59 scriptEvent void handleMissionEvent (entity objEnt, float eventType, string argument);
1.2.63.60 scriptEvent float influenceActive ();
1.2.63.61 scriptEvent void killthread (string threadName);
1.2.63.62 scriptEvent float log (float x);
1.2.63.63 scriptEvent void logString (float logClass, float logType, string output);
1.2.63.64 scriptEvent float max (float x, float y);
1.2.63.65 scriptEvent float min (float x, float y);
1.2.63.66 scriptEvent void music (string shaderName);
1.2.63.67 scriptEvent void offsetRelation (float team1, float team2, float val);
1.2.63.68 scriptEvent void onSignal (float signalNum, entity ent, string functionName);
1.2.63.69 scriptEvent void pause ();
1.2.63.70 scriptEvent float pointInLiquid (vector point, entity ignoreEntity);
1.2.63.71 scriptEvent float pointIsInBounds (vector point, vector mins, vector maxs);
1.2.63.72 scriptEvent float pow (float x, float y);
1.2.63.73 scriptEvent void print (string text);
1.2.63.74 scriptEvent void println (string text);
1.2.63.75 scriptEvent void projectDecal (vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle);
1.2.63.76 scriptEvent void radiusDamage (vector origin, entity inflictor, entity attacker, entity ignore, string damageDefName, float dmgPower);
1.2.63.77 scriptEvent float random (float range);
1.2.63.78 scriptEvent void saveConDump (string cmd, string cmd);
1.2.63.79 scriptEvent void say (string text);
1.2.63.80 scriptEvent void sessionCommand (string cmd);
1.2.63.81 scriptEvent void setCamera (entity cameraEnt);
1.2.63.82 scriptEvent void setcvar (string name, string value);
1.2.63.83 scriptEvent void setPersistentArg (string key, string value);
1.2.63.84 scriptEvent void setPortAISoundLoss (float handle, float value);
1.2.63.85 scriptEvent void setPortPlayerSoundLoss (float handle, float value);
1.2.63.86 scriptEvent void setPortSoundLoss (float handle, float value);
1.2.63.87 scriptEvent void setRelation (float team1, float team2, float val);
1.2.63.88 scriptEvent void setSecretsFound (float secrets);
1.2.63.89 scriptEvent void setSecretsTotal (float secrets);
1.2.63.90 scriptEvent void setShaderParm (float parm, float value);
1.2.63.91 scriptEvent void setSpawnArg (string key, string value);
1.2.63.92 scriptEvent float sin (float degrees);
1.2.63.93 scriptEvent entity spawn (string classname);
1.2.63.94 scriptEvent float SpawnFloat (string key, float default);
1.2.63.95 scriptEvent string SpawnString (string key, string default);
1.2.63.96 scriptEvent vector SpawnVector (string key, vector default);
1.2.63.97 scriptEvent float sqrt (float square);
1.2.63.98 scriptEvent float strFind (string text, string find, float casesensitive, float start, float end);
1.2.63.99 scriptEvent string strLeft (string text, float num);
1.2.63.100 scriptEvent float strLength (string text);
1.2.63.101 scriptEvent string strMid (string text, float start, float num);
1.2.63.102 scriptEvent string strRemove (string text, string remove);
1.2.63.103 scriptEvent string strReplace (string text, string remove, string replace);
1.2.63.104 scriptEvent string strRight (string text, float num);
1.2.63.105 scriptEvent string strSkip (string text, float num);
1.2.63.106 scriptEvent float strToFloat (string text);
1.2.63.107 scriptEvent float strToInt (string text);
1.2.63.108 scriptEvent void terminate (float threadNumber);
1.2.63.109 scriptEvent void threadname (string name);
1.2.63.110 scriptEvent float trace (vector start, vector end, vector mins, vector maxs, float contents_mask, entity passEntity);
1.2.63.111 scriptEvent float tracePoint (vector start, vector end, float contents_mask, entity passEntity);
1.2.63.112 scriptEvent string translate (string input);
1.2.63.113 scriptEvent void trigger (entity entityToTrigger);
1.2.63.114 scriptEvent float vecLength (vector vec);
1.2.63.115 scriptEvent vector vecNormalize (vector vec);
1.2.63.116 scriptEvent vector VecRotate (vector vector, vector angles);
1.2.63.117 scriptEvent vector VecToAngles (vector vec);
1.2.63.118 scriptEvent void wait (float time);
1.2.63.119 scriptEvent void waitFor (entity mover);
1.2.63.120 scriptEvent void waitForRender (entity e);
1.2.63.121 scriptEvent void waitForThread (float threadNumber);
1.2.63.122 scriptEvent void waitFrame ();
1.2.63.123 scriptEvent void warning (string text);
1.2.64 idSecurityCamera
1.2.65 Seed
1.2.66 idSound
1.2.67 idTarget_Remove
1.2.68 idTarget_Show
1.2.69 idTarget_Damage
1.2.70 idTarget_SessionCommand
1.2.71 idTarget_EndLevel
1.2.72 idTarget_WaitForButton
1.2.73 idTarget_SetGlobalShaderTime
1.2.74 idTarget_SetShaderParm
1.2.75 idTarget_SetShaderTime
1.2.76 idTarget_FadeEntity
1.2.77 idTarget_LightFadeIn
1.2.78 idTarget_LightFadeOut
1.2.79 idTarget_Give
1.2.80 idTarget_SetModel
1.2.81 idTarget_SetInfluence
1.2.82 idTarget_SetKeyVal
1.2.83 idTarget_SetFov
1.2.84 idTarget_CallObjectFunction
1.2.85 idTarget_PostScriptEvent
1.2.86 idTarget_EnableLevelWeapons
1.2.87 idTarget_RemoveWeapons
1.2.88 idTarget_FadeSoundClass
1.2.89 CTarget_AddObjectives
1.2.90 CTarget_SetObjectiveState
1.2.91 CTarget_SetObjectiveVisibility
1.2.92 CTarget_SetObjectiveComponentState
1.2.93 CTarget_StartConversation
1.2.94 CTarget_SetFrobable
1.2.95 CTarget_CallScriptFunction
1.2.96 CTarget_ChangeLockState
1.2.97 CTarget_ChangeTarget
1.2.98 CTarget_InterMissionTrigger
1.2.99 CTarget_SetTeam
1.2.100 CTarget_ItemRemove
1.2.101 idTrigger
1.2.102 idTrigger_Multi
1.2.103 idTrigger_EntityName
1.2.104 idTrigger_Timer
1.2.105 idTrigger_Count
1.2.106 idTrigger_Hurt
1.2.107 idTrigger_Fade
1.2.108 idTrigger_Touch
1.2.109 idTurret
1.2.110 idWeapon
1.2.110.1 scriptEvent void addToClip (float amount);
1.2.110.2 scriptEvent void allowDrop (float allow);
1.2.110.3 scriptEvent float ammoAvailable ();
1.2.110.4 scriptEvent float ammoInClip ();
1.2.110.5 scriptEvent float animDone (float channel, float blendOutFrames);
1.2.110.6 scriptEvent float animIsPaused (float channel);
1.2.110.7 scriptEvent float clipSize ();
1.2.110.8 scriptEvent entity createProjectile ();
1.2.110.9 scriptEvent void ejectBrass ();
1.2.110.10 scriptEvent void flashlight (float enable);
1.2.110.11 scriptEvent float getBlendFrames (float channel);
1.2.110.12 scriptEvent float getLightParm (float parmNum);
1.2.110.13 scriptEvent entity getOwner ();
1.2.110.14 scriptEvent entity getWorldModel ();
1.2.110.15 scriptEvent float isInvisible ();
1.2.110.16 scriptEvent void launchProjectiles (float num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower);
1.2.110.17 scriptEvent float melee ();
1.2.110.18 scriptEvent void netEndReload ();
1.2.110.19 scriptEvent void netReload ();
1.2.110.20 scriptEvent void nextWeapon ();
1.2.110.21 scriptEvent void pauseAnim (float channel, float bPause);
1.2.110.22 scriptEvent float playAnim (float channel, string animName);
1.2.110.23 scriptEvent float playCycle (float channel, string animName);
1.2.110.24 scriptEvent void setBlendFrames (float channel, float blendFrame);
1.2.110.25 scriptEvent void setLightParm (float parmNum, float value);
1.2.110.26 scriptEvent void setLightParms (float parm0, float parm1, float parm2, float parm3);
1.2.110.27 scriptEvent void showAttachment (string attName, float show);
1.2.110.28 scriptEvent void showAttachmentInd (float index, float show);
1.2.110.29 scriptEvent float totalAmmoCount ();
1.2.110.30 scriptEvent void useAmmo (float amount);
1.2.110.31 scriptEvent void weaponHolstered ();
1.2.110.32 scriptEvent void weaponLowering ();
1.2.110.33 scriptEvent void weaponOutOfAmmo ();
1.2.110.34 scriptEvent void weaponReady ();
1.2.110.35 scriptEvent void weaponReloading ();
1.2.110.36 scriptEvent void weaponRising ();
1.2.110.37 scriptEvent void weaponState (string stateFunction, float blendFrames);
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 float acos (float cosine);
Returns the angle in degrees with the given cosine.
Spawnclasses responding to this event: idThread
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_ItemRemove , 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 , idListener , 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
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 addFrobPeer (entity peer);
Adds the passed entity as a frob peer.
Spawnclasses responding to this event: idEntity
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 angRotate (vector angles1, vector angles2);
Rotates the given Euler angles by each other.
Spawnclasses responding to this event: idThread
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 applyImpulse (entity source, float bodyid, vector point, vector impulse);
Applies an impulse to the entity. Example: entity.applyImpulse($player1, 0, entity.getOrigin(), '0 0 2');
source : Pass $null_entity or the entity that applies the impulse
bodyid : For articulated figures, ID of the body, 0 for the first (main) body. Otherwise use 0.
point : Point on the body where the impulse is applied to
impulse : Vector of the impulse
Spawnclasses responding to this event: idEntity
scriptEvent float asin (float sine);
Returns the angle in degrees with the given sine.
Spawnclasses responding to this event: idThread
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 attack (entity enemy, float ignoreCollisions);
Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable.
enemy : enemy to attack
ignoreCollisions : whether to ignore obstacles in the way to the enemy when planning to attack
Spawnclasses responding to this event: idTurret
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 attackPosition (vector targetPos, float ignoreCollisions);
Direct the turret to manually attack a position. Use disableManualAttack() to disable.
targetPos : position to attack
ignoreCollisions : whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.
Spawnclasses responding to this event: idTurret
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 callFunctionsByWildcard (string functionName);
Calls global functions with names matching the specified wildcard in separate threads (in lexicographical order). INTERNAL: don't use in mission scripting!
Spawnclasses responding to this event: idThread
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 , idSecurityCamera
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 clearPersistentArgs ();
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 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 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 float createXrayOverlay (string guiFile);
Creates a GUI overlay with X-ray material. (must be used on the player)
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
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 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 disableManualAttack ();
Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.
Spawnclasses responding to this event: idTurret
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 float emitParticle (string particle, float startTime, float diversity, vector origin, vector angle);
Start a particle effect in the world without using an entity emitter. Will emit one quad per particle stage when first called with sys.getTime() as the start time. Designed to be called once per frame with the same startTime each call to achieve a normal particle effect, or on demand with sys.getTime() as the startTime for finer grained control, 1 quad at a time. Returns True (1) if there are more particles to be emitted from the stage, False (0) if the stage has released all its quads.
particle : String: name of particle effect.
startTime : Game seconds since map start: use sys.getTime() for the first call unless you want to back-date the particle so that it starts part way through its cycle.
diversity : Randomizer value between 0 and 1. All particles with the same diversity will have the same path and rotation. Use sys.random(1) for a random path.
origin : Origin of the particle effect.
angle : Axis for the particle effect. Use $<entityname>.getAngles() to align the particle to an entity. use '0 0 0' for an upright (world-aligned) particle effect.
Spawnclasses responding to this event: idThread
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 void flee (entity entToFleeFrom);
Flee from the given entity.
Spawnclasses responding to this event: idAI
scriptEvent void fleeFromPoint (vector pos);
Flee from the given position.
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
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 getAnimList (float channel);
Returns a list of all animations and their anim rates.
Spawnclasses responding to this event: idActor
scriptEvent float getAnimRate (float channel, string animName);
Returns the rate for the given animation. Returns -1 if animation cannot be found.
animName : The name of the animation.
Spawnclasses responding to this event: idActor
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
Returns the button state from the current user command.
Spawnclasses responding to this event: idPlayer
scriptEvent float getCalibratedLightgemValue ();
Returns the calibrated light gem value.
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 float getCurInvItemCount ();
Returns the item count of the currently highlighted inventory Item, if stackable.Returns - 1 if non - stackable
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 getcvarf (string name);
Returns float value 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 , idSecurityCamera
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 float getEntityFlag (string flagName);
Returns the value of the specified entity flag.
flagName : Can be one of (case insensitive): notarget: if true never attack or target this entity noknockback: if true no knockback from hits takedamage: if true this entity can be damaged hidden: if true this entity is not visible bindOrientated: if true both the master orientation is used for binding solidForTeam: if true this entity is considered solid when a physics team mate pushes entities forcePhysicsUpdate: if true always update from the physics whether the object moved or not selected: if true the entity is selected for editing neverDormant: if true the entity never goes dormant isDormant: if true the entity is dormant hasAwakened: before a monster has been awakened the first time, use full PVS for dormant instead of area-connected invisible: if true this entity cannot be seen inaudible: if true this entity cannot be heard
Spawnclasses responding to this event: idEntity
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 GetFractionalPosition ();
Returns a fraction between 0.00 (closed) and 1.00 (open).
Spawnclasses responding to this event: CBinaryFrobMover
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: idEntity
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 getInterceptTime (vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor);
Returns how much time it will take for an interceptor like a projectile to intercept a moving target at the earliest possible opportunity. Returns 0 if an intercept is not possible or the speed of the target and interceptor are too similar.
velocityTarget : current velocity of target
speedInterceptor : speed of interceptor
positionTarget : current position of target
positionInterceptor : starting position of interceptor
Spawnclasses responding to this event: idThread
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 vector getListenLoc ();
Retrieves the location of the listener when leaning.
Spawnclasses responding to this event: idPlayer
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 getLocationPoint (vector point);
Returns the idLocation entity corresponding to the specified point's location.
point : point whose location to check
Spawnclasses responding to this event: idThread
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 float getMaxHealth ();
Gets the max health of this 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. Updates only when AI lose sight of player 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 secretsFound: number of secrets found by the player secretsTotal: total number of secrets in the mission
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 entity getNextEnemy (entity lastMatch);
Returns the next enemy that the security camera can see.
lastMatch : search will start after this entity.Use $null_entity or pass an uninitialized entity variable to start a new search.The first result in a new search will be the player, if the camera can see him.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent entity getNextEntity (string key, string value, entity lastMatch);
Discover all entities in the map. Returns $null_entity when no more found.
key : Optional string: prefix for spawnarg key match. E.g. "target" will match "target", "target1" etc.
value : Optional string: spawnarg value to match. Can be used independently of key . If key is not set, all spawnargs will be checked for the value.
lastMatch : Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
Spawnclasses responding to this event: idThread
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 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 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 float getObjectiveVisible (float ObjNum);
Returns the current visibility of the objective with the number ObjNum.
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 getPersistentFloat (string key);
Returns the floating point value for the given persistent arg
Spawnclasses responding to this event: idThread
scriptEvent string getPersistentString (string key);
Returns the string for the given persistent arg
Spawnclasses responding to this event: idThread
scriptEvent vector getPersistentVector (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 tdm_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 getSecurityCameraState ();
Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent string getShader ();
Gets the shader name used by the light.
Spawnclasses responding to this event: idLight
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 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 entity getSpotLight ();
Returns the spotlight used by the camera. Returns null_entity if none is used.
Spawnclasses responding to this event: idSecurityCamera
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 string getTraceSurfType ();
Returns the type of the surface (i.e. metal, snow) which was hit 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 float getTurretState ();
Returns the turret's state. 0 = passive: no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.
Spawnclasses responding to this event: idTurret
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 getVectorToIdealOrigin ();
Returns the vector from where the AI is to where he ideally should be
Spawnclasses responding to this event: idAI
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 hasInvItem (entity item);
Tests whether the player has the specified item entity in his inventory.
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 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 isAirborne ();
Checks whether the player is in the air.
Spawnclasses responding to this event: idPlayer
scriptEvent float isAtRest ();
Returns true if object is not moving
Spawnclasses responding to this event: idMoveable
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 isLeaning ();
Get whether the player is leaning
Spawnclasses responding to this event: idPlayer
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 , CFrobLock
scriptEvent float isMoving ();
Returns true if a mover is moving
Spawnclasses responding to this event: idMover
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 isPeekLeaning ();
Get whether the player is peek leaning (against a keyhole or crack)
Spawnclasses responding to this event: idPlayer
scriptEvent float IsPickable ();
Returns true (nonzero) if this frobmover is pickable.
Spawnclasses responding to this event: CBinaryFrobMover , CFrobLock
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 void launchGuided (vector start, vector dir, vector velocity, entity target);
Launches the guided projectile from <start> in direction <dir> with the given <velocity> at <target entity>. Pass $null_entity to fire an unguided projectile.
Spawnclasses responding to this event: idGuidedProjectile
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
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 , CFrobLock
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 max (float x, float y);
returns the larger of two provided float values.
Spawnclasses responding to this event: idThread
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 float min (float x, float y);
returns the smaller of two provided float values.
Spawnclasses responding to this event: idThread
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, but be sure to give it the topmost bindmaster
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 ();
Switches the emitter off.
Spawnclasses responding to this event: idFuncEmitter , idLight , idSecurityCamera , idSound
scriptEvent void offsetRelation (float team1, float team2, float val);
No description
Spawnclasses responding to this event: idThread
scriptEvent void On ();
Switches the emitter on.
Spawnclasses responding to this event: idFuncEmitter , idLight , idSecurityCamera , 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
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);
Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. Plays the given animation on the given channel. Returns false if anim doesn't exist.
Spawnclasses responding to this event: idActor , idWeapon
scriptEvent float playCustomAnim (string animName);
Plays the given animation on legs and torso. Returns false if anim doesn't exist.
Spawnclasses responding to this event: idAI
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 pointIsInBounds (vector point, vector mins, vector maxs);
Returns true if the point is within the bounds specified.
point : test whether this point is in the bounds
mins : minimal corner of the bounds
maxs : maximal corner of the bounds
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 projectDecal (vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle);
Performs a trace from the specified origin and end positions, then projects a decal in that direction.
traceOrigin : Start of the trace.
traceEnd : End of the trace.
passEntity : This entity will be considered non-solid by the trace.
decal : Decal to be projected.
decalSize : Size of the decal quad.
angle : Angle of the decal quad.
Spawnclasses responding to this event: idThread
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 removeFrobPeer (entity peer);
Removes the passed entity as a frob peer.
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 reskinCollisionModel ();
For use after setSkin() on moveables and static models, if the CM needs to be refreshed to update surface properties after a skin change. CM will be regenerated from the original model file with the new skin.
Spawnclasses responding to this event: idEntity
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
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 saveConDump (string cmd, string cmd);
Saves condump into FM directory; first argument is appended to dump filename, everything before last occurence of second argument is removed
Spawnclasses responding to this event: idThread
scriptEvent void saveGame (string filename);
No description
Spawnclasses responding to this event: idPlayer
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 setAirAccelerate (float newAccelerate);
Sets a multiplier for the player's horizontal acceleration while airborne. Default is 1.0.
Spawnclasses responding to this event: idPlayer
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 float setAnimRate (float channel, string animName, float animRate);
Sets the animation rate to the given value. Returns 1 if successful, otherwise -1
animName : The name of the animation.
animRate : The rate to set the animation to.
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). See also setColorVec for a variant that accepts a vector instead.
parm0 : red
parm1 : green
parm2 : blue
Spawnclasses responding to this event: idEntity
scriptEvent void setColorVec (vector newColor);
Similar to setColor, but accepts the new RGB color as a vector instead of 3 different floats.
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 setFrobActionScript (string frobActionScript);
Changes the frob action script of this entity. Also updates the 'frob_action_script' spawnarg.
frobActionScript : the new script to call when the entity is frobbed
Spawnclasses responding to this event: idEntity
scriptEvent void setFrobMaster (entity master);
Sets the passed entity as the frob master. Pass null_entity to remove the current frob master, if any.
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 setGravity (vector newGravity);
Sets a new gravity vector for this entity. Note that non-upright vectors are poorly supported at present.
Spawnclasses responding to this event: idEntity
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: idEntity
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
Modifies the orientation of the joint based on the transform type.
Spawnclasses responding to this event: idAnimatedEntity
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 setMaxHealth (float maxHealth);
Use these to set the max health of AI or players. Note that the health bar GUI is limited to showing a max health of 100. If health exceeds max health after this, health will be set to be equal to max health (which would also update the AI_DEAD flag)
Spawnclasses responding to this event: idEntity
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 setObjectiveNotification (float ObjNote);
Turns the notifications (sound ++ text) for objectives on/off.
ObjNote : Turn notifications on/off
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 setPeekOverlayBackground ();
Sets the background overlay for peeking, depending on aspect ratio.
Spawnclasses responding to this event: idPlayer
scriptEvent void setPeekView (float OnOff, vector origin);
Toggle whether we should use a view from a peek entity as the player's view
Spawnclasses responding to this event: idPlayer
scriptEvent void setPersistentArg (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 setSavePermissions (float permission);
No description
permission : 0
Spawnclasses responding to this event: idPlayer
scriptEvent void setSecretsFound (float secrets);
Set how many secrets the player has found. Use getMissionStatistic() for getting the current value.
Spawnclasses responding to this event: idThread
scriptEvent void setSecretsTotal (float secrets);
Set how many secrets exist in the map in total. Use getMissionStatistic() for getting the current value.
Spawnclasses responding to this event: idThread
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 setSightThreshold (float sightThreshold);
Set the sight threshold of the security camera: how lit up the player's lightgem needs to be in order to be seen. 0.0 to 1.0
Spawnclasses responding to this event: idSecurityCamera
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 setSmoke (string particleDef);
Changes the smoke particle of a func_smoke.
Spawnclasses responding to this event: idFuncSmoke
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 setSolid (float solidity);
Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks.
Spawnclasses responding to this event: idEntity
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 setSpyglassOverlayBackground ();
Sets the background overlay for the spyglass, depending on aspect ratio.
Spawnclasses responding to this event: idPlayer
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 setUsedBy (entity ent, float b_canUse);
Allows to change which entities can use this entity.
ent : specify an entity here, like a key
b_canUse : whether the specified entity can use this entity
Spawnclasses responding to this event: idEntity
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 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 state_light (float set);
Switches the spotlight on or off. Respects the security camera's power state.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void state_see_AI (float set);
Set whether the camera can see AIs.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void state_see_animals (float set);
Set whether the camera can see animals. Checked after seeAI or seeBodies.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void state_see_bodies (float set);
Set whether the camera can see bodies.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void state_see_player (float set);
Set whether the camera can see the player.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void state_sweep (float set);
Enables or disables the camera's sweeping.
Spawnclasses responding to this event: idSecurityCamera
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 StimEmit (float type, float radius, vector stimOrigin);
Emits a stim in a radius around the specified origin. The entity from which this event is called needs to have the corresponding stim setup on itself, it does not need to be active.
type : Index ID of the stim to emit, i.e. 21 or STIM_TRIGGER for a trigger stim.
radius : How far the stim will reach. Pass negative to use the radius settings on the entity.
stimOrigin : Emit the stim from here.
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 StimSetScriptBased (float type, float state);
Converts a stim to being script-based. It will only be emitted when a script calls StimEmit on the entity.
type : Index ID of the stim to alter, i.e. 21 or STIM_TRIGGER for a trigger stim.
state : New state.
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 stopPatrol ();
Stops an AI from patrolling
Spawnclasses responding to this event: idAI
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 float strFind (string text, string find, float casesensitive, float start, float end);
Return the position of the given substring, counting from 0, or -1 if not found.
casesensitive : 0
start : 0
end : -1
Spawnclasses responding to this event: idThread
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 strRemove (string text, string remove);
Replace all occurances of the given substring with "". Example: StrRemove("abba","bb") results in "aa".
Spawnclasses responding to this event: idThread
scriptEvent string strReplace (string text, string remove, string replace);
Replace all occurances of the given string with the replacement string. Example: StrRemove("abba","bb","ccc") results in "accca".
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 testEvent1 (float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food);
No description
Spawnclasses responding to this event: idPlayer
scriptEvent entity testEvent2 (float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp);
No description
Spawnclasses responding to this event: idPlayer
scriptEvent vector testEvent3 (entity ent_prevres, vector vec_123, float float_pi, entity ent_player);
No description
Spawnclasses responding to this event: idPlayer
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 toggle_light ();
Toggles the spotlight on/off.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void toggle_see_AI ();
Toggles whether the camera can see AIs.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void toggle_see_animals ();
Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void toggle_see_bodies ();
Toggles whether the camera can see bodies.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void toggle_see_player ();
Toggles whether the camera can see the player.
Spawnclasses responding to this event: idSecurityCamera
scriptEvent void toggle_sweep ();
Toggles the camera sweep.
Spawnclasses responding to this event: idSecurityCamera
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 , CFrobLock
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
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 , CFrobLock
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 VecRotate (vector vector, vector angles);
Rotates a vector by the specified angles.
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
idClass
scriptEvent void remove ();
Removes the entity from the game. For AI, use kill() instead.
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
Plays footstep sound.
scriptEvent string getAnimList (float channel);
Returns a list of all animations and their anim rates.
scriptEvent float getAnimRate (float channel, string animName);
Returns the rate for the given animation. Returns -1 if animation cannot be found.
animName : The name of the animation.
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 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.
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);
Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. 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"
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 float setAnimRate (float channel, string animName, float animRate);
Sets the animation rate to the given value. Returns 1 if successful, otherwise -1
animName : The name of the animation.
animRate : The rate to set the animation to.
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 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 entity closestReachableEnemy ();
Used for determining tactile alert targets
scriptEvent entity closestReachableEnemyOfEntity (entity team_mate);
Finds another character's closest reachable enemy
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 void flee (entity entToFleeFrom);
Flee from the given entity.
scriptEvent void fleeFromPoint (vector pos);
Flee from the given position.
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 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 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 getVectorToIdealOrigin ();
Returns the vector from where the AI is to where he ideally should be
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
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 float playCustomAnim (string animName);
Plays the given animation on legs and torso. Returns false if anim doesn't exist.
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 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 void stopMove ();
no description
scriptEvent void stopPatrol ();
Stops an AI from patrolling
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
Changes to left foot and plays footstep sound.
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 GetFractionalPosition ();
Returns a fraction between 0.00 (closed) and 1.00 (open).
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.
scriptEvent void Off ();
Switches the emitter off.
scriptEvent void On ();
Switches the emitter on.
idEntity
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 addFrobPeer (entity peer);
Adds the passed entity as a frob peer.
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 applyImpulse (entity source, float bodyid, vector point, vector impulse);
Applies an impulse to the entity. Example: entity.applyImpulse($player1, 0, entity.getOrigin(), '0 0 2');
source : Pass $null_entity or the entity that applies the impulse
bodyid : For articulated figures, ID of the body, 0 for the first (main) body. Otherwise use 0.
point : Point on the body where the impulse is applied to
impulse : Vector of the impulse
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 float createXrayOverlay (string guiFile);
Creates a GUI overlay with X-ray material. (must be used on the player)
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 float getCurInvItemCount ();
Returns the item count of the currently highlighted inventory Item, if stackable.Returns - 1 if non - stackable
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 float getEntityFlag (string flagName);
Returns the value of the specified entity flag.
flagName : Can be one of (case insensitive): notarget: if true never attack or target this entity noknockback: if true no knockback from hits takedamage: if true this entity can be damaged hidden: if true this entity is not visible bindOrientated: if true both the master orientation is used for binding solidForTeam: if true this entity is considered solid when a physics team mate pushes entities forcePhysicsUpdate: if true always update from the physics whether the object moved or not selected: if true the entity is selected for editing neverDormant: if true the entity never goes dormant isDormant: if true the entity is dormant hasAwakened: before a monster has been awakened the first time, use full PVS for dormant instead of area-connected invisible: if true this entity cannot be seen inaudible: if true this entity cannot be heard
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 getHealth ();
Returns the current health.
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 float getMaxHealth ();
Gets the max health of this 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 hasInvItem (entity item);
Tests whether the player has the specified item entity in his inventory.
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 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, but be sure to give it the topmost bindmaster
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 removeFrobPeer (entity peer);
Removes the passed entity as a frob peer.
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 reskinCollisionModel ();
For use after setSkin() on moveables and static models, if the CM needs to be refreshed to update surface properties after a skin change. CM will be regenerated from the original model file with the new skin.
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). See also setColorVec for a variant that accepts a vector instead.
parm0 : red
parm1 : green
parm2 : blue
scriptEvent void setColorVec (vector newColor);
Similar to setColor, but accepts the new RGB color as a vector instead of 3 different floats.
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 setFrobActionScript (string frobActionScript);
Changes the frob action script of this entity. Also updates the 'frob_action_script' spawnarg.
frobActionScript : the new script to call when the entity is frobbed
scriptEvent void setFrobMaster (entity master);
Sets the passed entity as the frob master. Pass null_entity to remove the current frob master, if any.
scriptEvent void setGravity (vector newGravity);
Sets a new gravity vector for this entity. Note that non-upright vectors are poorly supported at present.
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 setHealth (float health);
Use these to set the health of AI or players (this also updates the AI_DEAD flag)
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 setMaxHealth (float maxHealth);
Use these to set the max health of AI or players. Note that the health bar GUI is limited to showing a max health of 100. If health exceeds max health after this, health will be set to be equal to max health (which would also update the AI_DEAD flag)
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 setSolid (float solidity);
Set the solidity of the entity. If the entity has never been solid before it will be assigned solid and opaque contents/clip masks.
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 setUsedBy (entity ent, float b_canUse);
Allows to change which entities can use this entity.
ent : specify an entity here, like a key
b_canUse : whether the specified entity can use this entity
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 StimEmit (float type, float radius, vector stimOrigin);
Emits a stim in a radius around the specified origin. The entity from which this event is called needs to have the corresponding stim setup on itself, it does not need to be active.
type : Index ID of the stim to emit, i.e. 21 or STIM_TRIGGER for a trigger stim.
radius : How far the stim will reach. Pass negative to use the radius settings on the entity.
stimOrigin : Emit the stim from here.
scriptEvent void StimEnable (float type, float state);
No description
state : 0 = disabled, 1 = enabled
scriptEvent void StimRemove (float type);
No description
scriptEvent void StimSetScriptBased (float type, float state);
Converts a stim to being script-based. It will only be emitted when a script calls StimEmit on the entity.
type : Index ID of the stim to alter, i.e. 21 or STIM_TRIGGER for a trigger stim.
state : New state.
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.
Modifies the orientation of the joint based on the transform type.
Modifies the position of the joint based on the transform type.
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 float IsLocked ();
Returns true (nonzero) if the mover is currently locked.
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 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.
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)
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 string getShader ();
Gets the shader name used by the light.
scriptEvent void Off ();
Switches the emitter off.
scriptEvent void On ();
Switches the emitter 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
idListener
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)
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)
Plays footstep sound.
scriptEvent void launchMissiles (string projectilename, string sound, string launchbone, string targetbone, float numshots, float framedelay);
Launches a projectile.
Changes to left foot and plays footstep sound.
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)
scriptEvent void setSmoke (string particleDef);
Changes the smoke particle of a func_smoke.
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
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
Returns the button state from the current user command.
scriptEvent float getCalibratedLightgemValue ();
Returns the calibrated light gem value.
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 vector getListenLoc ();
Retrieves the location of the listener when leaning.
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 float getObjectiveVisible (float ObjNum);
Returns the current visibility of the objective with the number ObjNum.
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 float isAirborne ();
Checks whether the player is in the air.
scriptEvent float isLeaning ();
Get whether the player is leaning
scriptEvent float isPeekLeaning ();
Get whether the player is peek leaning (against a keyhole or crack)
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 saveGame (string filename);
No description
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 setAirAccelerate (float newAccelerate);
Sets a multiplier for the player's horizontal acceleration while airborne. Default is 1.0.
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 setObjectiveNotification (float ObjNote);
Turns the notifications (sound ++ text) for objectives on/off.
ObjNote : Turn notifications on/off
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 setPeekOverlayBackground ();
Sets the background overlay for peeking, depending on aspect ratio.
scriptEvent void setPeekView (float OnOff, vector origin);
Toggle whether we should use a view from a peek entity as the player's view
scriptEvent void setSavePermissions (float permission);
No description
permission : 0
scriptEvent void setSpyglassOverlayBackground ();
Sets the background overlay for the spyglass, depending on aspect ratio.
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 float testEvent1 (float float_pi, float int_beef, float float_exp, string string_tdm, float float_exp10, float int_food);
No description
scriptEvent entity testEvent2 (float int_prevres, vector vec_123, float int_food, entity ent_player, entity ent_null, float float_pi, float float_exp);
No description
scriptEvent vector testEvent3 (entity ent_prevres, vector vec_123, float float_pi, entity ent_player);
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 tdm_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
idGuidedProjectile
scriptEvent void launchGuided (vector start, vector dir, vector velocity, entity target);
Launches the guided projectile from <start> in direction <dir> with the given <velocity> at <target entity>. Pass $null_entity to fire an unguided projectile.
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 float acos (float cosine);
Returns the angle in degrees with the given cosine.
scriptEvent vector angRotate (vector angles1, vector angles2);
Rotates the given Euler angles by each other.
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 float asin (float sine);
Returns the angle in degrees with the given sine.
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 void callFunctionsByWildcard (string functionName);
Calls global functions with names matching the specified wildcard in separate threads (in lexicographical order). INTERNAL: don't use in mission scripting!
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 clearPersistentArgs ();
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 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 float emitParticle (string particle, float startTime, float diversity, vector origin, vector angle);
Start a particle effect in the world without using an entity emitter. Will emit one quad per particle stage when first called with sys.getTime() as the start time. Designed to be called once per frame with the same startTime each call to achieve a normal particle effect, or on demand with sys.getTime() as the startTime for finer grained control, 1 quad at a time. Returns True (1) if there are more particles to be emitted from the stage, False (0) if the stage has released all its quads.
particle : String: name of particle effect.
startTime : Game seconds since map start: use sys.getTime() for the first call unless you want to back-date the particle so that it starts part way through its cycle.
diversity : Randomizer value between 0 and 1. All particles with the same diversity will have the same path and rotation. Use sys.random(1) for a random path.
origin : Origin of the particle effect.
angle : Axis for the particle effect. Use $<entityname>.getAngles() to align the particle to an entity. use '0 0 0' for an upright (world-aligned) particle effect.
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 getcvarf (string name);
Returns float value 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 float getInterceptTime (vector velocityTarget, float speedInterceptor, vector positionTarget, vector positionInterceptor);
Returns how much time it will take for an interceptor like a projectile to intercept a moving target at the earliest possible opportunity. Returns 0 if an intercept is not possible or the speed of the target and interceptor are too similar.
velocityTarget : current velocity of target
speedInterceptor : speed of interceptor
positionTarget : current position of target
positionInterceptor : starting position of interceptor
scriptEvent entity getLocationPoint (vector point);
Returns the idLocation entity corresponding to the specified point's location.
point : point whose location to check
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. Updates only when AI lose sight of player 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 secretsFound: number of secrets found by the player secretsTotal: total number of secrets in the mission
scriptEvent entity getNextEntity (string key, string value, entity lastMatch);
Discover all entities in the map. Returns $null_entity when no more found.
key : Optional string: prefix for spawnarg key match. E.g. "target" will match "target", "target1" etc.
value : Optional string: spawnarg value to match. Can be used independently of key . If key is not set, all spawnargs will be checked for the value.
lastMatch : Last match: search will start after this entity. Use $null_entity or pass an uninitialized entity variable to start a new search.
scriptEvent float getPersistentFloat (string key);
Returns the floating point value for the given persistent arg
scriptEvent string getPersistentString (string key);
Returns the string for the given persistent arg
scriptEvent vector getPersistentVector (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 string getTraceSurfType ();
Returns the type of the surface (i.e. metal, snow) which was hit 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 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 float max (float x, float y);
returns the larger of two provided float values.
scriptEvent float min (float x, float y);
returns the smaller of two provided float values.
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 pointIsInBounds (vector point, vector mins, vector maxs);
Returns true if the point is within the bounds specified.
point : test whether this point is in the bounds
mins : minimal corner of the bounds
maxs : maximal corner of the bounds
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 projectDecal (vector traceOrigin, vector traceEnd, entity passEntity, string decal, float decalSize, float angle);
Performs a trace from the specified origin and end positions, then projects a decal in that direction.
traceOrigin : Start of the trace.
traceEnd : End of the trace.
passEntity : This entity will be considered non-solid by the trace.
decal : Decal to be projected.
decalSize : Size of the decal quad.
angle : Angle of the decal quad.
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 saveConDump (string cmd, string cmd);
Saves condump into FM directory; first argument is appended to dump filename, everything before last occurence of second argument is removed
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 setPersistentArg (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 setSecretsFound (float secrets);
Set how many secrets the player has found. Use getMissionStatistic() for getting the current value.
scriptEvent void setSecretsTotal (float secrets);
Set how many secrets exist in the map in total. Use getMissionStatistic() for getting the current value.
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 float strFind (string text, string find, float casesensitive, float start, float end);
Return the position of the given substring, counting from 0, or -1 if not found.
casesensitive : 0
start : 0
end : -1
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 strRemove (string text, string remove);
Replace all occurances of the given substring with "". Example: StrRemove("abba","bb") results in "aa".
scriptEvent string strReplace (string text, string remove, string replace);
Replace all occurances of the given string with the replacement string. Example: StrRemove("abba","bb","ccc") results in "accca".
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.
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 VecRotate (vector vector, vector angles);
Rotates a vector by the specified angles.
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.
idSecurityCamera
scriptEvent float canSee (entity ent);
no description
scriptEvent entity getEnemy ();
no description
scriptEvent entity getNextEnemy (entity lastMatch);
Returns the next enemy that the security camera can see.
lastMatch : search will start after this entity.Use $null_entity or pass an uninitialized entity variable to start a new search.The first result in a new search will be the player, if the camera can see him.
scriptEvent float getSecurityCameraState ();
Returns the security camera's state. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = inactive, 5 = destroyed.
scriptEvent entity getSpotLight ();
Returns the spotlight used by the camera. Returns null_entity if none is used.
scriptEvent void Off ();
Switches the emitter off.
scriptEvent void On ();
Switches the emitter on.
scriptEvent void setSightThreshold (float sightThreshold);
Set the sight threshold of the security camera: how lit up the player's lightgem needs to be in order to be seen. 0.0 to 1.0
scriptEvent void state_light (float set);
Switches the spotlight on or off. Respects the security camera's power state.
scriptEvent void state_see_AI (float set);
Set whether the camera can see AIs.
scriptEvent void state_see_animals (float set);
Set whether the camera can see animals. Checked after seeAI or seeBodies.
scriptEvent void state_see_bodies (float set);
Set whether the camera can see bodies.
scriptEvent void state_see_player (float set);
Set whether the camera can see the player.
scriptEvent void state_sweep (float set);
Enables or disables the camera's sweeping.
scriptEvent void toggle_light ();
Toggles the spotlight on/off.
scriptEvent void toggle_see_AI ();
Toggles whether the camera can see AIs.
scriptEvent void toggle_see_animals ();
Toggles whether the camera can see bodies. Checked after seeAI or seeBodies.
scriptEvent void toggle_see_bodies ();
Toggles whether the camera can see bodies.
scriptEvent void toggle_see_player ();
Toggles whether the camera can see the player.
scriptEvent void toggle_sweep ();
Toggles the camera sweep.
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 ();
Switches the emitter off.
scriptEvent void On ();
Switches the emitter 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)
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)
CTarget_ItemRemove
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)
idTurret
scriptEvent void attack (entity enemy, float ignoreCollisions);
Direct the turret to manually attack the specified entity. Use disableManualAttack() to disable.
enemy : enemy to attack
ignoreCollisions : whether to ignore obstacles in the way to the enemy when planning to attack
scriptEvent void attackPosition (vector targetPos, float ignoreCollisions);
Direct the turret to manually attack a position. Use disableManualAttack() to disable.
targetPos : position to attack
ignoreCollisions : whether to ignore obstacles in the way to the target position when planning to attack. Recommended true for this event.
scriptEvent void disableManualAttack ();
Stop attacking the manually specified enemy or position and return to automatic target acquisition mode.
scriptEvent float getTurretState ();
Returns the turret's state. 0 = passive: no active security cameras connected. 1 = unalerted, 2 = suspicious, 3 = fully alerted, 4 = power off, 5 = destroyed.
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);
Do not use, this is part of TDM's internal mechanics. Use playCustomAnim() on AI.in scripts instead of this. 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