void ActivateClientExploder(<exploder id>)
-
[MANDATORY] <exploder id> id of exploder to activate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Activates a client side exploderThis is sent as a reliable command, and will not work with killcam or demos.
EXAMPLE: ActivateClientExploder( 101 )
void ActivateClientRadiantExploder(<exploder id>)
- [MANDATORY] <exploder id> string id of exploder to activate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Activates a client side radiant exploder
EXAMPLE: ActivateClientRadiantExploder( "light_switch" )
void <actor> ActorIKEnabled()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines whether this actor can use IK functions. Returns true if IK is available, otherwise false.
EXAMPLE: if (guy ActorIKEnabled()) ...
void AddAwarenessIndicator(<pos>,<material>)
- [MANDATORY] <pos> awareness location
- [MANDATORY] <material> awareness material
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Draw an awareness indicator
EXAMPLE: AddAwarenessIndicator(ai.origin, "hit_material_green" )
void <player> AddBonusCardStat(<bonuscard>,<statname>,<statincrease>,<currentclassnum>)
- [MANDATORY] <bonuscard> Bonus Card define from _bonuscards.gsh
- [MANDATORY] <statname> The name of the stat you wish to set
- [MANDATORY] <statincrease> The amount you would like to increase the stat
- [MANDATORY] <currentclassnum> The loadout the player is using
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indicated stat for that bonus card
EXAMPLE: self AddBonusCardStat( BONUSCARD_OVERKILL, "kills", 1, self.class_num )
void AddDemoBookmark(<type>,<time>,<client1>,<client2>,<scoreEventPriority>,<entityNumber>,<eType>,<birthTime>,<overrideEntityCamera>,[actorEntityNumber])
- [MANDATORY] <type> the type of bookmark
- [MANDATORY] <time> the time of recording the bookmark
- [MANDATORY] <client1> the client related to the bookmark
- [MANDATORY] <client2> other client which is associated with the bookmark
- [MANDATORY] <scoreEventPriority>
- [MANDATORY] <entityNumber> The entity number
- [MANDATORY] <eType> Entity type
- [MANDATORY] <birthTime> Birth Time
- [MANDATORY] <overrideEntityCamera> Whether to override Entity Camera
- [OPTIONAL] [actorEntityNumber]
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: adds the information to the demo bookmarking system
EXAMPLE: AddDemoBookmark( bookmark_string, gettime(), self GetEntityNumber(), 255, 0, inflictorEntNum, inflictorEntType, inflictorBirthTime, false, self.grenade_multiattack_ent GetEntityNumber() )
void AddEntityInfluencer(<name>,<entity>,<team mask>)
- [MANDATORY] <name> valid spawn influencer preset name.
- [MANDATORY] <entity> Attached to entity. Goes away when entity is deleted. Unless a time is set.
- [MANDATORY] <team mask> teams that this influencer will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a new influencer of <name> attached to <entity>
EXAMPLE: influencer_id = AddEntityInfluencer( name, player, allies_mask )
void <player> AddFriendlyScrambler(<x>,<y>,<handle>)
- [MANDATORY] <x> X coord (float)
- [MANDATORY] <y> Y coord (float)
- [MANDATORY] <handle> will be used to remove the scrambler (integer)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Adds new friendly scrambler to the compass
EXAMPLE: player AddFriendlyScrambler( scrambler.origin[0], scrambler.origin[1], scrambler.handle )
void AddInfluencer(<name>,<origin>,<team mask>)
- [MANDATORY] <name> valid spawn influencer preset name.
- [MANDATORY] <origin> center point of the influencer
- [MANDATORY] <team mask> teams that this influencer will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a new influencer of <name> at <origin>
EXAMPLE: influencer_id = AddInfluencer( name, origin, allies_mask )
void AddOrientedInfluencer(<name>,<origin>,<angles>,<team mask>)
- [MANDATORY] <name> valid spawn influencer preset name.
- [MANDATORY] <origin> center point of the influencer
- [MANDATORY] <angles> angles of entity
- [MANDATORY] <team mask> teams that this influencer will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a new influencer of <name> at <origin> and <angles>
EXAMPLE: influencer_id = AddOrientedInfluencer( name, origin, angles, allies_mask )
void <player> AddSensorGrenadeArea(<position>,<handle>)
- [MANDATORY] <position> origin
- [MANDATORY] <handle> will be used to remove the sensor
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Adds new sensor grenade radius indicator to the compass
EXAMPLE: player AddSensorGrenadeArea( sensor.origin, sensor.handle )
void AddSpawnPoints(<team>,<parentID>)
- [MANDATORY] <team> The team
- [MANDATORY] <parentID>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds spawnpoints to the spawn system
EXAMPLE: AddSpawnPoints( "allies", "mp_tdm_spawn" )
entity AddTestClient()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a test client to the map and returns a reference to that client.
EXAMPLE: ent[i] = AddTestClient()
void AddToInterestPool(<value>,<priority>,<lifespan>,<point of interest>,<originator>,[unique])
- [MANDATORY] <value> Amount the event adds to the pool. (integer)
- [MANDATORY] <priority> How important is the event. (integer)
- [MANDATORY] <lifespan> Time the event stays in the pool. (float)
- [MANDATORY] <point of interest> Position the AI will investigate. (vector3)
- [MANDATORY] <originator> Entity that caused the event.
- [OPTIONAL] [unique] Only one of this type can exist in the pool. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Add a script event to the sentient's interest pool.
EXAMPLE: point = self AddToInterestPool( 500, 10, 5, ai.origin, ai )
void AddZombieBoxWeapon(<weapon>,<weaponModelName>,<isDualWield>)
- [MANDATORY] <weapon> The weapon to add
- [MANDATORY] <weaponModelName> The model name of the weapon
- [MANDATORY] <isDualWield> True if the weapon is dual wield, false otherwise
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Adds a zombie box weapon
EXAMPLE: AddZombieBoxWeapon( weapon, weapon.worldModel, weapon.isDualWield )
void <actor> AimAtEntityIK([otherguy])
- [OPTIONAL] [otherguy] the other guy to aim at
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this actor to aim at the specified entity. Call this function without any entity specified to turn it off.
EXAMPLE: guy AimAtEntityIK( otherguy )
void <actor> AimAtPosIK([pos])
- [OPTIONAL] [pos] the position to aim at
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this actor to aim at the specified position. Call this function without any position specified to turn it off.
EXAMPLE: guy AimAtPosIK( pos )
void AimingAtFriendly()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if localclient 0 has crosshairs on friendly
EXAMPLE: isFriend = AimingAtFriendly()
void AllClientsPrint(<string>)
- [MANDATORY] <string> the string to print
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Cause all clients to print the localized version of this string.
EXAMPLE: AllClientsPrint( "Game Complete" )
void AllocateSoundRandoms(<num randoms>)
- [MANDATORY] <num randoms> number of randoms
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Allocate a pool of random sounds
EXAMPLE: AllocateSoundRandoms(randoms.size - nScriptThreadedRandoms)
void AllowActionSlotInput(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the controller you to enable the action slots
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: always allow action slot input
EXAMPLE: AllowActionSlotInput(localclientnum)
void <actor_or_player> AllowedStances(<stance>)
- [MANDATORY] <stance> (string) A stance, can be 'prone', 'crouch', 'stand'. Any number of stances may be added.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the list of the actor's allowed stances.
EXAMPLE: self AllowedStances( "crouch", "prone" )
void AllowRoundAnimation(<flag>)
- [MANDATORY] <flag> 1 to allow, 0 to disallow
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: sets the allow round animation flag to enabled or disabled
EXAMPLE: AllowRoundAnimation( 1 )
void AllowScoreboard(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the controller you to enable the action slots
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: allow scoreboard or not
EXAMPLE: AllowScoreboard(localclientnum)
void <entity> AllowTacticalInsertion(<allow>)
- [MANDATORY] <allow> true or false
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: If false, disallows tactical insertions in the bounding area of this entity. Allows tactical insertions otherwise
EXAMPLE: my_trigger AllowTacticalInsertion( false )
void AllWeaponAttachmentsUnlocked(<weapon>)
- [MANDATORY] <weapon> weapon
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Are all the weapon attachments unlocked for this weapon?
EXAMPLE: player AllWeaponAttachmentsUnlocked( weapon )
void AnimHasNotetrack(<animation>,<note track>)
- [MANDATORY] <animation> an animation
- [MANDATORY] <note track> a constant string with the name of the note track
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: queries the given animation for a note track
EXAMPLE: if ( IsDefined( facialanim ) && AnimHasNotetrack( facialanim, "dialogue" ) ) ...
void <actor> AnimMappingSearch(<animation_alias_name>)
- [MANDATORY] <animation_alias_name>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Searches animation mapping table to return a animation name when given a animation mapping alias name.
EXAMPLE: self AnimMappingSearch("anim_arrive_cover_left_crouch")
void <entity> AnimRelative(<notify>,<origin>,<angles>,<animation>,[mode],[root])
- [MANDATORY] <notify> The notify to send
- [MANDATORY] <origin> The starting position of the anim script
- [MANDATORY] <angles> The starting angle of the anim script
- [MANDATORY] <animation> The animation
- [OPTIONAL] [mode] Valid modes are "normal" and "deathplant"
- [OPTIONAL] [root] The root animation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Runs an animscript on an entity.
EXAMPLE: driver AnimRelative( "germantruck_driver_closedoor", org , angles, driver.closedooranim )
void <entity> AnimScripted(<notify>,<origin>,<angles>,<animation>,[mode],[root],[rate],[blend],[lerp],[animation time],[is_scene_animation],[showPlayerWeaponInFirstPerson])
- [MANDATORY] <notify> The notify to send
- [MANDATORY] <origin> The starting position of the anim script
- [MANDATORY] <angles> The starting angle of the anim script
- [MANDATORY] <animation> The animation
- [OPTIONAL] [mode] Valid modes are "normal" and "deathplant"
- [OPTIONAL] [root] The root animation
- [OPTIONAL] [rate] The playback rate of animation
- [OPTIONAL] [blend] The blend time for the animation
- [OPTIONAL] [lerp] The lerp time for an aligned animation
- [OPTIONAL] [animation time] The starting animation time in 0-1 range
- [OPTIONAL] [is_scene_animation] Should be true for player scene animations or scripted animations where the player has no control, can be ignored for non-players
- [OPTIONAL] [showPlayerWeaponInFirstPerson] determines if the first person player should have his weapon during cinematics
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Runs an animscript on an entity.
EXAMPLE: driver AnimScripted( "germantruck_driver_closedoor", org , angles, driver.closedooranim )
void Announcement(<string>,<duration>)
- [MANDATORY] <string> The announcement.
- [MANDATORY] <duration> How long, in seconds, to display the announcement.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sends an announcement to all clients.
void <entity> ApplyBallisticTarget(<targetPos>)
- [MANDATORY] <targetPos> The position to launch the vehicle towards
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launch a vehicle with just enough force at a target.
EXAMPLE: dropRaps ApplyBallisticTarget( (50,50,10) )
void <player> AreAllMissionsAtScore(<score>)
- [MANDATORY] <score> A score that all missions must be at to return true (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if all missions are at the score specified
EXAMPLE: is_score_achieved = self AreAllMissionsAtScore( 10000 )
void <entity> AreMeshesStreamed()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if this entity's meshes are streamed in
EXAMPLE: thing areMeshesStreamed()
void arenagetcurrentseason()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the current arena season
EXAMPLE: ArenaGetCurrentSeason()
void ArenaGetSlot()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the current arena slot
EXAMPLE: ArenaGetSlot()
void AreTexturesLoaded()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check to see if start-of-level textures are loaded - if they're not, the streamer forces a black screen.
EXAMPLE: while( !areTexturesLoaded() ) { wait(0.05); }
void <entity> AreTexturesStreamed()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if this entity's textures are streamed in
EXAMPLE: thing areTexturesStreamed()
void ArraySort(<array>,<origin>,<origin>,<max>,<range>)
- [MANDATORY] <array> array to sort
- [MANDATORY] <origin> the origin from which to compare
- [OPTIONAL] [closest] if set to true the array will be sorted by distance closest to <origin>, if false by distance farthest from <origin>
- [OPTIONAL] [max] if set then only the first <max> count of entities will be returned
- [OPTIONAL] [range] if set then only the entities within <range> will be considered
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a sorted array of entities by closest or farthest distance from <origin>
void ArraySortClosest(<array>,<origin>,<max>,<minDist>,[maxDist])
- [MANDATORY] <array> array to sort
- [MANDATORY] <origin> the origin from which to compare
- [OPTIONAL] [<maxReturnCount] if set then only the first <max> count of entities will be returned
- [OPTIONAL] [minDist] if set then only the entities further than <minDist> will be considered
- [OPTIONAL] [maxDist] if set then only the entities closer then <maxDist will be considered
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a sorted array of entities by closest from <origin>
void ArtilleryIconLocation(<position>,<teamNum>,<isActive>,[isMortar],[clientNum])
- [MANDATORY] <position> Position of icon
- [MANDATORY] <teamNum> Team number
- [MANDATORY] <isActive> Whether the icon is active or not
- [OPTIONAL] [isMortar] Whether the artillery is a mortar
- [OPTIONAL] [clientNum] The client number
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the artillery icon location
EXAMPLE: ArtilleryIconLocation( self.origin, 1, true )
void <entity> ASMSetAnimationRate(<rate>)
- [MANDATORY] <rate> (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: change the delta animation rate for the entity using ASM.
EXAMPLE: self ASMSetAnimationRate( 0.3 )
void <entity> Attach(<modelname>,[tagname],[ignoreCollision])
- [MANDATORY] <modelname> The model name to attach (string).
- [OPTIONAL] [tagname] The tag to attach the model to (string).
- [OPTIONAL] [ignoreCollision] flag to ignore collision. Defaults to false (integer).
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attach a model to an entity.
EXAMPLE: self Attach( "panzerflak_ammo", "tag_weapon_left" )
void <player> AttachShieldModel(<modelname>,[tagname],[ignoreCollision])
- [MANDATORY] <modelname> The model name to attach (string).
- [OPTIONAL] [tagname] The tag to attach the model to (string).
- [OPTIONAL] [ignoreCollision] flag to ignore collision. Defaults to false (integer).
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attach a shield model to a player.
EXAMPLE: self AttachShieldModel( "weapon_riot_shield", "tag_weapon_left" )
void <entity> AttachWeapon(<weapon>,<renderoptions>,<acvi>)
- [MANDATORY] <weapon> The weapon to attach.
- [OPTIONAL] <renderoptions> The render options for the weapon
- [OPTIONAL] <acvi> The attachment cosmetic variations
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Attaches a weapon to the entity.
EXAMPLE: self AttachWeapon( weapon )
void BadPlace_Box(<name>,<duration>,<origin>,<halfSize>,<team>)
- [MANDATORY] <name> The name of the bad place. If name is not "", the bad place can be moved or deleted by using the unique name.
- [MANDATORY] <duration> If duration > 0, the bad place will automatically delete itself after this time. If duration <= 0, the bad place must have a name and will last until manually deleted.
- [MANDATORY] <origin> The origin of the box.
- [MANDATORY] <halfSize> The halfSize of the box.
- [MANDATORY] <team> You must specify at least one team for which this place is bad, but can give several. The allowed teams are 'axis', 'allies', and 'neutral'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a bad place box. AI will flee this position if they can, and will not go into it if they can avoid it.
EXAMPLE: BadPlace_Box( "moody", -1, level.moodyfall_mn, level.moodyfall_halfSize, "neutral" )
void BadPlace_Cylinder(<name>,<duration>,<origin>,<radius>,<height>,<team>)
- [MANDATORY] <name> The name of the bad place. If name is not "", the bad place can be moved or deleted by using the unique name.
- [MANDATORY] <duration> If duration > 0, the bad place will automatically delete itself after this time. If duration <= 0, the bad place must have a name and will last until manually deleted.
- [MANDATORY] <origin> The origin of the cylinder.
- [MANDATORY] <radius> The radius of the cylinder.
- [MANDATORY] <height> The height of the cylinder.
- [MANDATORY] <team> You must specify at least one team for which this place is bad, but can give several. The allowed teams are 'axis', 'allies', and 'neutral'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a bad place cylinder. AI will flee this position if they can, and will not go into it if they can avoid it.
EXAMPLE: BadPlace_Cylinder( "moody", -1, level.moodyfall_mn, level.moodyfall_radius, "neutral" )
void BadPlace_Delete(<bad place identifier>)
- [MANDATORY] <bad place identifier> The bad place to delete
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Deletes a bad place. It is okay to delete a bad place name that doesn't exist. It is not okay to delete the special name "".
EXAMPLE: BadPlace_Delete( "bpFlak1" )
void <ball> BallSetTarget([target],[targetOffset])
- [MANDATORY] [target] The target of the missile
- [OPTIONAL] [targetOffset] Offset to the target location (vector3)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the target of the ball to the given entity, and resets if no entity is specified.
EXAMPLE: self BallSetTarget( player )
void Ban(<clientnum>)
- [MANDATORY] <clientnum> The client number of the player to ban.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Bans the specified player.
EXAMPLE: Ban( 2 )
entity BeamTrace(<start_pos>,<end_pos>,<hit_characters>,<ignore_ent>,[ignore_water],[ignore_glass],[ignore_ent2])
- [MANDATORY] <start_pos> (point) The start position for the trace.
- [MANDATORY] <end_pos> (point) The end position for the trace.
- [MANDATORY] <hit_characters> (bool) Tell the trace to hit characters or not.
- [MANDATORY] <ignore_ent> (entity) Entity to ingore for trace.
- [OPTIONAL] [ignore_water] (bool) Ignore water - defaults to false.
- [OPTIONAL] [ignore_glass] (bool) Ignore glass - defaults to false.
- [OPTIONAL] [ignore_ent2] (entity) Second entity to ingore for trace.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Performs a bullet trace between two points and returns an array of information about the trace result.
EXAMPLE: a_trace = BeamTrace( org1, org2 )
void <entity> BloodImpact(<value>)
- [MANDATORY] <value> Has to be one of: "none", "hero" or "normal"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the blood impact type on the character
EXAMPLE: guy BloodImpact ( "none" )
void <entity> BlurAndTint_FX(<localClientNum>,true/false. Default is true.,<level>)
- [MANDATORY] <localClientNum> Client number of the player
- [OPTIONAL] true/false. Default is true.
- [OPTIONAL] <level> 0 - 1
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Plays RadioActive/Fire FX
EXAMPLE: entity BlurAndTint_FX(0, true, 1)
void Bobbing(<direction vector>,<amplitude>,<period>,<phase>)
- [MANDATORY] <direction vector> The direction of the bobbing
- [MANDATORY] <amplitude> The amount of the bobbing in units
- [MANDATORY] <period> The period of the bobbing in seconds
- [OPTIONAL] <phase> The phase offset of the bobbing
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Causes a script entity to bob around its origin, along a given vector dir
EXAMPLE: self Bobbing( directionVir, 0.3, 0.4, 0.0f )
void <player> BonusCardActiveCount(<classnum>)
- [MANDATORY] <classnum> The current class num of the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns how many bonus cards are active, cannot be called on a larry
EXAMPLE: cardCount = self BonusCardActiveCount( self.class_num )
void BoundsWouldTelefrag(<mins>,<maxs>)
- [MANDATORY] <mins> Mins of bounding box
- [MANDATORY] <maxs> Maxs of bounding box
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in bounding box would telefrag a player if another player was spawned there.
EXAMPLE: if ( BoundsWouldTelefrag( vehicle GetAbsMins(), vehicle GetAbsmaxs() ) ) ...
void BulletSpread(<start>,<end>,<spread>)
- [MANDATORY] <start> The bullet starting point
- [MANDATORY] <end> The bullet ending point
- [MANDATORY] <spread> Amount of spread
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: uses spread to return a new end position
EXAMPLE: endpos = BulletSpread( self.origin, target.origin, 1.0 )
entity BulletTrace(<start_pos>,<end_pos>,<hit_characters>,<ignore_ent>,[ignore_water],[ignore_glass],[ignore_ent2])
- [MANDATORY] <start_pos> (point) The start position for the trace.
- [MANDATORY] <end_pos> (point) The end position for the trace.
- [MANDATORY] <hit_characters> (bool) Tell the trace to hit characters or not.
- [MANDATORY] <ignore_ent> (entity) Entity to ingore for trace.
- [OPTIONAL] [ignore_water] (bool) Ignore water - defaults to false.
- [OPTIONAL] [ignore_glass] (bool) Ignore glass - defaults to false.
- [OPTIONAL] [ignore_ent2] (entity) Second entity to ingore for trace.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Performs a bullet trace between two points and returns an array of information about the trace result.
EXAMPLE: a_trace = BulletTrace( org1, org2 )
void BulletTracePassed(<start>,<end>,<hit characters>,<ignore entity>,[ignore entity 2],[fx vis],[ignore water])
- [MANDATORY] <start> The bullet start point
- [MANDATORY] <end> The bullet end point
- [MANDATORY] <hit characters> An entity to ignore
- [MANDATORY] <ignore entity> An entity to ignore
- [OPTIONAL] [ignore entity 2] An entity to ignore
- [OPTIONAL] [fx vis] check against fx visibility also
- [OPTIONAL] [ignore water] mask contents_water
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows script to do a bullet point trace with ( MASK_SHOT & ~CONTENTS_SKY ) returns true if the trace does not hit anything
EXAMPLE: passed = BulletTracePassed( grenade.origin, self.origin + (0,0,TROPHY_TRACE_Z), false, self )
void CamAnimScripted(<player>,<cam_anim>,<start_time>,<align_origin>,<align_angles>,[lerp_duration],[camera_name],[ignoreProcessingInitialNoteTracks])
- [MANDATORY] <player> The player to play animation on
- [MANDATORY] <cam_anim> The animation to play
- [MANDATORY] <start_time> The start time of the animation
- [MANDATORY] <align_origin> The origin to align to
- [MANDATORY] <align_angles> The angles to align to
- [OPTIONAL] [lerp_duration] The lerp duration
- [OPTIONAL] [camera_name] The camera name
- [OPTIONAL] [ignoreProcessingInitialNoteTracks] Ignores processing the initial notetracks if the camera time starts earlier
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays the camera script on a player.
EXAMPLE: CamAnimScripted( player, "proto_melee_cam", gettime(), origin, angles )
void <player> CameraForceDisableScriptCam()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Disable the script cam from client script.
EXAMPLE: player CameraForceDisableScriptCam( true )
void <entity> CameraSetLensId(<id>)
CATEGORY:
CLIENT/SERVER: Client
EXAMPLE: entity CameraSetLensId(0)
void <player> CameraSetUpdateCallback([function])
- [OPTIONAL] [function] a function pointer to a function that will get called during the camera update, the function should set the scr cam
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the function that will get called during the camera update
EXAMPLE: player CameraSetUpdateCallback( &function )
void CanClaimNode(<node>,<team>)
- [MANDATORY] <node> pathnode to check
- [MANDATORY] <team>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the node is unclaimed, false otherwise.
EXAMPLE: if ( CanClaimNode( cover, team ) )
void CanPath(<start>,<end>)
- [MANDATORY] <start>
- [MANDATORY] <end>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check if a path can be found between these positions.
EXAMPLE: if ( self CanPath( self.origin, targetpos ) )
void ChangeAdvertisedStatus(<onOff>)
- [MANDATORY] <onOff> (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Changes the advertised status
EXAMPLE: changeAdvertisedStatus( onOff )
void <entity> CheckIfSongUnlocked(<aliasname>)
- [MANDATORY] <aliasname> The sound alias to play (string)
CATEGORY:
CLIENT/SERVER: Server
EXAMPLE: self CheckIfSongUnlocked( "frag_out" )
void CheckNavMeshDirection(<start>,<dir>,<dist>,[characterRadius],[materialFlags])
- [MANDATORY] <start> start of the trace
- [MANDATORY] <dir> direction to trace
- [MANDATORY] <dist> distance to trace
- [OPTIONAL] [characterRadius] the radius of the capsule used in trace. default to 0.
- [OPTIONAL] [materialFlags] the flags marking whether a face type can be used
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Run a trace on NavMesh to get the furthest position a character can move in that direction
EXAMPLE: pos = CheckNavMeshDirection( (10,20,30), ( 1, 1, 0 ), 25 )
void CleanupSpawnedDynEnts()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Removed all dyn ents that were dynamically spawned (gib pieces, destructible parts, etc)
EXAMPLE: CleanupSpawnedDynEnts()
void <player> ClearAlternateAimParams()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the local player to use default values for aim assist. Only works in zombie/campaign mode. Can only be called on players
EXAMPLE: self ClearAlternateAimParams()
void <entity> ClearAnim(<animation>,<time>)
- [MANDATORY] <animation> The animation or animtree node to clear
- [MANDATORY] <time> The blending time for the clear
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets an animation's goal weight (and the goal weights of all of its descendents) to zero over the specified time.
EXAMPLE: self ClearAnim( %root, 0)
void <entity> ClearAnimLimited(<animation>,<time>)
- [MANDATORY] <animation> The animation or animtree node to clear
- [MANDATORY] <time> The blending time for the clear
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets an animation's goal weight to zero over the specified time.
EXAMPLE: self ClearAnimLimited( %root, 0)
void ClearLastUpdatedCollectibles()
CATEGORY:
CLIENT/SERVER: Client
void <entity> ClearMaterialOverride()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Clears the material override
EXAMPLE: self ClearMaterialOverride()
void <player> ClearNearestEnemyScrambler()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: clears closest enemy scrambler from the compass
EXAMPLE: player ClearNearestEnemyScrambler( )
void ClearPlayerCorpses()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes all player corpses from the level
EXAMPLE: ClearPlayerCorpses( )
void <player> ClearPlayerGravity()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the gravity override for the player.
EXAMPLE: player ClearPlayerGravity()
void ClearSpawnPoints(<list>)
- [OPTIONAL] <list> which list of spawnpoints to clear
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears all spawnpoints out of the system
EXAMPLE: ClearSpawnPoints()
void ClearSpawnPointsBaseWeight(<team mask>)
- [MANDATORY] <team mask> teams that this command will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the objective base weights set in the spawn points
EXAMPLE: ClearSpawnPointsBaseWeight( team_mask )
void <entity> ClearStepTriggerSound()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Clears the sound triggered by steps
EXAMPLE: trigPlayer ClearStepTriggerSound()
void <entity> ClearStowedWeapon()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the stowed weapon for the player
EXAMPLE: self ClearStowedWeapon()
void ClearStreamerRequest(<slot>)
- [MANDATORY] <slot> Request slot
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Clear a hint from a request slot (0-7)
EXAMPLE: clearStreamerRequest(0)
void <turret> ClearTargetEntity()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the current target for this vehicle or turret.
EXAMPLE: roof_turret ClearTargetEntity()
void ClearTopScorers()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the top scorer for the end game screen.
EXAMPLE: ClearTopScorers()
void ClientAnnouncement(<clientnum>,<string>,<duration>)
- [MANDATORY] <clientnum> The client number that the announcement is sent to.
- [MANDATORY] <string> The announcement.
- [MANDATORY] <duration> How long, in seconds, to display the announcement.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sends an announcement to a single client.
void <client> ClientClaimTrigger(<trigger>)
- [MANDATORY] <trigger> A trigger entity.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Claim a single user trigger.
EXAMPLE: other ClientClaimTrigger( self )
void ClientPrint(<client>,<string>)
- [MANDATORY] <client> A client entity.
- [MANDATORY] <string> A message to print.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Print a localized version of this string for a given client
void <client> ClientReleaseTrigger(<trigger>)
- [MANDATORY] <trigger> A trigger entity.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Release a single user trigger.
EXAMPLE: other ClientReleaseTrigger( self )
void ClientSysRegister(<name>)
- [MANDATORY] <name> The unique name of the system to be registered
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Declares a system who's state will be communicated over to the client script system when it changes. Takes a unique name, and returns the id of the system.
EXAMPLE: index = ClientSysRegister("FakeFire")
void ClientSysSetState(<id>,<state>)
- [MANDATORY] <id> The integer id of the client system. Returned from call to ClientSysRegister.
- [MANDATORY] <state> Arbitrary string state. Will be sent to the client script system.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the state of a pre registered client system for all clients. The state will be communicated to the client script system.
EXAMPLE: ClientSysSetState(level._ClientSys["FakeFire"], "Event1Phase1")
entity CloneAndRemoveEntity(<entity>)
- [MANDATORY] <entity> entity field
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a new entity at the position/orientation/pose of the original, and kills the original
EXAMPLE: CloneAndRemoveEntity( ent )
void <entity> codcaster_keyline_enable(<type>)
- [MANDATORY] <type> 0-disable 1-enable
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Enable or disable the CODCaster Keyline effect
EXAMPLE: entity CODCasterKeyline_Enable( 0 )
void CodeGetClientField(<entity>,<name>)
- [MANDATORY] <entity> The entity to search the name in
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the value for a given client field.
EXAMPLE: val = CodeGetClientField(ent, "my_field")
void CodeGetPlayerStateClientField(<player>,<name>)
- [MANDATORY] <player> A player
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the value for a given player state client field.
EXAMPLE: val = CodeGetPlayerStateClientField(ent, "my_field")
void CodeGetUIModelClientField(<player>,<name>)
- [MANDATORY] <player> A player
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the value for a given player uimodel client field.
EXAMPLE: val = CodeGetUIModelClientField(ent, "my_field")
void CodeGetWorldClientField(<name>)
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the value for a given client field.
EXAMPLE: val = CodeGetWorldClientField("my_field")
void CodeIncrementClientField(<entity>,<name>)
- [MANDATORY] <entity> An entity
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increments the value for a given client field.
EXAMPLE: CodeIncrementClientField(ent, "my_field")
void CodeIncrementPlayerStateClientField(<player>,<name>)
- [MANDATORY] <player> A player
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increments the value for a given player state client field.
EXAMPLE: CodeIncrementPlayerStateClientField(ent, "my_field")
void CodeIncrementUIModelClientField(<entity>,<name>)
- [MANDATORY] <entity> An entity
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increments the value for a given client field.
EXAMPLE: CodeIncrementUIModelClientField(ent, "my_field")
void CodeIncrementWorldClientField(<name>)
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increments the value for a given world client field.
EXAMPLE: CodeIncrementWorldClientField("my_field")
void CodeSetClientField(<entity>,<name>,<value>)
- [MANDATORY] <entity> An entity
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <value> Value to transmit.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value for a given client field.
EXAMPLE: CodeSetClientField(ent, "my_field", 1)
void CodeSetPlayerStateClientField(<player>,<name>,<value>)
- [MANDATORY] <player> A player
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <value> Value to transmit.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value for a given player state client field.
EXAMPLE: CodeSetPlayerStateClientField(ent, "my_field", 1)
void CodeSetUIModelClientField(<player>,<name>,<value>)
- [MANDATORY] <player> A player
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <value> Value to transmit.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value for a given player uimodel client field.
EXAMPLE: CodeSetUIModelClientField(ent, "my_field", 1)
void CodeSetWorldClientField(<name>,<value>)
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <value> Value to transmit.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value for a given world client field.
EXAMPLE: CodeSetWorldClientField("my_field", 1)
void CollisionTestPointsInBox()
CATEGORY:
CLIENT/SERVER: Server
void CollisionTestPointsInCone()
CATEGORY:
CLIENT/SERVER: Server
void CollisionTestPointsInCylinder()
CATEGORY:
CLIENT/SERVER: Server
void CollisionTestPointsInPill()
CATEGORY:
CLIENT/SERVER: Server
void CollisionTestPointsInSphere()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of collision result structures
void <entity> ConnectPaths()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Connects the paths that intersect with the entity. If the entity is a script_brushmodel then it must have DYNAMICPATH set to connect paths.
EXAMPLE: vehicle ConnectPaths()
void <player> ConsumableDecrement()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Decrement a specified consumable for the player by the specified amount
EXAMPLE: self ConsumableDecrement( "blackjack", "awarded", 1 )
void <player> ConsumableGet()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the value of the specified consumable for the player
EXAMPLE: self ConsumableGet( "blackjack", "awarded" )
void <player> ConsumableIncrement()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increment a specified consumable for the player by the specified amount
EXAMPLE: self ConsumableIncrement( "blackjack", "awarded", 1 )
void <player> ConsumableSet()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set a specified consumable for the player to the specified amount
EXAMPLE: self ConsumableSet( "blackjack", "awarded", 1 )
void CountPlayers([team])
- [OPTIONAL] [team] - if specifed, returns lists of players on different teams, in team based game modes. Valid values "allies", "axis", "neutral" & "all"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a count of the current players, even if they are still connecting to the game.
EXAMPLE: count = CountPlayers()
void CreateDynEntAndLaunch(<model>,<pos>,<angles>,<hitpos>,<force>,[fx])
- [MANDATORY] <model>
- [MANDATORY] <pos> position to spawn at.
- [MANDATORY] <angles> angles to spawn at.
- [MANDATORY] <hitpos> the hit position
- [MANDATORY] <force> The force of the launch
- [OPTIONAL] [fx] particle effects to play on this dynent
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates and launches a dynent.
EXAMPLE: CreateDynEntAndLaunch( spawn_models[i], origin, angles, origin, velocity, anim._effect["animscript_gibtrail_fx"] )
void CreateSoundRandom(<position>,<name>,<min wait>,<max wait>)
- [MANDATORY] <position> The position
- [MANDATORY] <name> The sound name
- [MANDATORY] <min wait> The minimum wait time
- [MANDATORY] <max wait> The maximum wait time
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Create sound random at the position
EXAMPLE: CreateSoundRandom(randSound.origin, randSound.script_sound, randSound.script_wait_min, randSound.script_wait_max)
entity CreateStreamerHint(<origin>,<factor>,[lightingState])
- [MANDATORY] <origin> Location at which to spawn the streamer hint.
- [MANDATORY] <factor> The relative importance of this entity's viewpoint to the main viewpoint.
- [OPTIONAL] [lightingState] The lighting state to stream
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows scripter to create a streamer hint entity viewpoint to the player's viewpoint.
EXAMPLE: streamHintEnt = createStreamerHint( level.player.origin, 0.333 )
void CurrentSessionMode()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the current session mode index
EXAMPLE: sessionMode = CurrentSessionMode()
void CylinderDamage(<cylinder_vec>,<origin>,<near_radius>,<far_radius>,<max_damage>,<min_damage>,[attacker],[means_of_death],[weapon])
- [MANDATORY] <cylinder_vec> contains the direction and the length of the cylinder relative to the base origin
- [MANDATORY] <origin> Origin of damage
- [MANDATORY] <near_radius> Radius of the damage at the near end
- [MANDATORY] <far_radius> Radius of the damage at the far end
- [MANDATORY] <max_damage> Max damage, this is the damage at the origin
- [MANDATORY] <min_damage> Max damage, this is the damage at the edge of the radius
- [OPTIONAL] [attacker] Attacker the dealt the damage
- [OPTIONAL] [means_of_death] Means of death of the damage
- [OPTIONAL] [weapon] Weapon used to damage
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: cylinder_dir_vector should contains the direction and the length of the cylinder relative to the base origin
void <entity> DamageConeTrace(<damage position>,[ignore entity],<damage position>,[cone angle])
- [MANDATORY] <damage position> The point the sight starts at
- [OPTIONAL] [ignore entity] An entity to ignore when doing the traces
- [OPTIONAL] [damage angles] The forward direction of the cone, whose base is at the <damage position>. Must be normalized.
- [OPTIONAL] [cone angle] Angle in degrees from the line of sight to the edge of the cone. Defaults to 65.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines how much the entity can be seen from the given position. Performs multiple traces and returns an approximation to how much of the entity is visible from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially visible.
EXAMPLE: turretDamageFraction = entity damageConeTrace( turret.origin + (0,0,40), turret )
void DeactivateClientExploder(<exploder id>)
- [MANDATORY] <exploder id> id of exploder to deactivate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Deactivates a client side exploder
EXAMPLE: DeactivateClientExploder( 101 )
void DeactivateClientRadiantExploder(<exploder id>)
- [MANDATORY] <exploder id> string id of exploder to deactivate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Deactivates a client side radiant exploder
EXAMPLE: DeactivateClientRadiantExploder( "light_switch" )
void <entity> Delete()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes an entity from the game in the same manner as a trigger_kill
EXAMPLE: self Delete()
void DeletePathNode(<node>)
- [MANDATORY] <node> The node to delete
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Delete a dynamically created path node or cover node
EXAMPLE: DeletePathNode( node )
void DemoIsAnyFreeMoveCamera()
CATEGORY:
CLIENT/SERVER: Client
void DemoIsDollyCamera()
CATEGORY:
CLIENT/SERVER: Client
void DemoIsEditCamera()
CATEGORY:
CLIENT/SERVER: Client
void DemoIsMovieCamera()
CATEGORY:
CLIENT/SERVER: Client
entity DeployRiotShield(<owner>,<shield_ent>)
- [MANDATORY] <owner>
- [MANDATORY] <shield_ent>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the index in a particular class
EXAMPLE: DeployRiotShield( owner, shield )
void <entity> DepthInWater()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the depth (in inches) that the entity is in water. Returns depth in inches, or 0 if the entity isn't in water. Will work for all water types.
EXAMPLE: depth = get_players()[0] DepthInWater()
void <player> DepthOfPlayerInWater()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the depth (in inches) that the player is in water. Returns depth in inches, or 0 if the entity isn't in water. Will work for all water types. More effecient than depthinwater but will only work for players
EXAMPLE: depth = get_players()[0] DepthOfPlayerInWater()
void <entity> Detach(<modelname>,[tagname])
- [MANDATORY] <modelname> The model name to detach (string)
- [OPTIONAL] [tagname] The tag to detach the model from (string)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: detaches an attached model from an entity
EXAMPLE: self Detach( "explosivepack", "tag_weapon_right" )
void <entity> DetachAll()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: detaches all attached models from an entity
EXAMPLE: self DetachAll()
void <player> DetachShieldModel(<modelname>,[tagname])
- [MANDATORY] <modelname> The model name to detach (string)
- [OPTIONAL] [tagname] The tag to detach the model from (string)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Detaches an attached shield model from a player.
EXAMPLE: self DetachShieldModel( "weapon_riot_shield", "tag_weapon_left" )
void <entity> Detonate([player])
- [OPTIONAL] [player] The player who owns the entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Detonate the entity and set the owner to the player which is specified.
EXAMPLE: self Detonate( attacker )
void DirectionalHitIndicator(<victims0>,[victims1])
- [MANDATORY] <victims0> A bit array of entities 0-31 that got hit
- [OPTIONAL] [victims1] A bit array of entities 32-63 that got hit
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a directional hit indicator
EXAMPLE: attacker DirectionalHitIndicator( victimArray0, victimArray1 )
void <entity> DisableAimAssist()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disables Aim assist on the entity. Entity has to be either a brush model or an actor or a vehicle or a script_model.
EXAMPLE: player DisableAimAssist()
void DisableDestructiblePieces(<label>)
- [MANDATORY] <label> the name of the field listed in the destructible gdt to disable
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disables all destructible pieces that have this label set in the destructible gdt
EXAMPLE: DisableDestructiblePieces( "heavy_armor" )
void DisableGrenadeSuicide()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops cooked grenades from killing the player.
void <entity> DisableGrenadeTouchDamage()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Resets the grenade touch damage flag of the entity
EXAMPLE: self DisableGrenadeTouchDamage()
void <player> DisableOffhandSpecial()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disable the ability to activate a player's special offhand weapons
EXAMPLE: player DisableOffhandSpecial()
void <entity> DisableOnRadar()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the icon to be shown on the minimap
EXAMPLE: actor DisableOnRadar()
void DisableSpawnPointList(<list>,<team mask>)
- [MANDATORY] <list> list to disable
- [MANDATORY] <team mask> teams that this command will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: disables spawn point list for a the team_mask
EXAMPLE: DisableSpawnPointList()
void DisableSpeedBlur(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: REmoves a speed blur on on the screen
EXAMPLE: DisableSpeedBlur( <localClientNum> )
void <vehicle> DisableVehicleSounds()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Disables all sounds from a vehicle
EXAMPLE: self DisableVehicleSounds()
void <entity> DisconnectPaths([detailLevel],[moveAllowed])
- [OPTIONAL] [detailLevel] how detailed the cut part matches the entity. 0 or omitted: box, 1: convex hull fitting rough shape, 2: [SUPER EXPENSIVE] use collision shape directly
- [OPTIONAL] [moveAllowed] sets whether the silhouette moves with the entity (defaults to true)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disconnects the paths that intersect with the entity. If the entity is a script_brushmodel then it must have DYNAMICPATH set to disconnect paths.
EXAMPLE: level.ArmoredCar DisconnectPaths()
void <entity> DoDamage(<health>,<source position>,[attacker],[inflictor],[hitloc],[mod],[dflags],[weapon],[infdestructible_piece_indexlictor],[forcePain])
- [MANDATORY] <health> The amount of damage to do
- [MANDATORY] <source position> The position that the damage comes from
- [OPTIONAL] [attacker] The entity that dealt the damage (such as an AI or player)
- [OPTIONAL] [inflictor] The entity that the damage came from (such as a grenade or turret)
- [OPTIONAL] [hitloc] The location of the damage, default is none; one of: { 'none', 'torso_upper', 'torso_lower', 'helmet', 'head', 'neck', 'left_arm_upper', 'left_arm_lower', 'left_hand', 'right_arm_upper', 'right_arm_lower', 'right_hand', 'left_leg_upper', 'left_leg_lower', 'left_foot', 'right_leg_upper', 'right_leg_lower', 'right_foot' }
- [OPTIONAL] [mod] . The means of death string. Otherwise, the means of death will be 'MOD_UNKNOWN'.
- [OPTIONAL] [dflags] . Damage flags.
- [OPTIONAL] [weapon] . Weapon used.
- [OPTIONAL] [infdestructible_piece_indexlictor] The destructible piece index from the destructible def gdt"
- [OPTIONAL] [forcePain] true/false; If true, actor->painDeath.iPainTime will be reset to zero"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does damage to this entity
EXAMPLE: player DoDamage(25, gasEffectArea.origin, player.lastPoisonedBy, grenade_obj, 0, "MOD_EXPLOSIVE", 0, GetWeapon("tabun_gas_mp"), -1, false)
void DoesWeaponReplaceSpawnWeapon(<weapon name>)
- [MANDATORY] <weapon name>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the new weapon is an alt mode of the spawn weapon. Only certain alt variations are valid (not-gl)
EXAMPLE: if ( DoesWeaponReplaceSpawnWeapon( self.spawnWeapon, newWeapon ) )
void <entity> DontInterpolate()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: pop the entity's position instantaneously to where it moves this time step, rather than smoothly moving there from the previous position
EXAMPLE: entity DontInterpolate()
void <player> DoubleXPTimerFired()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Used to decrement consumable double xp promotions
void <entity> DragonStrike_Enable(<type>)
- [MANDATORY] <type> 0-disable 1-enable
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Enable or disable the DragonStrike effect
EXAMPLE: entity DragonStrike_enable( 0 )
void <entity> DragonStrike_SetColorRadiusSpinPulse(red, green, blue)
- [MANDATORY] red, green, blue
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set Dragon Strike Cicle position
EXAMPLE: entity DragonStrike_SetColorRadiusSpinPulse( 1.0, 0.5, 0.25, 100.0, 0.5, 1.0 )
void <entity> DragonStrike_SetPosition(vec3_t position)
- [MANDATORY] vec3_t position
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set Dragon Strike Cicle position
EXAMPLE: entity DragonStrike_SetPosition( vec3 )
void DrawNode(<node>)
- [MANDATORY] <node> pathnode
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Draws a node
EXAMPLE: DrawNode( self.node)
void DropNodEToFloor(<node>)
- [MANDATORY] <node> node to drop
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Drop the node to the floor.
EXAMPLE: DropNodeToFloor( node )
void EACPathSet(<vec3>)
- [MANDATORY] <vec3> The value.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value of a eac path drone.
EXAMPLE: SetEACPATH( origin )
void Earthquake(<scale>,<duration>,<radius>,[target])
- [MANDATORY] <scale> scale of the earthquake. Must be greater than 0.
- [MANDATORY] <duration> The duration of the earthquake. Must be greater than 0.
- [MANDATORY] <radius> The radius of the earthquake. Must be greater than 0.
- [OPTIONAL] [target] Target is given if earthquake is to be shown to particular client
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create an earthquake
EXAMPLE: Earthquake( 0.22, 7, player.origin, 150 )
void <entity> EnableAimAssist()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables Aim assist on the entity. Entity has to be either a brush model or an actor or a vehicle or a script_model.
EXAMPLE: player EnableAimAssist()
void EnableAllDestructiblePieces()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables all destructible pieces that were previously disabled
EXAMPLE: EnableAllDestructiblePieces()
void EnableGrenadeSuicide()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables cooked grenades killing the player.
void <entity> EnableGrenadeTouchDamage()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the grenade touch damage flag of the entity
EXAMPLE: self EnableGrenadeTouchDamage()
void EnableInfluencer(<influencer id>,<enable>)
- [MANDATORY] <influencer id> The influencer to enable/disable
- [MANDATORY] <enable> True to enable. False to disable
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables or disables the given influencer
EXAMPLE: EnableInfluencer( influencer_id, true )
void <entity> EnableLinkTo()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: enables linkto for an entity
EXAMPLE: self.bombtrigger EnableLinkTo()
void EnableNavMeshTrigger(<targetname>,<enable>)
- [MANDATORY] <targetname> The targetname of the trigger entity.
- [MANDATORY] <enable> Whether to enable disable the given volume for pathfinding.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables/disables a given navmesh trigger
EXAMPLE: EnableNavMeshTrigger( "some_trigger", true )
void <entity> EnableObstacle(<enable>)
- [MANDATORY] <enable> Whether to enable or disable the obstacle
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables or disables the hkai obstacle associated with a given entity.
EXAMPLE: ent EnableObstacle( true )
void <player> EnableOffhandSpecial()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enable the ability to activate a player's special offhand weapons
EXAMPLE: player EnableOffhandSpecial()
void <entity> EnableOnRadar()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the icon to be shown on the minimap
EXAMPLE: actor EnableOnRadar()
void EnableSpawnPointList(<list>,<team mask>)
- [MANDATORY] <list> list to enable
- [MANDATORY] <team mask> teams that this command will affect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: enables spawn point list for a the team_mask
EXAMPLE: EnableSpawnPointList()
void EnableSpeedBlur(<localClientNum>,<amount>,<inner radius>,<inner outerradius>,<velocityShouldScale>,<velocityScale>,<blurInTime>,<blurOutTime>,<shouldOffset>)
- [MANDATORY] <localClientNum> Client number of the player
- [MANDATORY] <amount> Blur Amount ( 0.0 - 1.0 )
- [MANDATORY] <inner radius> The size of the inner radius ( 0.0 - 1.0 )
- [MANDATORY] <inner outerradius> The size of the inner radius ( 0.0 - 1.0 )
- [OPTIONAL] <velocityShouldScale> false don't scale with velocity, true scale
- [OPTIONAL] <velocityScale> Specify the velocity when the scale is 1.0
- [OPTIONAL] <blurInTime> Specify the time it takes to complete a blur in
- [OPTIONAL] <blurOutTime> Specify the time it takes to complete a blur out
- [OPTIONAL] <shouldOffset> Specify whether the blur should change as you move left/right or up/down
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets a speed blur on on the screen with parameters
EXAMPLE: EnableSpeedBlur( localClientNum, .02, .5, .75, true, 300.0 )
void <vehicle> EnableVehicleSounds()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Enables all sounds from a vehicle
EXAMPLE: self EnableVehicleSounds()
void <player> EndCamAnimScripted(<player>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Ends the camera script on a player.
EXAMPLE: EndCamAnimScripted( player )
void <player> EndExtraCamAnimScripted(<player>,<extra_cam_index>)
- [MANDATORY] <player> The player to play animation on
- [MANDATORY] <extra_cam_index> The extra camera index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Ends the extracam camera script on a player.
EXAMPLE: EndExtraCamAnimScripted( player, 0 )
void evSetRanges(<localClientNum>,<geometryRange>,<targetRange>)
- [MANDATORY] <localClientNum> The local client number.
- [MANDATORY] <geometryRange> geometry draw distance.
- [MANDATORY] <targetRange> target object draw distance.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the visual range for EV mode
EXAMPLE: evSetRanges( localclientnum, geometryRange, targetRange )
void ExitLevel([save persistent])
- [OPTIONAL] [save persistent] if true then player info is retained
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: exits the current level
EXAMPLE: ExitLevel( false )
void ExperimentsGetVariant()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the variant for a user for an experiment
EXAMPLE: variant = player ExperimentsGetVariant( experimentName )
void ExtraCamAnimScripted(<player>,<extra_cam_index>,<cam_anim>,<start_time>,<align_origin>,<align_angles>,[lerp_duration],[camera_name],[ignoreProcessingInitialNoteTracks])
- [MANDATORY] <player> The player to play animation on
- [MANDATORY] <extra_cam_index> The extra camera index
- [MANDATORY] <cam_anim> The animation to play
- [MANDATORY] <start_time> The start time of the animation
- [MANDATORY] <align_origin> The origin to align to
- [MANDATORY] <align_angles> The angles to align to
- [OPTIONAL] [lerp_duration] The lerp duration
- [OPTIONAL] [camera_name] The camera name
- [OPTIONAL] [ignoreProcessingInitialNoteTracks] Ignores processing the initial notetracks if the camera time starts earlier
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays the camera script on an extracam player.
EXAMPLE: ExtraCamAnimScripted( player, 0, "proto_melee_cam", gettime(), origin, angles )
void FakeFire(<owner>,<origin>,<weapon>,<shot count>)
- [MANDATORY] <owner> The player who fakes fire
- [MANDATORY] <origin> the origin of the fake fire
- [MANDATORY] <weapon> The weapon used
- [MANDATORY] <shot count> Number of shots fired
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Simulates gun fire. Sound and radar blip.
EXAMPLE: decoy FakeFire( player, position, "turret_mp", 20 )
void FindAnimByName(<tree>,<anim>)
- [MANDATORY] <tree> Anim tree name
- [MANDATORY] <anim> Name of anim
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Find specified animation( using animation name ) in a specified animtree( using atr name).
EXAMPLE: animnamehash = FindAnimByName("generic_human", "chicken_dance")
void <entity> FindDRFilter(<object>,<filterset>)
- [MANDATORY] <object> entity to check for flags on
- [MANDATORY] <filterset> filterset to use
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: optimized code replacement for find_dr_filter
EXAMPLE: object FindDRFilter( filterset )
void FindPath(<start>,<end>)
- [MANDATORY] <start>.
- [MANDATORY] <end>.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check if a path can be found between these positions.
EXAMPLE: if ( self FindPath( self.origin, potentialpos ) )
void FlashbackFinish()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Finishes the flashback
EXAMPLE: self FlashbackFinish()
void FlashbackStart(<weapon>)
- [MANDATORY] <weapon> The weapon in the player loadout.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Starts the flashback and returns the new origin
EXAMPLE: newpos = self FlashbackStart( <weapon> )
void FlushSubtitles(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum to flush the subtitles for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Flush and clear any current subtitles on the screen for this specific client
EXAMPLE: FlushSubtitles(0)
void FootstepDoEverything()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the footsteps to play sound and play the footstep fx
EXAMPLE: FootstepDoEverything()
void FootstepDoFootstepFX()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the footsteps to play the effect
EXAMPLE: FootstepDoFootstepFX()
void FootstepDoNothing()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the footsteps to do nothing. Not to play sound or play any fx
EXAMPLE: FootstepDoNothing()
void FootstepDoSound()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the footsteps to play sound
EXAMPLE: FootstepDoSound()
void ForceAmbientRoom(<name>)
- [MANDATORY] <name> The sound name
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Force play an ambient sound
EXAMPLE: ForceAmbientRoom( "sndHealth_LowHealth" )
void <entity> ForceDelete()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces Removal of a entity. Does not wait till next snapshot to remove it. Will cause crash if called on animated entity
EXAMPLE: thing forcedelete()
void ForceGameModeMappings(<localClientNum>,<modeName>)
- [MANDATORY] <localClientNum> Client number to play the animation on
- [MANDATORY] <modeName> Name of the mode to switch to or "default" for user defaults
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the users controller mappings for a specific game mode (or resets to user defaults)
EXAMPLE: ForceGameModeMappings( localClientNum, "default" )
void <entity> ForcePainOn()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: toggles pain.forcePain to true; next damage reaction guarenteed
EXAMPLE: ai ForcePainOn()
void ForceStreamBundle(<name>)
- [MANDATORY] <name> Name of the script bundle to stream
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Force the assets in a script bundle to stream in
EXAMPLE: ForceStreamBundle( "cin_ram_02_03_ai" )
void ForceStreamMaterial(<material>,[textureLods])
- [MANDATORY] <material> Material to force stream
- [OPTIONAL] [textureLods] Texture LODs to not force
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the streamer to load texture LODs for a material even if it isn't yet visible. Returns true when all levels are loaded. Call StopForceStreamingMaterial when you no longer need it, or Steve will be upset that you're wasting Streamer memory.
EXAMPLE: areAllForcedLodsLoaded = ForceStreamMaterial( material, mipsToNotForce )
void ForceStreamWeaponRenderOptions(<localClientNum>,<weapon>,<weaponOptions>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <weapon> Weapon to look up the materials to stream with
- [MANDATORY] <weaponOptions> Render Options to look up the materials to stream with
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces all materials for the combination of weapon and render options to stream in
EXAMPLE: ForceStreamWeaponRenderOptions( localClientNum, weapon, weaponOptions )
void ForceStreamWeapons()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces all weapon materials to stream in
EXAMPLE: forceStreamWeapons()
void ForceStreamXModel(<model>,[meshLodsToForce],[textureLodsToForce])
- [MANDATORY] <model> The model to force stream
- [OPTIONAL] [meshLodsToForce] The mesh LODs to force ( Default is 0 )
- [OPTIONAL] [textureLodsToForce] The texture LODs to force ( Default is 0 )
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the streamer to load model and texture LODs for a model even if it isn't yet visible. Returns true when all levels are loaded. Call StopForceStreamingXModel when you no longer need it, or Steve will be upset that you're wasting Streamer memory.
EXAMPLE: areAllForcedLodsLoaded = CScr_ForceStreamXModel( model, meshLodsToNotForce, textureLodsToNotForce, alsoStreamLowerLods=true )
void ForceTModeVisible(<entity>,[visible])
- [MANDATORY] <entity> The entity the value is being set for
- [OPTIONAL] [visible] If the entity should be considered always visible or not (default true)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces an entity to be visible as if a player was seeing it via tmode
EXAMPLE: ForceTModeVisible( aiGuy, true )
void FXBlockSight(<entity>,<radius>)
- [MANDATORY] <entity> the entity to use for the origin for tje line of sight blocker
- [MANDATORY] <radius> the radius of the 'smoke screen' blocker
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Uses a general entity and a radius to set a line of sight blocker on the server for some AI. Destroyed when the entity is freed.
EXAMPLE: FXBlockSight( fxent, 64 )
void GadgetActivate(<slot>,<weapon>)
- [MANDATORY] <slot> The gadget slot to activate. (integer)
- [MANDATORY] <weapon> The gadget weapon
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: turns gadget on in slot.
EXAMPLE: self GadgetActivate( slot )
void GadgetCharging(<slot>,[value])
- [MANDATORY] <slot> The gadget slot. (integer)
- [OPTIONAL] [value] undefined to get current state, true to set or false to unset. (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the gadget charging state.
EXAMPLE: self GadgetCharging( slot, true )
void GadgetDeactivate(<slot>,<weapon>,<penalty>)
- [MANDATORY] <slot> The gadget slot to deactivate. (integer)
- [MANDATORY] <weapon> The gadget weapon
- [OPTIONAL] <penalty> The power penalty type
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: turns gadget off in slot.
EXAMPLE: self GadgetDeactivate( slot, weapon, GADGET_OFF_PENALTY_SHUT_OFF )
void GadgetFlickering(<slot>,[flicker],[length])
- [MANDATORY] <slot> The gadget slot to test or apply flickering state. (integer)
- [OPTIONAL] [flicker] Set gadget to flickering state if true (boolean)
- [OPTIONAL] [length] Set gadget flickering length (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Tests a gadget is flickering and can optionally set flickering.
EXAMPLE: self GadgetFlickering( slot, true, 200 )
void GadgetGetSlot(<weapon>)
- [MANDATORY] <weapon> The weapon in the player loadout.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get gadget slot for weapon.
EXAMPLE: self GadgetGetSlot( weapon )
void GadgetIsActive(<slot>)
- [MANDATORY] <slot> The gadget slot to test. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the gadget is active.
EXAMPLE: self GadgetIsActive( slot )
void GadgetIsPrimed(<slot>)
- [MANDATORY] <slot> The gadget slot to test. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the gadget is primed.
EXAMPLE: self GadgetIsPrimed( slot )
void GadgetIsReady(<slot>)
- [MANDATORY] <slot> The gadget slot to test. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the gadget is ready.
EXAMPLE: self GadgetIsReady( slot )
void GadgetPowerChange(<slot>,<change>)
- [MANDATORY] <slot> The gadget slot apply the power change. (integer)
- [MANDATORY] <change> The amount to change the power by. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Applies a power change to the gadget power.
EXAMPLE: self GadgetPowerChange( slot, -20 )
void GadgetPowerGet(<slot>)
- [MANDATORY] <slot> The gadget slot (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the power remaining for gadget.
EXAMPLE: power = self GadgetPowerGet( slot )
void GadgetPowerReset(<slot>)
- [MANDATORY] <slot> The gadget slot apply the power reset. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Applies a power reset.
EXAMPLE: self GadgetPowerReset( slot )
void GadgetPowerSet(<slot>,<value>)
- [MANDATORY] <slot> The gadget slot apply the power change. (integer)
- [MANDATORY] <value> The amount to set power to. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the power override to value. Works always.
EXAMPLE: self GadgetPowerSet( slot, 100 )
entity <entity> GadgetPulseGetOwner()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the owner of the vision pulse you an entity is pulsed by if it exists
EXAMPLE: entity GadgetPulseGetOwner(<localclientnum>)
void <entity> GadgetPulseResetReveal()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Resets the reveal on an entity for this player
EXAMPLE: entity GadgetPulseResetReveal()
void <entity> GadgetPulseRevealed()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Tests whether an enemy is currently revealed for this player
EXAMPLE: reveal = entity GadgetPulseRevealed()
void GadgetSetActivateTime(<slot>,<time>)
- [MANDATORY] <slot> The gadget slot. (integer)
- [MANDATORY] <time> The activation time. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the activation time of this gadget.
EXAMPLE: self GadgetSetActivateTime( slot, time )
void GadgetSetEntity(<slot>,<entity>)
- [MANDATORY] <slot> The gadget slot.
- [MANDATORY] <entity> The entity used by the gadget.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the entity used by this gadget.
EXAMPLE: self GadgetSetEntity( slot, ent )
void GadgetSetInfrared(<localClientNum>,<bool>)
- [MANDATORY] <localClientNum> The local client number.
- [MANDATORY] <bool> 0 disables infrared, 1 enables it.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Enables or disables infrared for the gadget
EXAMPLE: GadgetSetInfrared( localclientnum, newVal )
void GadgetStateChange(<slot>,<weapon>,<state>)
- [MANDATORY] <slot> The gadget slot to activate. (integer)
- [MANDATORY] <weapon> The gadget weapon
- [MANDATORY] <state> The state to change it to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: changes the gadget state in a slot.
EXAMPLE: self GadgetStateChange( slot )
void GadgetTargetResult(<hit_miss>)
- [MANDATORY] <hit_miss> hit or miss
CATEGORY:
CLIENT/SERVER: Server
EXAMPLE: GadgetTargetResult(true)
void GameModeIsMode(<gamemode>)
- [MANDATORY] <gamemode> (int)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current game mode is the given mode
EXAMPLE: if ( GameModeIsMode( level.GAMEMODE_WAGER_MATCH ) )
void GeneratePointsAroundCenter(<origin>,<maxSearchRadius>,<innerSpacing>,[minRadius],<innerSpacing>,[distributionBias])
- [MANDATORY] <origin> Position to start the search around.
- [MANDATORY] <maxSearchRadius> the maximum radius away from origin.
- [MANDATORY] <innerSpacing> the distance between points at the minRadius.
- [OPTIONAL] [minRadius] the minimum radius away from origin. should be between 0 and maxRadius (both inclusive).
- [OPTIONAL] [outerSpacing] if defined, the distance between points will be Lerped from <innerSpacing> to [outerSpacing], to create a gradual distribution from minRadius to maxRadius.
- [OPTIONAL] [distributionBias] (vec2) if defined, the density of the points will be changed gradually along the direction of this vector. the magnitude will be use as scalar, with 1 being the norm scale.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: generate uniformly distributed points around a center in 2D (XY) plane
EXAMPLE: array = GeneratePointsAroundCenter( enemy.origin, 500, 80, 100, 40, (-0.3,0,0) )
void <actor> GenerateScriptEvent([origin],[radius],[name])
- [OPTIONAL] [origin] Source position of the event.
- [OPTIONAL] [radius] Size of the event.
- [OPTIONAL] [name] Name of the event.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a script event at the actor's origin, with default radius
EXAMPLE: self GenerateScriptEvent()
void <entity> GetAbsMaxs()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get absolute maximum bounds of the entity in world space.
EXAMPLE: absMaxs = wallModel GetAbsMaxs()
void <entity> GetAbsMins()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get absolute minimum bounds of the entity in world space.
EXAMPLE: absMins = wallModel GetAbsMins()
void GetActiveLocalClients()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the number of active local clients
EXAMPLE: active_clients = GetActiveLocalClients()
void GetActorArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the human AI
EXAMPLE: aiarray = GetActorArray( "ralph", "targetname" )
void GetActorSpawnerArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the actor spawners in a level.
EXAMPLE: spawners = GetSpawnerArray()
entity GetActorSpawnerTeamArray(<team>,[team])
- [MANDATORY] <team> a team name, either 'axis', 'allies', or 'neutral'
- [OPTIONAL] [team] any number of additional team names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the spawners in a level
EXAMPLE: enemies = GetActorSpawnerTeamArray( "axis", "neutral" )
entity GetActorTeamArray(<team>,[team])
- [MANDATORY] <team> a team name, either 'axis', 'allies', or 'neutral'
- [OPTIONAL] [team] any number of additional team names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the human AI
EXAMPLE: aiarray = GetActorTeamArray( "axis", "neutral" )
void GetActorTeamCountRadius(<origin>,<radius>,[team])
- [MANDATORY] <origin> Center of sphere
- [MANDATORY] <radius> Radius of sphere
- [OPTIONAL] [team] any number of team names may be added, either 'axis', 'allies', or 'neutral' (no team implies all teams)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns number of human actor AI within a sphere on a given set of teams
EXAMPLE: nearbyOthersCount = GetActorTeamCountRadius( self.origin, 500, "axis", "neutral" )
void <entity> GetActorWeaponOptions()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return's the actors current weapon options, ex: weapon camo option.
EXAMPLE: self GetActorWeaponOptions()
entity GetAIArchetypeArray([team])
- [OPTIONAL] [team] a team name, either 'axis', 'allies', 'neutral', or 'all'. Defaults to 'all'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the AI for the given archetype and optionally given team
EXAMPLE: aiarray = GetAIArchetypeArray( "human" )
void GetAIArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the human AI
EXAMPLE: aiarray = GetAIArray( "my_ai", "targetname" )
void GetAICount()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the current ai count.
EXAMPLE: aicount = GetAICount()
void <entity> GetAIFxName(<localClientNum>,<aiFxBundleKey>)
- [MANDATORY] <localClientNum> Local client to check
- [MANDATORY] <aiFxBundleKey> Script bundle key defined within the AI's aiFxTable.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns a FX name corresponding to the AI's aiFxBundle key/value pair.
EXAMPLE: fxName = self GetAIFxName( localClientNum, surfaceTable )
void GetAILimit()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the max ai count set by script.
EXAMPLE: ailimit = GetAILimit()
void <entity> GetAimAngles(<targetPos>,<aimTag>,<prevAimTagAngles>,<prevAimAngles>,<maxAngles>,<maxAimDeltas>,<maxTagDelta>)
- [MANDATORY] <targetPos>
- [MANDATORY] <aimTag>
- [MANDATORY] <prevAimTagAngles>
- [MANDATORY] <prevAimAngles>
- [MANDATORY] <maxAngles>
- [MANDATORY] <maxAimDeltas>
- [MANDATORY] <maxTagDelta>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array with the angles of the aimTag and the relative aiming delta angles from this orientation.
EXAMPLE: aim_angles = ent GetAimAngles( shootPos, "tag_aim", (0, 30, 0), (15, 10, 0), (60, 60, 0), (5, 5, 0), 11 )
entity GetAISpeciesArray([team],[species])
- [OPTIONAL] [team] a team name, either 'axis', 'allies', 'neutral', or 'all'. Defaults to 'all'.
- [OPTIONAL] [species] species of AI to get, 'human', 'dog', 'robot' or 'all'. Defaults to 'human'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the AI
EXAMPLE: aiarray = GetAISpeciesArray( "axis", "all" )
entity GetAITeamArray(<team>,[team])
- [MANDATORY] <team> a team name, either 'axis', 'allies', or 'neutral'
- [OPTIONAL] [team] any number of additional team names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the human AI and vehicle AI
EXAMPLE: aiarray = GetAITeamArray( "axis", "neutral" )
void GetAITriggerFlags()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the spawn flags that will allow AI to activate triggers
EXAMPLE: spawn("trigger_radius", (0,0,0), GetAITriggerFlags())
void GetAllCharacterBodies(<sessionMode>)
- [MANDATORY] <sessionMode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns all character indices, even disabled ones, for the current session mode (or specified session mode)
EXAMPLE: heroIndices = GetAllCharacterBodies()
void GetAllCharacterHeads(<sessionmode>)
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns all character indices, even disabled ones, for the current session mode (or specified session mode)
EXAMPLE: heroIndices = GetAllCharacterHeads()
pathnode GetAllNodes()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets all of the nodes in a level
EXAMPLE: nodes = GetAllNodes()
void GetAmmoCount(<weapon>)
- [MANDATORY] <weapon> The weapon for which we need ammo count
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the count of ammo left
EXAMPLE: n_ammo = self GetAmmoCount( w_weapon )
void GetAngleDelta(<animation name>,[start time],[end time])
- [MANDATORY] <animation name> Name of the animation
- [OPTIONAL] [start time] Start time of the animation
- [OPTIONAL] [end time] End time of the animation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the angle delta of the animation
EXAMPLE: angleDelta = getAngleDelta( arrivalAnim, 0, normalizedLength )
void GetAngleFromBits()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the angle (0 - 360) from the (compressed) bits
EXAMPLE: yaw = GetAngleFromBits( bits, 3 )
void <entity> GetAngles()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the rotation of the entity
EXAMPLE: angles = self GetAngles()
void <entity> GetAnimCurrFrameCount(<animation>)
- [MANDATORY] <animation> a primitive animation: calling this function on a non-primitive animation will fail
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get current frame for the given animation when its running.
EXAMPLE: CurrFrameNum = GetAnimCurrFrameCount(climbAnim)
void GetAnimForCharacter(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the name of the animation to use for the character pose in the frontend
EXAMPLE: frontendVignetteAnim = GetAnimForCharacter( characterIndex, "mp" )
void GetAnimFrameCount(<animation>)
- [MANDATORY] <animation> a primitive animation: calling this function on a non-primitive animation will fail
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get total number of frames for the given animation.
EXAMPLE: FrameNum = GetAnimFrameCount(climbAnim)
void GetAnimLength(<animation>)
- [MANDATORY] <animation> a primitive animation: calling this function on a non-primitive animation will fail
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the length of an animation
EXAMPLE: cycleTime = GetAnimLength( climbAnim )
void GetAnimStateCategory()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the current anim state category for an Actor.
EXAMPLE: category = GetAnimStateCategory( )
void GetAnimTagOrigin(<animation name>,<normalized time>,<tag name>)
- [MANDATORY] <animation name> Name of the animation.
- [MANDATORY] <normalized time> 0.0 to 1.0 time within the animation.
- [MANDATORY] <tag name> Name of the tag to look up within the animation.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the local tag position within the animation at the specified normalized time, has no consideration to bone hierarchy.
EXAMPLE: tagPosition = GetAnimTagOrigin( arrivalAnim, 0, "tag_sync" )
void <entity> GetAnimTime(<animation>)
- [MANDATORY] <animation> animation to manipulate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the normalized animation time for the given animation.
EXAMPLE: if ( (self GetAnimTime( %walk_and_run_loops ) ) < 0.5 )
pathnode GetAnyNodeArray(<pos>,<radius>)
- [MANDATORY] <pos> search origin
- [MANDATORY] <radius> radius to search within
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of nodes within given radius
EXAMPLE: node = GetCoverNodeArray( self.origin, 256 )
void GetArchetypeFromClassname()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Given classname, returns archetype name if its an AITYPE or VEHICLE.
EXAMPLE: GetArchetypeFromClassname("spawner_enemy_54i_human_sniper_sniperrifle")
void GetAssignedTeam(<player>)
- [MANDATORY] <player> The player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns the player's team as assigned by matchmaking. 0 = No Team, 1 = OpFor, 2 = Allies, 3 = Spectator.
EXAMPLE: team = GetAssignedTeam( player )
void GetAssignedTeamName(<player>)
- [MANDATORY] <player> The player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns the player's team as assigned by matchmaking. 0 = No Team, 1 = OpFor, 2 = Allies, 3 = Spectator.
EXAMPLE: team = GetAssignedTeam( player )
void GetAtrLoaded()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: return an array of anim tree name loaded onto the server.
EXAMPLE: trees = GetAtrLoaded()
void <entity> GetAttachIgnoreCollision(<modelindex>)
- [MANDATORY] <modelindex> The index of the model attached to the entity, starting at 0, so for instance 3 will get the fourth model attached. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the ignore collision flag of the attached model at the given attachment slot
EXAMPLE: model_ignore_collision = self GetAttachIgnoreCollision( index )
void <entity> GetAttachmentCosmeticVariantForWeapon(<custom Class>,<loadoutSlot>)
- [MANDATORY] <custom Class> Class Num
- [MANDATORY] <loadoutSlot> Loadout Slot (primary or secondary)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the AttachmentCosmeticVariantIndexes data to be passed in to GetWeapon
EXAMPLE: acvi = self GetAttachmentCosmeticVariantForWeapon( class_num, "primary" )
void GetAttachmentCosmeticVariantIndexes(<weaponname>,[attachmentname_1],[variantindex_1],[attachmentname_2],[variantindex_2],[attachmentname_3],[variantindex_3],[attachmentname_4],[variantindex_4],[attachmentname_5],[variantindex_5],[attachmentname_6],[variantindex_6],[attachmentname_7],[variantindex_7],[attachmentname_8],[variantindex_8])
- [MANDATORY] <weaponname> the name of the base weapon to return
- [OPTIONAL] [attachmentname_1] the name of the first attachment
- [OPTIONAL] [variantindex_1] the index of the cosmetic variant to use for the first attachment
- [OPTIONAL] [attachmentname_2] the name of the second attachment
- [OPTIONAL] [variantindex_2] the index of the cosmetic variant to use for the second attachment
- [OPTIONAL] [attachmentname_3] the name of the third attachment
- [OPTIONAL] [variantindex_3] the index of the cosmetic variant to use for the third attachment
- [OPTIONAL] [attachmentname_4] the name of the fourth attachment
- [OPTIONAL] [variantindex_4] the index of the cosmetic variant to use for the fourth attachment
- [OPTIONAL] [attachmentname_5] the name of the fifth attachment
- [OPTIONAL] [variantindex_5] the index of the cosmetic variant to use for the fifth attachment
- [OPTIONAL] [attachmentname_6] the name of the sixth attachment
- [OPTIONAL] [variantindex_6] the index of the cosmetic variant to use for the sixth attachment
- [OPTIONAL] [attachmentname_7] the name of the seventh attachment
- [OPTIONAL] [variantindex_7] the index of the cosmetic variant to use for the seventh attachment
- [OPTIONAL] [attachmentname_8] the name of the eighth attachment
- [OPTIONAL] [variantindex_8] the index of the cosmetic variant to use for the eighth attachment
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the AttachmentCosmeticVariantIndexes data to be passed in to GetWeapon
EXAMPLE: GetAttachmentCosmeticVariantIndexes( "mp7_mp", "acog", 2, "grip", 1 )
void GetAttachmentNames()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns array containing the names for each type of attachment.
EXAMPLE: attachmentNames = GetAttachmentNames()
void <entity> GetAttachModelName(<modelindex>)
- [MANDATORY] <modelindex> The index of the model attached to the entity, starting at 0, so for instance 3 will get the fourth model attached. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the name of the attached model at the given attachment slot
EXAMPLE: model_name = self GetAttachModelName( index )
void <entity> GetAttachSize()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of attached models for this entity.
EXAMPLE: size = self GetAttachSize()
void <entity> GetAttachTagName(<modelindex>)
- [MANDATORY] <modelindex> The index of the model attached to the entity, starting at 0, so for instance 3 will get the fourth model attached. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the tagname of the attached model at the given attachment slot
EXAMPLE: tag_name = self GetAttachTagName( index )
void GetBaseWeaponItemIndex(<weaponName>)
- [MANDATORY] <weaponName> full weapon name e.g. m16_acog_mp.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the base weapon item index from the statstable
EXAMPLE: baseWeaponName = GetBaseWeaponItemIndex( "m16_acog_mp" )
void <ai> GetBestInfluencepos(<index>,<low>,<high>)
- [MANDATORY] <index> which influence map to use
- [MANDATORY] <low> the low threshold value to check against
- [MANDATORY] <high> the high threshold value to check against
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns the influence map position for ai, this is custom logic to return the closest posistion between the passed in thresholds
EXAMPLE: dir = self GetBestInfluencePos( index, low, high)
entity GetBestSpawnPoint(<point team>,<influencer team>,<vis team>,[player],[predictedSpawn],[array of lists])
- [MANDATORY] <point team> Team that we need the points for
- [MANDATORY] <influencer team> Influencer teams to compare the points against
- [MANDATORY] <vis team> Team mask to use for enemy vis tests
- [OPTIONAL] [player] Player that we want the points for. The first parameter will still be used for the team.
- [OPTIONAL] [predictedSpawn] true if this is a predicted spawn request (used by texture streaming).
- [OPTIONAL] [array of lists] if provided, the spawn point will be chosen from one of these lists. If a list is disabled already for a given team, it will not be considered.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a sorted array of spawnpoints in order from best to worst for the given team
EXAMPLE: GetSortedSpawnPoints()
void GetBitsForAngle()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the compressed bits for an angle with <num bits> granularity
EXAMPLE: bits = GetBitsForAngle( angle, 3 )
void GetBodyAccentColorCountForHero(<localClientNum>,<sessionMode>,<heroIndex>,<bodyIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
- [MANDATORY] <bodyIndex> The index of the body for the specific hero
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the number of accents for the specified body model of a specific hero
EXAMPLE: modelName = GetBodyAccentColorCountForHero( localClientNum, 0, 0 )
void <entity> GetBodyRenderOptionsPacked()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the packed value of body render options (body type, style, colors)
EXAMPLE: gibEntity GetBodyRenderOptionsPacked()
void GetBrushModelCenter(<entity>)
- [MANDATORY] <entity> The brush model entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the center of the Brush Model entity
EXAMPLE: center = GetBrushModelCenter( self )
void <player> GetBuildKitAttachmentCosmeticVariantIndexes(<weapon>,<upgraded>)
- [MANDATORY] <weapon> weapon object
- [OPTIONAL] <upgraded> bool whether this should be the upgraded version. If so extclip and fmj will be added
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get attachment cosmetic variant indexes for the weapon from the player's build kit
EXAMPLE: acvi = self GetBuildKitAttachmentCosmeticVariantIndexes( ar_standard )
void <player> GetBuildKitWeapon(<weapon>,<upgraded>)
- [MANDATORY] <weapon> weapon object
- [OPTIONAL] <upgraded> bool whether this should be the upgraded version. If so extclip and fmj will be added
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get weapon object (including attachments) for the weapon from the player's build kit
EXAMPLE: weapon = self GetBuildKitWeapon( ar_standard )
void <player> GetBuildKitWeaponOptions(<weapon>,[camo_index])
- [MANDATORY] <weapon> weapon object
- [OPTIONAL] [camo_index] camo index to override the one from the build kit, typically a packapunch camo index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get weapon options for the weapon from the player's build kit
EXAMPLE: weapon_options = self GetBuildKitWeaponOptions( ar_standard, packapunch_camo_index )
void GetCamAngles()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the camera view angles
EXAMPLE: player GetCamPos()
void GetCamAnglesByLocalClientNum(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the camera angles of the local client given
EXAMPLE: cam_angles = GetCamAnglesByLocalClientNum( 0 )
void GetCamAnimTime(<cam_anim>)
- [MANDATORY] <cam_anim> The animation to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the duration of an xcam in milliseconds.
EXAMPLE: GetCamAnimTime( "proto_melee_cam" )
void GetCamPos()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the camera position
EXAMPLE: player GetCamPos()
void GetCamPosByLocalClientNum(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the camera position of the local client given
EXAMPLE: cam_origin = GetCamPosByLocalClientNum( 0 )
void <entity> GetCentroid()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the centroid of an entity
EXAMPLE: centroid = self GetCentroid()
void GetCharacterAssetName(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the asset name for a character for the current session mode
EXAMPLE: heroName = GetCharacterAssetName( characterIndex, "mp" )
void GetCharacterBodyModelColorCount(<characterIndex>,<bodyStyleIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <bodyStyleIndex> The index of the body style in the character
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the body model count for a character for the current session mode
EXAMPLE: heroBodyModelCount = GetCharacterBodyModelCount( characterIndex, "mp" )
void GetCharacterBodyModelCount(<characterIndex>,<sessionMode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionMode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the body model count for a character for the current session mode
EXAMPLE: heroBodyModelCount = GetCharacterBodyModelCount( characterIndex, "mp" )
void GetCharacterBodyStyleIndex(<gender>,<bodyStyleDisplayName>)
- [MANDATORY] <gender> Whether or not to use the male bodytype
- [MANDATORY] <bodyStyleDisplayName> The name of the body style
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the index of the body style designated by the given display name
EXAMPLE: bodyStyleIndex = GetCharacterBodyStyleIndex( true, "Technomancer" )
void GetCharacterCustomizationForXUID(<localClientNum>,<xuid>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <xuid> The xuid of the player to get customization for
CATEGORY:
CLIENT/SERVER: Client
EXAMPLE: GetCharacterCustomizationForXUID( <xuid>)
void GetCharacterDisplayName(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the display name for a character for the current session mode
EXAMPLE: heroName = GetCharacterDisplayName( characterIndex, "mp" )
void GetCharacterFields(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns info for the character pose playerbodytype
EXAMPLE: heroFields = GetCharacterFields( characterIndex, "mp" )
void GetCharacterHeadRenderOptions(<headIndex>)
- [MANDATORY] <headIndex> The index of the character in the current game-mode's character table
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Calculates the packed helmet render option - to be passed to SetBodyRenderOptions()
EXAMPLE: helmetRenderOptions = GetCharacterHeadRenderOptions( 0 )
void GetCharacterHelmetHidesHead(<characterIndex>,<helmetIndex>,<sessionMode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <helmetIndex> The index of the helmet belonging to that character
- [MANDATORY] <sessionMode> The session mode ( mp cp zm )
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns whether or not the characters head should be hidden based on the helmet
EXAMPLE: hideHead = GetCharacterHelmetHidesHead( 0, 0, 0 )
void GetCharacterHelmetModelColorCount(<characterIndex>,<helmetStyleIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <helmetStyleIndex> The index of the helmet style in the character
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the helmet model count for a character for the current session mode
EXAMPLE: heroHelmetModelCount = GetCharacterHelmetModelCount( characterIndex, "mp" )
void GetCharacterHelmetModelCount(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the helmet model count for a character for the current session mode
EXAMPLE: heroHelmetModelCount = GetCharacterHelmetModelCount( characterIndex, "mp" )
void GetCharacterHelmetRenderOptions(<characterIndex>,<helmetIndex>,<colorIndex1>,<colorIndex2>,<colorIndex3>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <helmetIndex> The index of the helmet belonging to that character
- [MANDATORY] <colorIndex1> The index of accent color 1
- [MANDATORY] <colorIndex2> The index of accent color 2
- [MANDATORY] <colorIndex3> The index of accent color 3
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Calculates the packed helmet render option - to be passed to SetBodyRenderOptions()
EXAMPLE: helmetRenderOptions = GetCharacterHelmetRenderOptions( 0, 1, 1, 2, 3 )
void <entity> GetCharacterIndex()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the character index
EXAMPLE: index = self GetCharacterIndex()
void GetCharacterModeRenderOptions(<session_mode>)
- [MANDATORY] <session_mode> Session Mode enum index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Calculates the packed mode render option - to be passed to SetBodyRenderOptions()
EXAMPLE: modeRenderOptions = GetCharacterModeRenderOptions( SESSIONMODE_MULTIPLAYER )
void GetClassIndexFromName(<className>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the index in a particular class
EXAMPLE: GScr_GetClassIndexFromName( "CLASS_SMG" )
void GetClientFieldVersion()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the version of the specifiec client field, in the specified client field set - or 0 if the field isn't registered.
EXAMPLE: if(GetClientFieldVersion( "world", "fog_volume_active" ))
void <entity> GetClientTime()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the current client time in milliseconds
EXAMPLE: currTime = ent GetClientTime()
entity GetClones(<local client num>)
- [MANDATORY] <local client num> local client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get an array of all the clones
EXAMPLE: clones = GetClones( localClientNum )
void GetClosestPointOnNavMesh(<position>,[searchRadius],[distFromBoundary],[materialFlags])
- [MANDATORY] <position> Position to start the search around.
- [OPTIONAL] [searchRadius] Radius to search within. If not provided, a default value proximately equal to player size will be used.
- [OPTIONAL] [distFromBoundary] Distance to keep away from NavMesh boundary. This distance can NOT be guaranteed. If not provided, it will be treated as 15 (AI default radius).
- [OPTIONAL] [materialFlags] the flags marking whether a face type can be used
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get a point on NavMesh that's closest to the given position within radius. Returns the adjusted position if found one, or undefined if not found. If distFromBoundary is defined, the point found on NavMesh will then be moved again to get it away from boundary
EXAMPLE: posOnNavMesh = GetClosestPointOnNavMesh( (10,20,30), 25, 15 )
void <flying_ai> GetClosestPointOnNavVolume(<position>,[searchRadius])
- [MANDATORY] <position> Position to start the search around.
- [OPTIONAL] [searchRadius] Radius to search within. If not provided, a default value proximately equal to player size will be used.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get a point on nav volume that's closest to the given position within radius. Returns the adjusted position if found one, or undefined if not found.
EXAMPLE: posOnNavVolume = self GetClosestPointOnNavVolume( (10,20,30), 25 )
void GetContractName(<contractIndex>)
- [MANDATORY] <contractIndex> Contract ID
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the name of the specified contract
EXAMPLE: contractName = GetContractName( contractIndex )
void GetContractRequiredCount(<contractIndex>)
- [MANDATORY] <contractIndex> Contract ID
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the required count for the specified contract
EXAMPLE: contractName = GetContractRequiredCount( contractIndex )
void GetContractRequirements(<contractIndex>)
- [MANDATORY] <contractIndex> The index of the contract
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of contract requirements. Each requirement takes up two indices, 'reqType' and 'reqData'.
EXAMPLE: mapNames = GetContractRequirements( contractIndex )
void GetContractResetConditions(<contractIndex>)
- [MANDATORY] <contractIndex> Contract ID
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the reset conditions of the specified contract
EXAMPLE: resetConditions = GetContractResetConditions( contractIndex )
void GetControllerPosition(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the controller you want the position of
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: get current deflection of control, returns values via an array with vector values for "look" and "move" which correspond to those controls. Values are -1 to 1 and represent the given axis on the vector
EXAMPLE: pos = self GetControllerPosition() ...
void GetControllerType()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns the controller type of the player
EXAMPLE: player GetControllerType()
void <player> GetCorpseAnim()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the animation that the corpse will play
EXAMPLE: deathAnim = self GetCorpseAnim()
entity GetCorpseArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the items in a level.
EXAMPLE: origins = GetCorpseArray()
void GetCounterTotal(<counterType>)
- [MANDATORY] <counterType> The counter type
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the counter count for the given counter
EXAMPLE: count = GetCounterTotal( "global_comebacks" )
pathnode GetCoverNodeArray(<pos>,<radius>)
- [MANDATORY] <pos> search origin
- [MANDATORY] <radius> radius to search within
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of cover nodes within given radius
EXAMPLE: node = GetCoverNodeArray( self.origin, 256 )
void GetCrateHeadObjective(<weapon>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the equipment head objective as described in the grenadeweapon gdt.
EXAMPLE: crateObjective = GetCrateHeadObjective( uav )
void <entity> GetCurrentAnimScriptedName()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get current frame for the given animation when its running.
EXAMPLE: animName = GetCurrentAnimScriptedName()
void <ai_or_player> GetCurrentEventId()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the id from the current event.
EXAMPLE: eventId = self GetCurrentEventId()
void <ai_or_player> GetCurrentEventName()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the name of the current event.
EXAMPLE: eventId = self GetCurrentEventName()
entity <ai_or_player> GetCurrentEventOriginator()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the originator from the current event if any
EXAMPLE: target = self GetCurrentEventOriginator()
void <ai_or_player> GetCurrentEventType()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the type from the current event.
EXAMPLE: type = self GetCurrentEventType()
void <ai_or_player> GetCurrentEventTypeName()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the type string name from the current event.
EXAMPLE: type = self GetCurrentEventTypeName()
void <player> GetCurrentGunRank(<index>)
- [MANDATORY] <index> the index of the gun to get
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the gun current rank
EXAMPLE: rank - GetCurrentGunRank(0)
void GetCurrentWeaponIncludingMelee(<localClientNum>)
- [MANDATORY] <localClientNum> Local client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the weapon being used by the specified local client, and will return the melee weapon if the client is in a melee state
EXAMPLE: currentWeapon = GetCurrentWeapon( localClientNum )
void GetCustomTeamName(<teamid>)
- [MANDATORY] <teamid> TeamID
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the team name
EXAMPLE: name = GetCustomTeamName( teamid )
void GetCyberComAbilityName(<flag>)
- [MANDATORY] <flag> flag field
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the cybercom ability name given the flag, type
EXAMPLE: GetCyberComAbilityName( flag, type )
void getCybercomType()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the active cybercom type
EXAMPLE: cybercom_type = player getCybercomType()
void GetCyberComWeapon(<flag>,<type>,<upgraded>)
- [MANDATORY] <flag> flag field
- [MANDATORY] <type> type of weapon
- [MANDATORY] <upgraded> true if the weapon is upgraded
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the cybercom gadget weapon given the flag, type, and if upgraded
EXAMPLE: GetCyberComWeapon( flag, type, upgraded )
entity GetDamageableEntArray([origin],[radius],[checkZ])
- [OPTIONAL] [origin] origin to check against
- [OPTIONAL] [radius] max distance to origin
- [OPTIONAL] [checkZ] if true then check distance in 3d
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the entities that can be damaged. Can optionally take an origin, radius, and a flag to check 3D.
EXAMPLE: entities = GetDamageableEntArray( maxDist, true )
void <player or actor> GetDebugEye()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the debug position of the eye for an AI or Player
EXAMPLE: eyePos = player GetDebugEye()
void <player> GetDecorations([ only_decorations_earned ])
- [OPTIONAL] [ only_decorations_earned ] Only get the decorations that the player has earned
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of booleans that represents all the decorations the player has earned
EXAMPLE: medals = e_player GetDecorationsEarned()
void GetDefaultClassSlot(<classname>,<slotname>)
- [MANDATORY] <classname> the classname of the item
- [MANDATORY] <slotname> The slot to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the item in a particular default class slot
EXAMPLE: GetDefaultClassSlot( "cqb", "primary" ); // Returns primary weapon reference
void GetDemoVersion()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the demo version value
EXAMPLE: if ( GetDemoVersion() )
void <entity> GetDistanceFromScreenCenter(<localClientNum>)
- [MANDATORY] <localClientNum> Local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the distance from the screen center to the entity
EXAMPLE: ent GetDistanceFromScreenCenter( localClientNum )
entity GetDroppedWeapons()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array containing all the dropped weapons in the level
void getdynent(<targetname>)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the dynent with the specified targetname
EXAMPLE: twig = getdynent("twig")
void getdynentarray(targetname)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get a dynent array with the specified targetname
EXAMPLE: twigs = getdynentarray("twig")
entity <entity> GetEnemies()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of enemies.
EXAMPLE: enemies = self GetEnemies()
void <player> GetEnemyScramblerAmount()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the amount alpha of the enemy scrambler applied
EXAMPLE: alpha = player GetEnemyScramblerAmount( )
entity GetEnt(<name>,<key>,[ignore spawners])
- [MANDATORY] <name> name to search for
- [MANDATORY] <key> key that name goes with
- [OPTIONAL] [ignore spawners] if true then you won't get a spawner back
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Looks up entities by key and name
EXAMPLE: spawner = GetEnt( "doorguy1", "targetname" )
entity GetEntArray([name],[key],[ignore spawners])
- [OPTIONAL] [name] name to search for
- [OPTIONAL] [key] key that name goes with
- [OPTIONAL] [ignore spawners] if true then you won't get a spawner back
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Looks up entities by key and name and a return an array of the matched entities
EXAMPLE: spawners = GetEntArray( "doorguy1", "targetname" )
entity GetEntArrayByType(<localclientnum>,<type>)
- [MANDATORY] <localclientnum> Which local client's entity list to use.
- [MANDATORY] <type> Type of the entity. Look into shared.gsh for the ET enum
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets an array of entities that have the given the type of the entity ( for example, ET_MISSILE )
EXAMPLE: grenades = GetEntArray( 0, ET_MISSILE )
entity GetEntArrayFromArray(<array>,<name>,<key>)
- [MANDATORY] <array> array of entities
- [MANDATORY] <name> name to search for
- [MANDATORY] <key> key that name goes with
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Searches given array entities by key and name and a return an array of the matched entities
EXAMPLE: spawners = GetEntArrayFromArray( array, "doorguy1", "targetname" )
entity GetEntByNum(<entity number>)
- [MANDATORY] <entity number>(integer) The number of the entity to get
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an entity from its entity number
EXAMPLE: entity = GetEntByNum( entnum )
void getEnterButton()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the enter button.
EXAMPLE: getEnterButton()
void <entity> GetEntityAnimRate()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: get the entity animation rate - ZOMBIES ONLY
EXAMPLE: rate = self GetEntityAnimRate()
void <entity> GetEntityNumber()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the entity number of the entity
EXAMPLE: hitEntNum = hitEnt getEntityNumber()
void <entity> GetEntityType()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the type of entity
EXAMPLE: inflictorEntType = grenade getEntityType()
void GetEntNavMaterial(<ai_or_vehicle>)
- [MANDATORY] <ai_or_vehicle> An AI character or an AI vehicle
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: get NavMesh material at where the entity stands
EXAMPLE: material = GetEntNavMaterial( ai_actor )
void <entity> GetEntNum()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the entity number for this entity
EXAMPLE: self GetEntNum()
void GetEquipmentHeadObjective(<weapon>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the equipment head objective as described in the grenadeweapon gdt.
EXAMPLE: headObjective = GetEquipmentHeadObjective( bouncingbettty )
void GetEquippedBodyAccentColorForHero(<localClientNum>,<sessionMode>,<heroIndex>,<bodyIndex>,<colorIndex>,[getForLobbyClient])
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's session mode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table or in case of lobby client, his queue position
- [MANDATORY] <bodyIndex> The index of the body
- [MANDATORY] <colorIndex> The index of the accent color
- [OPTIONAL] [getForLobbyClient] If this is set then we are supposed to retrieve for lobby client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns an array of the equipped body accent colors of a specific hero
EXAMPLE: colorArray = GetEquippedBodyAccentColorForHero( localClientNum, 0 )
void GetEquippedBodyForHero(<localClientNum>,<sessionMode>,<heroIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped body model of a specific hero
EXAMPLE: modelName = GetEquippedBodyForHero( localClientNum, SESSIONMODE_MULTIPLAYER, 0 )
void GetEquippedBodyIndexForHero(<localClientNum>,<sessionMode>,<heroIndex>,[getForLobbyClient])
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode>Character Session Mode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table or in case of lobby client, his queue position
- [OPTIONAL] [getForLobbyClient] If this is set then we are supposed to retrieve for lobby client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the equipped body model of a specific hero
EXAMPLE: bodyIndex = GetEquippedBodyIndexForHero( localClientNum, 0 )
void GetEquippedCharacterIndexForLobbyClientHero(<localClientNum>,<lobbyClientQueueIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <lobbyClientQueueIndex> Queue index for lobby client, from which we get all his other information
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped helmet accents colors of a specific hero
EXAMPLE: colorArray = GetEquippedHelmetAccentColorForHero( localClientNum, 0 )
void GetEquippedHeadIndexForHero(<localClientNum>,<sessionMode>,<getForLobbyClient>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [OPTIONAL] <getForLobbyClient> If this is set then check for the equipped head on the client in the lobbyQueueIndex position
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the equipped head index
EXAMPLE: helmetIndex = GetEquippedHeadIndexForHero( localClientNum )
void GetEquippedHelmetAccentColorForHero(<localClientNum>,<sessionMode>,<heroIndex>,<helmetIndex>,<colorIndex>,[getForLobbyClient])
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character session mode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
- [MANDATORY] <helmetIndex> The index of the helmet
- [MANDATORY] <colorIndex> The index of the accent color
- [OPTIONAL] [getForLobbyClient] If this is set then we are supposed to retrieve for lobby client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped helmet accents colors of a specific hero
EXAMPLE: colorArray = GetEquippedHelmetAccentColorForHero( localClientNum, 0 )
void GetEquippedHelmetForHero(<localClientNum>,<sessionMode>,<heroIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped helmet model of a specific hero
EXAMPLE: modelName = GetEquippedHelmetForHero( localClientNum, SESSIONMODE_MULTIPLAYER, 0 )
void GetEquippedHelmetIndexForHero(<localClientNum>,<sessionMode>,<heroIndex>,[getForLobbyClient])
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table or in case of lobby client, his queue position
- [OPTIONAL] [getForLobbyClient] If this is set then we are supposed to retrieve for lobby client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the equipped helmet index of a specific hero
EXAMPLE: helmetIndex = GetEquippedHelmetIndexForHero( localClientNum, 0 )
void GetEquippedHeroIndex(<localClientNum>,<sessionMode>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the equipped hero for the client
EXAMPLE: heroIndex = GetEquippedHeroIndex( localClientNum )
void GetEquippedHeroMode(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the mode of the equipped hero for the client
EXAMPLE: heroIndex = GetEquippedHeroMode( localClientNum )
void GetEquippedLoadoutItemForHero(<localClientNum>,<heroIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the hero's ability is equipped, 0 if the weapon is equipped.
EXAMPLE: isAbilityEquipped = GetEquippedLoadoutItemForHero( localClientNum, 0 )
void GetEquippedShowcaseWeaponForHero(<localClientNum>,<sessionMode>,<heroIndex>,[getForLobbyClient])
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <sessionMode> The character's sessionMode
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table or in case of lobby client, his queue position
- [OPTIONAL] [getForLobbyClient] If this is set then we are supposed to retrieve for lobby client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the showcase weapon of a specific hero
EXAMPLE: showcaseWeapon = GetEquippedShowcaseWeaponForHero( localClientNum, 0 )
void <ai_or_player> GetEventPointOfInterest()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the point of interest from the current event.
EXAMPLE: point = self GetEventPointOfInterest()
void <entity> GetEye()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the eye position of the entity.
EXAMPLE: eye_pos = self GetEye()
void <entity> GetEyeApprox()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the eye position of the entity with some added offset.
EXAMPLE: approx_eye_pos = self GetEyeGetEyeApprox()
void GetFirstHeadOfGender(<gender>,[sessionmode])
- [MANDATORY] <gender> "male" or "female"
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the first head of gender ("male" or "female")
EXAMPLE: headIndex = GetFirstHeadOfGender( "male", "mp" )
void GetFirstHeroOfGender(<gender>,[sessionmode])
- [MANDATORY] <gender> "male" or "female"
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the first hero of gender ("male" or "female")
EXAMPLE: characterIndex = GetFirstHeroOfGender( "male", "mp" )
void <entity> GetFirstTouchFraction(<other entity>,<start>,<end>)
- [MANDATORY] <other entity> Entity to check against
- [MANDATORY] <start> Starting point of the trace
- [MANDATORY] <end> Ending point of the trace
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the trace fraction of a capsule trace against the other entity
EXAMPLE: fraction = GetFirstTouchFraction( player, trigger, old_origin, current_origin )
void GetFlowGraphDef(<name>)
- [MANDATORY] <name> The name of the flow graph asset
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: returns a struct representing the flow graph definition asset
EXAMPLE: flowGraphDef = GetFlowGraphDef( "my_flow_graph" )
void GetFogSettings()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the current fog settings as an array.
EXAMPLE: fogsettings = getfogsettings()
void GetFootstepStrings()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns an array containing all the footstep names
EXAMPLE: footstepNameArray = GetFootstepStrings()
void GetFreeActorCount()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get number of free actors.
EXAMPLE: GetFreeActorCount()
void GetFreerunTrackIndex([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the unique id for this mission
EXAMPLE: level.index = GetFreerunTrackIndex( "mp_Freerun_01" )
void <player> GetFriendlyScramblerAmount()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the amount alpha of the friendly scrambler applied
EXAMPLE: alpha = player GetFriendlyScramblerAmount( )
void GetGadgetPower(<localClientNum>,[slot])
- [MANDATORY] <localClientNum> Client number of the player
- [OPTIONAL] [slot] Slot of the gadget. Default is 0.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the current power level of the player gadget
EXAMPLE: power = GetGadgetPower( localClientNum )
void GetGameTypeEnumFromName(<gameTypeName>,<isHardcore>)
- [MANDATORY] <gameTypeName> game type name e.g. "tdm".
- [MANDATORY] <isHardcore> True if the hardcore mode is on
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the enum value corresponding to the current game type from global leaderboard gametype entries.
EXAMPLE: gameTypeEnum = GetGameTypeEnumFromName( "tdm", false )
void GetGametypeSetting(<setting>)
- [MANDATORY] <setting> The setting name as a string.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the value of a gametype setting.
EXAMPLE: GetGametypeSetting( "scoreLimit" )
entity GetGrappleTargetArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the grapple targets
EXAMPLE: enemies = GetGrappleTargetArray()
entity <entity> GetGroundEnt()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the entity beneath the calling entity
EXAMPLE: ground_ent = self GetGroundEnt()
void GetHeadGender(<headIndex>,[sessionmode])
- [MANDATORY] <headIndex> The index of the head
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the given head's gender ("male" or "female")
EXAMPLE: gender = GetHeadGender( headIndex, "mp" )
void GetHealthOverlayTime(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the time the health overlay has been on
EXAMPLE: power = GetHealthOverlayTime( localClientNum )
void GetHeliDamageState()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the damage state of the heli.
EXAMPLE: vehicle GetHeliDamageState( )
void GetHelmetAccentColorCountForHero(<localClientNum>,<heroIndex>,<helmetIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <heroIndex> The index of the hero in the current game-mode's character table
- [MANDATORY] <helmetIndex> The index of the helmet for the specific hero
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the number of accents for the specified helmet model of a specific hero
EXAMPLE: accentColorCount = GetHelmetAccentColorCountForHero( localClientNum, 0, 0 )
void GetHeroBodyModelIndices(<heroIndex>,[sessionmode])
- [MANDATORY] <heroIndex> The index of the hero
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the given hero's body models for the current session mode
EXAMPLE: heroBodyModelNames = GetHeroBodyModels( heroIndex, "mp" )
void GetHeroes([sessionmode])
- [OPTIONAL] [sessionmode] Session Mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns all hero indices for the current session mode (or specified session mode)
EXAMPLE: heroIndices = GetHeroes()
void GetHeroGender(<heroIndex>,[sessionmode])
- [MANDATORY] <heroIndex> The index of the hero
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the given hero's gender ("male" or "female")
EXAMPLE: gender = GetHeroGender( heroIndex, "mp" )
void GetHeroHeadModelIndices()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns all hero indices for the current session mode
EXAMPLE: heroHelmetModelNames = GetHeroHelmetModels( heroIndex, "mp" )
void GetHeroHelmetModelIndices(<heroIndex>,[sessionmode])
- [MANDATORY] <heroIndex> The index of the hero
- [OPTIONAL] [sessionmode] The session mode (cp,mp,zm)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the given hero's helmet models for the current session mode
EXAMPLE: heroHelmetModelNames = GetHeroHelmetModelIndices( heroIndex, "mp" )
void <entity> GetHorizontalOffsetFromScreenCenter(<localClientNum>,<width>)
- [MANDATORY] <localClientNum> Local client to check
- [OPTIONAL] <width> width to check against
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the distance from the screen center to the entity
EXAMPLE: ent GetDistanceFromScreenCenter( localClientNum )
void GetInfluenceAt(<influenceMapIndex>,<origin>)
- [MANDATORY] <influenceMapIndex> Index of the influence map
- [MANDATORY] <origin> The location to check for influence value
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the influence value at the origin position on the influence map, undefined if no value can be found.
EXAMPLE: GetInfluenceAt(influenceMapIndex, origin)
void GetInfluenceFacePos()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the faces pos on the influence map
EXAMPLE: pos = GetInfluenceFacePos( faceIndex )
void GetInfluenceNumFaces()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number faces on the influence
EXAMPLE: numFaces = GetInfluenceNumFaces()
void GetInfluencerPreset(<name>)
- [MANDATORY] <name> valid spawn influencer preset name.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a new influencer of <name> at <origin> and <angles>
EXAMPLE: preset_array = GetInfluencerPreset( name )
void GetInfluencerTimeoutRemaining(<influencer id>)
- [MANDATORY] <influencer id> The influencer id
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the remaining influencer timeout in milliseconds. Returns a negative number if no timeout.
EXAMPLE: GetInfluencerTimeout( influencer_id )
void GetInKillcam(<local_client_num>)
- [MANDATORY] <local_client_num> The local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: returns if the client is in killcam or not.
void <ai> GetInterestPoolAwareness()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current interest pool awareness level regardless of actual awareness level.
EXAMPLE: interestAwareness = self GetInterestPoolAwareness()
void <ai_or_player> GetInterestPoolValue()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the sentient's interest pool value.
EXAMPLE: value = self GetInterestPoolValue()
entity GetItemArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the items in a level.
EXAMPLE: origins = GetItemArray()
void GetItemAttachment(<itemIndex>,<attachmentNum>)
- [MANDATORY] <itemIndex> The item index
- [MANDATORY] <attachmentNum> The attachment number for the index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the attachment for a particular item
EXAMPLE: GetItemAttachment( 10, 1 ); // returns attachment 1 for item 10
void GetItemAttachmentAllocationCost(<itemIndex>,<attachmentNum>)
- [MANDATORY] <itemIndex> The item index
- [MANDATORY] <attachmentNum> The attachment number for the index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the allocation cost of an attachment for a particular item
EXAMPLE: GetItemAttachmentAllocationCost( 10, 1 ); // returns allocation cost of attachment 1 for item 10
void GetItemGroupForWeaponName(<weaponName>)
- [MANDATORY] <weaponName> Name of weapon to get item group
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the ref for a specific weapon name
EXAMPLE: ref = GetItemGroupForWeapon( weapon )
void GetItemGroupFromItemIndex(<itemIndex>)
- [MANDATORY] <itemIndex> Item index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the ref for a specified item index
EXAMPLE: ref = GetItemGroupFromItemIndex( itemIndex )
entity GetKillCamEntity(<local_client_num>)
- [MANDATORY] <local_client_num> The local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: returns the killcamentity.
void GetKnownLength(<playbackId>)
- [MANDATORY] <playbackId> The sound id
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the known length of the sound
EXAMPLE: length = GetKnownLength( level.mySnd )
void <player> GetLastOutWaterTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the last time the player was not completely submerged
EXAMPLE: time = player GetLastOutWaterTime()
void <light> GetLightColor()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current color of the light, as an RGB vector.
EXAMPLE: color = self GetLightColor()
void <light> GetLightExponent()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current exponent of the light.
EXAMPLE: exponent = self GetLightExponent()
void <light> GetLightFovOuter()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current outer fov of a spot light.
EXAMPLE: fov = self GetLightFovOuter()
void <light> GetLightIntensity()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current intensity of the light.
EXAMPLE: intensity = self GetLightIntensity()
void <light> GetLightRadius()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current radius of the light.
EXAMPLE: radius = self GetLightRadius()
entity <entity> GetLinkedEnt()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the entity that the calling entity is linked to
EXAMPLE: linked_ent = self GetLinkedEnt()
void <player> GetLoadoutAllocation(<custom Class>)
- [MANDATORY] <custom Class> Class Num
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get how many allocation points are spent in the custom class
EXAMPLE: allocationSpent = self GetLoadoutAllocation( 0 )
void <player> GetLoadoutGunSmithVariantIndex(<custom Class>,<getSecondary>)
- [MANDATORY] <custom Class> Class Num
- [OPTIONAL] <getSecondary> defaults to false, if set will get you the variant index of the secondary
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the GunSmith Variant index of the primary weapon, pass 1 as an option to get the secondary
EXAMPLE: gunSmithPrimaryIndex = self GetLoadoutGunSmithVariantIndex( 0, 0 )
void <player> GetLoadoutItem(<custom Class>,<loadoutSlot>)
- [MANDATORY] <custom Class> Class Num
- [MANDATORY] <loadoutSlot> Loadout Slot
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the index of the item in the custom class
EXAMPLE: primary = self GetLoadoutItem( 0, primary )
void <player> GetLoadoutItemRef(<custom Class>,<loadoutSlot>)
- [MANDATORY] <custom Class> Class Num
- [MANDATORY] <loadoutSlot> Loadout Slot
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the reference of the item in the custom class
EXAMPLE: primary = self GetLoadoutItemRef( 0, primary )
void <player> GetLoadoutPerks(<custom Class>)
- [MANDATORY] <custom Class> Class Num
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the list of specialties in the custom class
EXAMPLE: primary = self GetLoadoutPerks( 0 )
void <player> GetLoadoutWeapon(<custom Class>,<loadoutSlot>)
- [MANDATORY] <custom Class> Class Num
- [MANDATORY] <loadoutSlot> Loadout Slot (primary or secondary)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the full weapon name (including attachments) of the item in the custom class
EXAMPLE: primary = self GetLoadoutWeapon( 0, primary )
void GetLobbyClientCount()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of connected or connecting clients
EXAMPLE: clientCount = GetClientCount()
void GetLocalClientAngles(<client>)
- [MANDATORY] <client> the client to get angles for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the local client angles
EXAMPLE: client_angles = GetLocalClientAngles()
void <vehicle> GetLocalClientDriver()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the local client index of the driver of the vehicle if the driver is a local client or undefined.
EXAMPLE: driver = self GetLocalClientDriver( )
void GetLocalClientEyePos(<client>)
- [MANDATORY] <client> the client to get eye pos for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the local client eye pos
EXAMPLE: eye_pos = GetLocalClientEyePos( 0 )
void GetLocalClientFOV(<client>)
- [MANDATORY] <client> the client index to get fov for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the local client field of view in degrees
EXAMPLE: client_fov = GetLocalClientFOV()
void <player> GetLocalClientNumber()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the local client number.
EXAMPLE: clientNum = self GetLocalClientNumber()
void GetLocalClientPos(<client>)
- [MANDATORY] <client> the client to get position
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns pos of localclient
EXAMPLE: origin = GetLocalClientPos( 0 )
void <vehicle> GetLocalGunnerAngles(<gunnerIndex>)
- [MANDATORY] <gunnerIndex> The index of the gunner seat
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the angles of the specified gunner, local to the vehicle itself.
EXAMPLE: localAngles = self GetLocalGunnerAngles( 0 )
entity GetLocalPlayer(<local client num>)
- [MANDATORY] <local client num> local client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the local player predicted centity.
EXAMPLE: GetLocalPlayer( 0 )
entity GetLocalPlayers()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get an array of all the local players
EXAMPLE: players = GetLocalPlayers()
void GetLocalPlayerTeam(<localClientNum>)
- [MANDATORY] <localClientNum> Number of the local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the team of the local player
EXAMPLE: team = GetLocalPlayerTeam( 0 )
void GetMapAtIndex(<index>,<dlcindex>,<sessionmodeabbrev>)
- [MANDATORY] <index> the index of the map you're looking for.
- [OPTIONAL] <dlcindex> dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] <sessionmodeabbrev> cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Get the name of the map at the given index in a mode's maptable. Returns undefined if the given index doesn't index the given maptable
EXAMPLE: GetMapAtIndex( "cp_mi_sing_blackstation" )
void GetMapFields(<currentmap>,<dlcindex>,<sessionmodeabbrev>)
- [OPTIONAL] <currentmap> the name of the current map. If ommitted, use Dvar sv_mapname
- [OPTIONAL] <dlcindex> dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] <sessionmodeabbrev> cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Get the outro movie of the current map in the maptable. Returns undefined if currentmap wasn't found
EXAMPLE: fields = GetMapFields( GetNextMap("cp_mi_sing_blackstation") )
void GetMapIntroMovie([currentmap],[dlcindex],[sessionmodeabbrev])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
- [OPTIONAL] [dlcindex] dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] [sessionmodeabbrev] cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the intro movie of the current map in the maptable. Returns undefined if currentmap wasn't found
EXAMPLE: world.nextIntroMovie = GetMapIntroMovie( GetNextMap("cp_mi_sing_blackstation") )
void GetMapOrder([currentmap],[dlcindex],[sessionmodeabbrev])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
- [OPTIONAL] [dlcindex] dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] [sessionmodeabbrev] cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the index of the current map in the maptable. Returns -1 if currentmap wasn't found
EXAMPLE: if( GetMapOrder( "cp_mi_sing_blackstation" ) > GetMapOrder( world.highestMapCompletion ) { world.highestMapCompletion = "cp_mi_sing_blackstation"; }
void GetMapOutroMovie([currentmap],[dlcindex],[sessionmodeabbrev])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
- [OPTIONAL] [dlcindex] dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] [sessionmodeabbrev] cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the outro movie of the current map in the maptable. Returns undefined if currentmap wasn't found
EXAMPLE: world.nextOutroMovie = GetMapIntroMovie( GetNextMap("cp_mi_sing_blackstation") )
void GetMaxLocalClients()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the max number of local clients
EXAMPLE: max_clients = GetMaxLocalClients()
void <vehicle> GetMaxReverseSpeed()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get maximum reverse speed of a vehicle.
EXAMPLE: speed = vehicle GetMaxReverseSpeed()
void <entity> GetMaxs()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get maximum bounds of the entity
EXAMPLE: maxs = wallModel GetMaxs()
void GetMaxVehicles()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return the maximum number of vehicles that can be instantiated simultaneously. This is platform-specific.
EXAMPLE: vehicleSlotsFree = GetMaxVehicles() - level.vehicles_list.size
void <entity> GetMeleeChainCount()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the number of melee kills achieved by the player within their current streak.
EXAMPLE: entity GetMeleeChainCount( )
void getmicrosecondsraw()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets raw system microseconds; used for profiling, only gives lower 32 bits as script doesn't support uint64_t properly right now
EXAMPLE: start_time = GetMicrosecondsRaw()
void GetMigrationStatus()
CATEGORY:
CLIENT/SERVER: Client
void GetMillisecondsRaw()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets raw system milliseconds; use for profiling long routines as it is only an integer
EXAMPLE: start_time = GetMillisecondsRaw()
void <entity> GetMins()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get minimum bounds of the entity
EXAMPLE: mins = wallModel GetMins()
entity <missile> GetMissileOwner()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the entity that owns this missile
EXAMPLE: javelinOwner = GetMissileOwner( thisMissile )
void GetMissionName([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the name of the mission this map is part of
EXAMPLE: level.mission = GetMissionName( "cp_mi_cairo_ramses2" )
void GetMissionUniqueID([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the unique id for this mission
EXAMPLE: level.unique_id = GetMissionUniqueID( "cp_mi_cairo_ramses2" )
void GetMissionVersion([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the unique id for this mission
EXAMPLE: level.unique_id = GetMissionVersion( "cp_mi_cairo_ramses2" )
void GetMoveDelta(<animation name>,[start time],[end time],[entity])
- [MANDATORY] <animation name> Name of the animation
- [OPTIONAL] [start time] Normalized start time of the animation
- [OPTIONAL] [end time] Normalized end time of the animation
- [OPTIONAL] [entity] The entity should be passed if the animation name is a string to look up the animation from the entity's anim tree
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the move delta for the animation
EXAMPLE: localDeltaVector = GetMoveDelta( animation, 0, 1, entity )
void <entity> GetMovementType()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the movement type for the entity
EXAMPLE: movement_type = self GetMovementType()
entity <player> GetMoverEnt()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the moving entity the player is sitting on .
EXAMPLE: if(player GetMoverEnt())
void <entity> GetMoveSpeedScale()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the speed scale multiplier for the entity
EXAMPLE: speed_modifier = self GetMoveSpeedScale()
void GetNavMeshFaceNormal(<position>,<searchRadius>)
- [MANDATORY] <position> Position to start the search around.
- [MANDATORY] <searchRadius> Radius to search within.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the face normal vector of the closest navmesh point to the passed in position, within the search radius.
EXAMPLE: navmeshNormal = GetNavMeshFaceNormal( (10,20,30), 25 )
void GetNavMeshTriggersForPoint(<pos>)
- [MANDATORY] <pos> The test position.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a list of the names of navmesh triggers that a given point resides in
EXAMPLE: targetNames = GetNavMeshTriggersForPoint( pos )
pathnode GetNearestNode(<origin>)
- [MANDATORY] <origin> location to search for the nearest node
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the node nearest to this origin or undefined if no close node exists.
EXAMPLE: node = GetNearestNode( guy.origin )
void GetNearestPathPoint(<origin>,<radius>)
- [MANDATORY] <origin> The point from which to search from
- [MANDATORY] <radius> The maximum radius in which to search
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the nearest point on the navmesh for the given origin and radius or undefined if no point can be found.
void GetNextMap([currentmap],[dlcindex],[sessionmodeabbrev])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
- [OPTIONAL] [dlcindex] dlc1..N if DLC. If ommitted, use "base".
- [OPTIONAL] [sessionmodeabbrev] cp,mp,zm. If ommitted, use current game mode abbreviation
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the name of the next map in the maptable. Returns "" if this is the last map, undefined if currentmap wasn't found
EXAMPLE: GetNextMap( "cp_mi_sing_blackstation" )
pathnode GetNextTraversalNodeOnPath(<start>)
- [MANDATORY] <start> the index for the starting node
CATEGORY:
CLIENT/SERVER: Server
EXAMPLE: GetNextTraversalNodeOnPath(1)
pathnode GetNode(<name>,<key>)
- [MANDATORY] <name> name to search for
- [MANDATORY] <key> key that name goes with
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets a node with the given name, key pair
EXAMPLE: node = GetNode( self.target, "targetname" )
pathnode GetNodeArray(<name>,<key>)
- [MANDATORY] <name> name to search for
- [MANDATORY] <key> key that name goes with
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of nodes that have the given name, key pair
EXAMPLE: node = GetNodeArray( self.target, "targetname" )
pathnode GetNodeArraySorted(<name>,<key>,<pos>,<r>)
- [MANDATORY] <name> name to search for
- [MANDATORY] <key> key that name goes with
- [MANDATORY] <pos> search origin
- [MANDATORY] <r> the radius to sort in
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of nodes that have the given name, key pair, within given radius, sorts them
EXAMPLE: nodes = GetNodeArraySorted(self.target, "targetname", self.origin, 256 )
void GetNodeEdge(<node>)
- [MANDATORY] <node> node volume
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of points which corresponds to the node volume's traversal edge. The traversal edge is represented as a piecewise linear function.
EXAMPLE: points = GetNodeEdge( myNode )
void GetNodeIndexOnPath(<node>)
- [MANDATORY] <node> The node to get the other node for
CATEGORY:
CLIENT/SERVER: Server
EXAMPLE: GetNodeIndexOnPath(node)
entity GetNodeOwner(<node>)
- [MANDATORY] <node> which node to get the owner of.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the owner of the node.
EXAMPLE: node_owner = GetNodeOwner( node ) )
void GetNodeRegion(<node1>)
- [MANDATORY] <node1> pathnode to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the region of the give node, if there is one. Returns undefined otherwise.
EXAMPLE: if ( GetNodeRegion( myNode ) )
void GetNodesInRadius(<origin>,<max radius>,<min radius>,[max height],[node type],[max nodes],[region index])
- [MANDATORY] <origin> location to search for nodes at
- [MANDATORY] <max radius> maximum distance of nodes to return
- [MANDATORY] <min radius> maximum distance of nodes to return
- [OPTIONAL] [max height] maximum height difference to origin. Defaults to 512
- [OPTIONAL] [node type] node type to search for, if not specified, returns all node types. 'Cover' will return all cover nodes
- [OPTIONAL] [max nodes] the maximum number of nodes to return up to 256
- [OPTIONAL] [region index] the region index the nodes should belong to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets all of the nodes (max of 256) within a cylinder, in unsorted order
EXAMPLE: nodes = GetNodesInRadius( guy.origin, 512, 0, 128, "Path" )
void GetNodesInRadiusSorted(<origin>,<max radius>,<min radius>,[max height],[node type],[max nodes])
- [MANDATORY] <origin> location to search for nodes at
- [MANDATORY] <max radius> maximum distance of nodes to return
- [MANDATORY] <min radius> maximum distance of nodes to return
- [OPTIONAL] [max height] maximum height difference to origin. Defaults to 512
- [OPTIONAL] [node type] node type to search for, if not specified, returns all node types. 'Cover' will return all cover nodes
- [OPTIONAL] [max nodes] the maximum number of nodes to return up to 256
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets all of the nodes (max of 256) within a cylinder, sorted by closest to <origin>
EXAMPLE: nodes = GetNodesInRadiusSorted( guy.origin, 512, 0, 128, "Path" )
entity GetNonPredictedLocalPlayer(<local client num>)
- [MANDATORY] <local client num> local client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the local player non predicted centity.
EXAMPLE: GetNonPredictedLocalPlayer( 0 )
void <entity> GetNormalHealth()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get health in a normalized range of 0 to 1
EXAMPLE: normal_health = self GetNormalHealth()
void GetNorthYaw()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get North Yaw
EXAMPLE: northvector = (cos(getnorthyaw()), sin(getnorthyaw()), 0)
void GetNotetracksInDelta(<animation>,<time>,[time_delta])
- [MANDATORY] <animation> the animation for which notetrack information is needed
- [MANDATORY] <time> The time in the animation around which notetrack information is needed in the range 0-1
- [OPTIONAL] [time_delta] The amount of time around the time provided to check for notetracks in seconds defaults to 0.15
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get a list of notetracks and times within a specific time delta of a specific time in an animation
EXAMPLE: notetrackArray = GetNotetracksInDelta( anim, 0.4 )
void GetNotetrackTimes(<animation>,<note track>)
- [MANDATORY] <animation> an animation
- [MANDATORY] <note track> a constant string with the name of the note track
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of the times during an animation that the given notetrack occurs. The times returned are fractional (0 to 1).
EXAMPLE: exitAlignTimes = GetNotetrackTimes( exitAnim, "exit_align" )
void GetNumberOfCollectiblesForLevel()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of collectibles for the given level
EXAMPLE: collectibleCount = GetNumberOfCollectiblesForLevel( GetRootMapName() )
void <player> GetNumChallengesComplete(<mission_name>)
- [MANDATORY] <mission_name> (string) The name of the mission to check completed challenges in
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of challenges completed in a given mission
EXAMPLE: is_default = self GetNumChallengesComplete( "angola" )
void GetNumConnectedPlayers(<include bots>)
- [OPTIONAL] <include bots> The optional check to include test clients (bots). (bool)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of players that are connected to our game. Ignores bots by default.
EXAMPLE: num_players_and_bots = GetNumConnectedPlayers( true )
void GetNumExpectedPlayers()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of players that we're expecting to join our game.
EXAMPLE: num_players = GetNumExpectedPlayers()
void GetNumFreeEntities(<local client number>)
- [MANDATORY] <local client number> Which local client to spawn the entity for.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the number of free fake entities
EXAMPLE: numfree = GetNumFreeEntities( localClientNum )
void GetNumParts(<model>)
- [MANDATORY] <model> The model to get parts for
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return number of bones in the model
EXAMPLE: numParts = GetNumParts( model )
void <entity> GetNumZBarrierPieces()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns number of pieces in specified zbarrier ent.
EXAMPLE: numPieces = ent GetNumZBarrierPieces())
void <entity> GetOrigin()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the origin of the entity
EXAMPLE: origin = self GetOrigin()
pathnode GetOtherNodeInNegotiationPair(<node>)
- [MANDATORY] <node> The node to get the other node for
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the other node of the passed in negotiation node. Returns the begin node if end is passed and vice versa.
EXAMPLE: end_node = GetOtherNodeInNegotiationPair( begin_node )
entity <entity> GetOwner(<localClientNum>)
- [MANDATORY] <localClientNum> Local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get an entity's owner
EXAMPLE: ent GetOwner( localClientNum )
entity <entity> GetParentEntity()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the parent entity. Requires client-side linking to be set up on the entity.
EXAMPLE: parent = self GetParentEntity( )
void GetPartName(<model>,<index>)
- [MANDATORY] <model> The model to get parts for
- [MANDATORY] <index> The bone index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the bone name for the model and index
EXAMPLE: boneName = GetPartName( model, 1 )
void <entity> GetPathfindingRadius()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the radius used for pathfinding operations.
EXAMPLE: radius = ent GetPathfindingRadius()
void <entity> GetPathMetric(<origin>)
- [MANDATORY] <origin> the goal for the path
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get path metric for the path from the ai to origin
EXAMPLE: path_metric = level.ai_for_pathing GetPathMetric( dropPos )
void GetPlaybackTime(<playbackId>)
- [MANDATORY] <playbackId> The sound id
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the playback time for the sound given by playbackId
EXAMPLE: time = GetPlaybackTime( level.mySnd )
entity GetPlayerCorpse()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the most recent corpse fort he player
EXAMPLE: cybercom_type = player GetPlayerCorpse()
void <player> GetPlayerGibDef()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns string of gibdef for current player
void <player> GetPlayerGravity()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the gravity or gravity override value for the player.
EXAMPLE: player GetPlayerGravity()
void <entity> GetPlayerLastOutWaterTime()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the last time the player was not underwater
EXAMPLE: waterTime = player GetPlayerLastOutWaterTime()
void <player> GetPlayerName()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the character index
EXAMPLE: player_name = self GetPlayerName()
entity GetPlayers([team])
- [OPTIONAL] [team] - if specifed, returns lists of players on different teams, in team based game modes. Valid values "allies", "axis", "neutral" & "all"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the currently connected players. Used internally to the script call get_players().
EXAMPLE: players = GetPlayers()
void <player> GetPlayerSelectedGestureName(<gestureType>)
- [MANDATORY] <gestureType> The type of gesture to get
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the equipped gesture animation name
EXAMPLE: gesture = player GetPlayerSelectedGestureName( 0 )
void <player> GetPlayerSelectedTauntName(<tauntType>)
- [MANDATORY] <tauntType> The type of taunt to get
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the equipped taunt animation name
EXAMPLE: taunt = player GetPlayerSelectedTauntName( 0 )
void GetPlayerSpawnId(<player>)
- [MANDATORY] <player> The player that we are spawning in
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the current spawn id for the player (used for debugging purposes only)
EXAMPLE: spawnId = GetPlayerSpawnId( player )
void <player> GetPlayerSpeed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the speed value for the player.
EXAMPLE: player GetPlayerSpeed()
entity GetPlayerVehicle(<player>)
- [MANDATORY] <player> The player to check vehicle for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns undefined if the player is not in a vehicle
EXAMPLE: vehicle = GetPlayerVehicle( self )
void <entity> GetPointInBounds(<ratio_ForwardBack>,<ratio_LeftRight>,<ratio_UpDown>)
- [MANDATORY] <ratio_ForwardBack> 1.0 is full forward, -1.0 is full backwards.
- [MANDATORY] <ratio_LeftRight> 1.0 is full left, -1.0 is full right.
- [MANDATORY] <ratio_UpDown> 1.0 is full up, -1.0 is full down.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns a point within an entity's bounds.
EXAMPLE: targetForwardPnt = helo GetPointInBounds( 1.0, 0.0, 0.0 )
void <entity> GetPrimaryDeltaAnim()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the primary delta anim playing on this entity, or the name of the animation if the entity is in an animscripted state.
EXAMPLE: anim = self GetPrimaryDeltaAnim()
void GetRandomCompatibleAttachmentsForWeapon(<weapon>,<num desired attachments>)
- [MANDATORY] <weapon> The weapon name.
- [OPTIONAL] <num desired attachments> Max number of compatible attachments desired. If the number is more than available attachments for the weapon, it will just not return that many.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of compatible attachments. If num desired attachments are specified then that many attachments will be returned if possible
EXAMPLE: GetRandomCompatibleAttachmentsForWeapon( weaponObject, 4 )
void <flying_ai> GetRandomPointOnNavVolume()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get a random point on nav volume. Returns the position if found one, or undefined if not found.
EXAMPLE: random = self GetRandomPointOnNavVolume()
void GetRealTime()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the real system time in milliseconds
EXAMPLE: time = GetRealTime()
void GetRefFromItemIndex(<itemIndex>)
- [MANDATORY] <itemIndex> Item index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the ref for a specified item index
EXAMPLE: ref = GetRefFromItemIndex( itemIndex )
void GetReflectionLocs()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets array of the locations of all of the reflection_probes in the level
EXAMPLE: reflection_locs = GetReflectionLocs()
void GetReflectionOrigin()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Given a position, returns the position of the reflection probe in use there
EXAMPLE: probe_pos = GetReflectionOrigin( camera_pos )
void GetRetrievableWeapons()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of weapons that need watchers so they can be retrieved by the player.
EXAMPLE: retrievableWeapons = GetRetrievableWeapons()
void GetRevealPulseMaxRadius(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the max radius for the reveal vision pulse
EXAMPLE: power = GetRevealPulseMaxRadius( localClientNum )
void GetRevealPulseOrigin(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the pulse origin for the local client reveal pulse
EXAMPLE: power = GetRevealPulseOrigin( localClientNum )
void GetRevealPulseRadius(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the radius for the local client reveal pulse
EXAMPLE: power = GetRevealPulseRadius( localClientNum )
void GetRootMapName([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the root map of a mission
EXAMPLE: level.rootMap = GetRootMapName( "cp_mi_cairo_ramses2" )
void GetRope(<targetname>)
- [MANDATORY] <targetname> The targetname of the rope you interested in
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the rope index based on targetname. Use it for ropes setuped in radiant. Returns -1, if not found.
EXAMPLE: GetRope( "testrope" )
void GetRoundsPlayed(<value>)
- [MANDATORY] <value> The number of rounds played
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get rounds played in match state
EXAMPLE: GetRoundsPlayed( game["roundsplayed"] )
void GetScriptBundle()
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the script bundle struct.
EXAMPLE: settings = GetScriptBundle( "doorsettings" )
void GetScriptBundleList()
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the script bundle list array.
EXAMPLE: settings = GetScriptBundleList( "doorsettings" )
void GetScriptBundleNames()
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns all the names of the script bundles of the specified type in an array.
EXAMPLE: settings = GetScriptBundleNames( "scene" )
void GetScriptBundles()
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns a list of script bundles based on the type.
EXAMPLE: settings = GetScriptBundles( "scenes" )
entity GetScriptMoverArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the script_origins in a level.
EXAMPLE: origins = GetScriptMoverArray()
void GetServerHighestClientFieldVersion()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the server's highest clientfield version.
EXAMPLE: if ( my_version < GetServerHighestClientFieldVersion() )
void <entity> GetShootAtPos([attacker])
- [OPTIONAL] [attacker] The entity that will be shooting
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the position an attacker would shoot at to hit this entity.For AI or player this is the eye position.For other entities it's the tag_eye if there is one else the center of the entity bounding box.
EXAMPLE: targetPos = self.enemy GetShootAtPos(self)
void GetShoutcasterSetting(<setting>)
- [MANDATORY] <setting> The setting name as a string.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the value of a shoutcaster setting.
EXAMPLE: GetGametypeSetting( "who is going to win" )
void GetSkiptoName(<index>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the skip to name with the given index
void GetSkipTos()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get all skip tos for the level
EXAMPLE: skiptos = GetSkipTos()
void GetSnapshotIndexArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of the indices of current snapshots for all connected clients.
EXAMPLE: snapindices = GetSnapshotIndexArray( )
void GetSoundFromSurfaceTable(<surfacefxtable>,<surface type>)
- [MANDATORY] <surfacefxtable> Surface fx table.
- [MANDATORY] <surface type> Surface type
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the fx for a given surface type from the surfacefxtable.
EXAMPLE: fx = GetSoundFromSurfaceTable( fx_surface_table, surface_type )
void GetSpawnerArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the spawners in a level.
EXAMPLE: spawners = GetSpawnerArray()
entity GetSpawnerTeamArray(<team>,[team])
- [MANDATORY] <team> a team name, either 'axis', 'allies', or 'neutral'
- [OPTIONAL] [team] any number of additional team names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the spawners in a level
EXAMPLE: enemies = GetSpawnerTeamArray( "axis", "neutral" )
void GetSpawnStructForCharacter(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the targetname of the script_struct to use for the character pose in the frontend
EXAMPLE: frontendVignetteAnim = GetSpawnStructForCharacter( characterIndex, "mp" )
void <player> GetSpecialistIndex()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the specialist index for the player
EXAMPLE: specialistIndex = player GetSpecialistIndex()
void <player> GetStance()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the stance of the player. It only works for the player.
EXAMPLE: stance = player GetStance()
void GetStartAngles(<origin>,<angle>,<animation>,[animation time])
- [MANDATORY] <origin> The current origin of the animation in world coordinates
- [MANDATORY] <angle> The current angle set of the animation in world coordinates
- [MANDATORY] <animation> The currently running animation
- [OPTIONAL] [animation time] The animation time in 0-1 range
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the starting angles for an animation, in world coordinates, given its current position, and angles
EXAMPLE: org1 = GetStartAngles( climborg, climbang, buddyanim1, [0.5] )
void GetStartOrigin(<origin>,<angle>,<animation>,[animation time])
- [MANDATORY] <origin> The current origin of the animation in world coordinates
- [MANDATORY] <angle> The current angle set of the animation in world coordinates
- [MANDATORY] <animation> The currently running animation
- [OPTIONAL] [animation time] The starting animation time in 0-1 range
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the starting origin for an animation, in world coordinates, given its current position, and angles
EXAMPLE: org1 = GetStartOrigin( climborg, climbang, buddyanim1, [0.5] )
void GetStartTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the start time for the current round.
EXAMPLE: GetStartTime()
void <entity> GetStowedWeapon()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the stowed weapon for the player
EXAMPLE: stowed = self GetStowedWeapon()
void GetStreamerRequestProgress(<slot>)
- [MANDATORY] <slot> Request slot
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the progress (between 0-100) of the streamer request slot
EXAMPLE: getStreamerRequestProgress(0)
void GetStreamingProgress()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets a progress value between 0 (no progress) and 1 (complete) for all the models and meshes that the script is currently forcing
EXAMPLE: progress = GetStreamingProgress()
void <entity> GetTagAngles()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the angles of the tag
EXAMPLE: angles = self GetTagAngles( "tag" )
void <entity> GetTagOrigin()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the origin of the tag
EXAMPLE: origin = self GetTagOrigin( "tag" )
entity <turret_or_vehicle> GetTargetEntity([gunnerIndex])
- [OPTIONAL] [gunnerIndex] the gunner index if called on a vehicle
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the target entity of this turret or vehicle weapon
EXAMPLE: target = roof_turret GetTargetEntity( ); target = tank GetTargetEntity( )
void GetTargetLockEntity(<localclientnum>)
- [MANDATORY] <localclientnum> localclientnum
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get locked target
EXAMPLE: target = self GetTargetLockEntity(<localclientnum>)
void GetTargetLockEntityArray()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get locked target
EXAMPLE: target = self GetTargetLockEntityArray(<localclientnum>)
void <turret_or_vehicle> GetTargetOrigin([gunnerIndex])
- [OPTIONAL] [gunnerIndex] the gunner index if called on a vehicle (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the target origin of this turret or vehicle weapon
EXAMPLE: origin = roof_turret GetTargetOrigin( ); origin = tank GetTargetOrigin( )
void <entity> GetTeam()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return true if the team of an entity if it can be found, undefined otherwise.
EXAMPLE: orig_team = self GetTeam()
void GetTeamPlayersAlive(<team>)
- [MANDATORY] <team> A string value, either 'axis' or 'allies' or 'team3'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of players still alive on a given team
void GetTeamSatellite(<team>)
- [MANDATORY] <team> The name of a team. Must be either Must be 'axis', 'allies', 'team3' or 'none'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets whether a team has Satellite or not
EXAMPLE: GetTeamSatellite( "allies" )
void GetTeamScore(<team>)
- [MANDATORY] <team> The name of a team. Must be either 'axis' or 'allies' or 'team3'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get a team's score
EXAMPLE: if ( GetTeamScore( "allies" ) > getTeamScore("axis") ) ...
void GetTeamSpyplane(<team>)
- [MANDATORY] <team> The name of a team. Must be either Must be 'axis', 'allies', 'team3' or 'none'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets whether a team has Spyplane or not
EXAMPLE: GetTeamSpyplane( "allies" )
void GetTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the level time in Milliseconds from the start of the level.
EXAMPLE: nextNodeTime = GetTime() + 500
void GetTopPlayersBodyModel(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped body model of the top player in the game by index
EXAMPLE: modelName = GetTopPlayersBodyModel( localClientNum, 2 )
void GetTopPlayersBodyRenderOptions(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the render options for the body for the top player in the game by index
EXAMPLE: renderOptions = GetTopPlayersBodyRenderOptions( localClientNum, 2 )
void GetTopPlayersGesture(<localClientNum>,<topPlayerIndex>,<CharacterGestureTypes>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
- [MANDATORY] <CharacterGestureTypes> The CharacterGestureTypes enum value of the gesture to use
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the selected gesture of type CharacterGestureTypes for the given player
EXAMPLE: gesture_anim = GetTopPlayersGesture( localClientNum, 2, 2 ); // GESTURE_TYPE_BOAST = 2
void GetTopPlayersHelmetModel(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped helmet model of the top player in the game by index
EXAMPLE: modelName = GetTopPlayersHelmetModel( localClientNum, 2 )
void GetTopPlayersHelmetRenderOptions(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the render options for the body for the top player in the game by index
EXAMPLE: renderOptions = GetTopPlayersHelmetRenderOptions( localClientNum, 2 )
void GetTopPlayersIndex(<localClientNum>)
- [MANDATORY] <localClientNum> Local client
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the client array or undefined if the client player is not a top scorer
EXAMPLE: topPlayerIndex = self GetTopPlayersIndex( localClientNum )
void GetTopPlayersTaunt(<localClientNum>,<topPlayerIndex>,<CharacterGestureTypes>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
- [MANDATORY] <CharacterGestureTypes> The CharacterTauntTypes enum value of the taunt to use
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the selected taunt of type CharacterTauntTypes for the given player
EXAMPLE: taunt_anim = GetTopPlayersTaunt( localClientNum, 2, 0 ); // TAUNT_TYPE_FIRST_PLACE = 0
void GetTopPlayersTeam(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the team of the player top player in the game by index
EXAMPLE: team = GetTopPlayersTeam( localClientNum, 2 )
void GetTopPlayersWeaponInfo(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the equipped weapon of the top player in the game
EXAMPLE: weapon = GetTopPlayersWeaponInfo( localClientNum, 2 )
void GetTopPlayersWeaponModel(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the name of the equipped weapon model of the top player in the game by index
EXAMPLE: modelName = GetTopPlayersWeaponModel( localClientNum, 2 )
void GetTopPlayersWeaponRenderOptions(<localClientNum>,<topPlayerIndex>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
- [MANDATORY] <topPlayerIndex> The index of the top player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the render options for the weapon for the top player in the game by index
EXAMPLE: renderOptions = GetTopPlayersWeaponRenderOptions( localClientNum, 2 )
void GetTopScorerCount(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum of the player in question
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the number of clients in the top scorers array
EXAMPLE: numClients = GetTopScorerCount( localClientNum )
void GetTotalAmmo(<localClientNum>,<weaponName>)
- [MANDATORY] <localClientNum> Client number of the player
- [MANDATORY] <weaponName> Name of the desired weapon to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the total amount of ammo the client has for the currently equipped weapon
EXAMPLE: ammoCount = GetTotalAmmo( localClientNum, "ak47_mp" )
void GetTotalServerPauseTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the total time the server has been paused since the map started.
EXAMPLE: val = GetTotalServerPauseTime()
void gettotalunlockedweaponattachments(<weapon>)
- [MANDATORY] <weapon> weapon
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get total number of attachments that are unlocked for the weapon specified
EXAMPLE: player GetTotalUnlockedWeaponAttachements( weapon )
entity GetTouchingVolume(<origin>,<mins>,<maxs>)
- [MANDATORY] <origin> Position of bounding box
- [MANDATORY] <mins> The minimum extents of the bounding box
- [MANDATORY] <maxs> The maximum extents of the bounding box
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the entities that are inside the bounds given
EXAMPLE: entities = GetTouchingVolume( self.origin, mins, maxs )
void <trigger> GetTriggerAccumulate()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the accumulate value from the trigger
EXAMPLE: self GetTriggerAccumulate()
void <turret> GetTurretArcLimits()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return turret info for arc mins and maxs
EXAMPLE: limits turret GetTurretArcLimits()
void <turret> GetTurretOwner()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the "owner" of this turret
EXAMPLE: turret_user = roof_turret GetTurretOwner()
void <turret> GetTurretTarget()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the current target of this turret
EXAMPLE: target = roof_turret GetTurretTarget()
void <entity> GetUpgradedPieceNumLives(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of lives, or pull reps it should take a zombie to dislodge this piece, if it's upgraded.
EXAMPLE: piece.numLives = ent GetUpgradedPieceNumLives(1)
void GetUTC()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the UTC time.
EXAMPLE: val = GetUTC()
void <pathnode> GetValidCoverPeekOuts()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of directions an AI can peek out from a cover node. Possible values are 'over', 'left', and 'right'.
EXAMPLE: GetValidCoverPeekOuts( node )
void GetVehicleArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the vehicles in a level
EXAMPLE: enemies = GetVehicleArray( "drones", "targetname" )
void GetVehicleSpawnerArray([name],[key])
- [OPTIONAL] [name] Name to search for.
- [OPTIONAL] [key] The key to search for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the vehicle spawners in a level
EXAMPLE: enemies = GetVehicleSpawnerArray( "bob", "targetname" )
void GetVehicleSpawnerTeamArray(<team>,[team])
- [MANDATORY] <team> a team name, either 'axis', 'allies', or 'neutral'
- [OPTIONAL] [team] any number of teams names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the vehicle spawners in a level with the specified team
EXAMPLE: enemies = GetVehicleSpawnerTeamArray( "axis", "neutral" )
void GetVehicleTeamArray([team])
- [OPTIONAL] [team] any number of teams names may be added, either 'axis', 'allies', or 'neutral'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the vehicles in a level that are not sentients
EXAMPLE: enemies = GetVehicleTeamArray( "axis", "neutral" )
void GetVehicleTriggerFlags()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the spawn flags that will allow vehicles to activate triggers
EXAMPLE: spawn("trigger_radius", (0,0,0), GetVehicleTriggerFlags())
void <entity> GetVelocity(<entity>)
- [MANDATORY] <entity> An entity.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the entity's velocity.
EXAMPLE: vel = thing GetVelocity()
void GetVisibleNode(<start>,<end>,[ignore entity])
- [MANDATORY] <start> starting origin of the path
- [MANDATORY] <end> ending origin of the path
- [OPTIONAL] [ignore entity] An entity to ignore during pathnode trace checks
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the farthest visible node on the path from <start> to <end> or undefined if no path exists.
EXAMPLE: node = GetVisibleNode( guy.origin, enemy.origin, guy )
pathnode GetVisibleNodes(<node>)
- [MANDATORY] <node> pathnode to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of nodes visible to this node
EXAMPLE: nodes = GetVisibleNodes( cover.node )
void GetVisionPulseMaxRadius(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the max radius for the localClients vision pulse
EXAMPLE: power = GetVisionPulseMaxRadius( localClientNum )
void GetVisionPulseRadius(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the current radius for the localClients vision pulse
EXAMPLE: power = GetVisionPulseRadius( localClientNum )
void getvrcamangles()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the VR camera angles of the player
void GetVRCamAnglesByLocalClientNum(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the camera angles of the local client given
EXAMPLE: cam_angles = GetVRCamAnglesByLocalClientNum( 0 )
void getvrcampos()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the VR camera position of the player
void GetVRCamPosByLocalClientNum(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the camera position of the local client given
EXAMPLE: cam_origin = GetVRCamPosByLocalClientNum( 0 )
void GetVRControllerAngles(<localClientNum>,<handIdx>)
- [MANDATORY] <localClientNum> Client number of the controller you want the orientation of
- [MANDATORY] <handIdx> 0 for dominant hand, 1 for secondary hand. Secondary hand is not guaranteed to exist
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: gets the world-space angles of the tracked VR controller
EXAMPLE: pos = self GetVRControllerAngles( 0, (60, 0, 0) ) ...
void GetVRControllerGripButton(<localClientNum>,<handIdx>)
- [MANDATORY] <localClientNum> Client number of the controller you want
- [MANDATORY] <handIdx> 0 for dominant hand, 1 for secondary hand. Secondary hand is not guaranteed to exist
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: returns true if the grip button is pressed
EXAMPLE: holding = self GetVRControllerGripButton( 0 ) ...
void GetVRControllerPosition(<localClientNum>,<handIdx>)
- [MANDATORY] <localClientNum> Client number of the controller you want the position of
- [MANDATORY] <handIdx> 0 for dominant hand, 1 for secondary hand. Secondary hand is not guaranteed to exist
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: gets the world-space position of the tracked VR controller
EXAMPLE: pos = self GetVRControllerPosition( 0 ) ...
void GetVRControllerXButton(<localClientNum>,<handIdx>)
- [MANDATORY] <localClientNum> Client number of the controller you want
- [MANDATORY] <handIdx> 0 for dominant hand, 1 for secondary hand. Secondary hand is not guaranteed to exist
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: returns true if the grip button is pressed
EXAMPLE: holding = self GetVRControllerXButton( 0 ) ...
void <player> GetWallRunWallNormal()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the normal of the wall the player is running on (or was running on)
EXAMPLE: wall_normal = player GetWallRunWallNormal()
void GetWatcherWeapons()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns array of weapons that need watchers so they will die when the player respawns
EXAMPLE: watcherWeapons = GetWatcherWeapons()
void GetWaterHeight(<pos>)
- [MANDATORY] <pos> Query position
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the height of the water at this position
EXAMPLE: height = getwaterheight( self.origin )
void GetWeapon(<weaponname>,[attachmentname_1 or array of attachments],[attachmentname_2],[attachmentname_3],[attachmentname_4],[attachmentname_5],[attachmentname_6],[attachmentname_7],[attachmentname_8])
- [MANDATORY] <weaponname> the name of the base weapon to return
- [OPTIONAL] [attachmentname_1 or array of attachments] the name of the first attachment to return
- [OPTIONAL] [attachmentname_2] the name of the second attachment to return
- [OPTIONAL] [attachmentname_3] the name of the third attachment to return
- [OPTIONAL] [attachmentname_4] the name of the fourth attachment to return
- [OPTIONAL] [attachmentname_5] the name of the fifth attachment to return
- [OPTIONAL] [attachmentname_6] the name of the sixth attachment to return
- [OPTIONAL] [attachmentname_7] the name of the seventh attachment to return
- [OPTIONAL] [attachmentname_8] the name of the eighth attachment to return
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the requested weapon object based on game mode agnostic weapon name string
EXAMPLE: GetWeapon( "ar_standard", "acog" )
void GetWeaponAccuracy(<entity>,<weapon name>)
- [MANDATORY] <entity> An entity. Must be AI.
- [MANDATORY] <weapon name> The weapon name.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns accuracy at the distance from the current enemy.
EXAMPLE: getweaponaccuracy( self, "ak47" ), getweaponaccuracy( ai, ai.primaryweapon )
void GetWeaponAttachments()
CATEGORY:
CLIENT/SERVER: Server
void GetWeaponChargeLevel()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the current charge level for charged shot weapons
EXAMPLE: charge = player GetWeaponChargeLevel()
void GetWeaponForCharacter(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the weapon at the given index
EXAMPLE: modelName = GetWeaponForCharacter( 0, "mp" )
void <weapon> GetWeaponForwardDir()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the weapon's forward direction
EXAMPLE: weapon GetWeaponForwardDir()
void GetWeaponHackRatio(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the players hack completion ratio
EXAMPLE: GetWeaponHackRatio(localClientNum, 1, "hotgun_zm")
void GetWeaponModelForCharacter(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the name of the weapon model of at the given index
EXAMPLE: modelName = GetWeaponModelForCharacter( 0, "mp" )
void <weapon> GetWeaponMuzzlePoint()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the weapon's muzzle point
EXAMPLE: weapon GetWeaponMuzzlePoint()
void <player> GetWeaponOptic(<weapon>)
- [MANDATORY] <weapon> Weapon name
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the weapon optic attachment name
EXAMPLE: attachmentName = player GetWeaponOptic( weapon )
void <player> GetWeaponPosFrac(<local client num>)
- [MANDATORY] <local client num> Player to get weapon pos frac for.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the weapon pos frac of the player. It only works for the player.
EXAMPLE: if ( player GetWeaponPosFrac(0) > 0.5 ) )...
void GetWeaponWithAttachments(<weaponname>)
- [MANDATORY] <weaponname> the name of the base weapon with attachments to return
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the requested weapon object
EXAMPLE: GetWeapon( "mp7_mp+acog" )
void GetWeaponWorldModel(<weapon>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns weaopn world model
EXAMPLE: model = GetWeaponWorldModel("lmg")
void GetWeaponXCam(<weapon object>,<camera>)
- [MANDATORY] <weapon object> The weapon entity
- [MANDATORY] <camera> The camera to get
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the weapon XCam
EXAMPLE: weapon GetWeaponXCam( GetWeapon( weaponName ), "cam_cac_weapon" )
void GetXCamForCharacter(<characterIndex>,<sessionmode>)
- [MANDATORY] <characterIndex> The index of the character in the current game-mode's character table
- [MANDATORY] <sessionmode> Session Mode Index
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns the name of the xcam to use for the character pose in the frontend
EXAMPLE: frontendVignetteAnim = GetXCamForCharacter( characterIndex, "mp" )
void GetXCamMouseControl(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the controller you want the mouse yaw/pitch of
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Get the current "yaw" and "pitch" of the mouse xcam. Returns an array with two keys, "yaw" and "pitch".
EXAMPLE: xcammouse = GetXCamMouseControl( localclientnum ) ...
void GetXModelCenterOffset(<modelname>)
- [MANDATORY] <modelname> The name of the xmodel
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Calculates the offset to the center of the model from the origin
EXAMPLE: offset = GetXModelCenterOffset( "modelname" )
entity GetZBarrierArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of all of the zbarrier objects in a level.
EXAMPLE: zbarriers = GetZBarrierArray()
void <entity> GetZBarrierAttackSlotHorzOffset()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the horizontal offset used to offset the position of each attack slot relative to the zbarrier object. Odd numbers will start in the center of the barrier and offset to each side. Even numbers will start each side of the center - with no central spot specified.
EXAMPLE: horzOffset = ent GetZBarrierAttackSlotHorzOffset()
void <entity> GetZBarrierNumAttackSlots()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of attack slots used by this zbarrier.
EXAMPLE: numSlots = ent GetZBarrierNumAttackSlots()
void <entity> GetZBarrierPieceAnimLengthForState(<index>,<state>,[scalar])
- [MANDATORY] <index> The index of the piece we care about.
- [MANDATORY] <state> Name of state of interest - choices are 'open', 'closed', 'opening', 'closing'.
- [OPTIONAL] [scalar] Scalar applied to animation length.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the length in seconds for the animation associated with the supplied state for a piece, in seconds.
EXAMPLE: wait(ent GetZBarrierPieceAnimLengthForState(0, "opening", 0.9))
void <entity> GetZBarrierPieceAnimState(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the anim state name to be used for zombies tearing this board down.
EXAMPLE: anim_state = ent GetZBarrierPieceAnimState(1)
void <entity> GetZBarrierPieceAnimSubState(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the anim sub-state name to be used for zombies tearing this board down.
EXAMPLE: anim_state = ent GetZBarrierPieceAnimSubState(1)
void <entity> GetZBarrierPieceIndicesInState(<state>)
- [MANDATORY] <state> Name of state of interest - choices are 'open', 'closed', 'opening', 'closing'.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns an array of integer indices of the zbarriers pieces that are in the specified state.
EXAMPLE: open_pieces = ent GetZBarrierPieceIndicesInState("open")
void <entity> GetZBarrierPieceState(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the state of the piece indexed in the zbarrier ent. States are open, opening, closed and closing.
EXAMPLE: pieceState = ent GetZBarrierPieceState(1)
void <entity> GetZBarrierReachThroughAttackAnimState()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the anim state name for reach through attacks used by this zbarrier.
EXAMPLE: attackStateName = ent GetZBarrierReachThroughAttackAnimState()
void <entity> GetZBarrierTauntAnimState()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the anim state name for taunts used by this zbarrier.
EXAMPLE: tauntStateName = ent GetZBarrierTauntAnimState()
void <entity> Ghost()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Used when the entity should be sent over the network to clients but not be drawn
EXAMPLE: model Ghost()
void <entity> Gib(<gibtype>,<parent>)
- [MANDATORY] <gibtype> Type of gib
- [MANDATORY] <parent>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gib an entity
EXAMPLE: self gib( "normal", temp_array )
void GlassRadiusDamage(<origin>,<radius>,<max_damage>,<min_damage>,[means_of_death])
- [MANDATORY] <origin> Origin of damage
- [MANDATORY] <radius> Radius of damage
- [MANDATORY] <max_damage> Max damage, this is the damage at the origin
- [MANDATORY] <min_damage>Max damage, this is the damage at the edge of the radius
- [OPTIONAL] [means_of_death] Means of death passed to the glass system from script, defaults to MOD_EXPLOSIVE
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Damages glass in the radius
EXAMPLE: GlassRadiusDamage( origin, range, max_damage, min_damage, means_of_damage )
void GrenadeExplosionEffect(<position>)
- [MANDATORY] <position> Position of the fx
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a grenade explosion effect at the position
entity GroundTrace(<start>,<end>,<hit characters>,<ignore entity>,[ignore water],[ignore glass])
- [MANDATORY] <start> The bullet start point
- [MANDATORY] <end> The bullet end point
- [MANDATORY] <hit characters> When set to true, this will trace for character hits
- [MANDATORY] <ignore entity> An entity to ignore
- [OPTIONAL] [ignore water] Optionally ignore water. (bool)
- [OPTIONAL] [ignore glass] Optionally ignore glass. (bool)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows script to do a point trace with MASK_SHOT + MASK_ITEM. Returns hit position, hit entity, hit surface normal.
EXAMPLE: trace = GroundTrace(magicBulletOrigin.origin, eyePos, true, undefined)
void <entity> HasAnimTree()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the entity has an anim tree
EXAMPLE: self HasAnimTree()
void <entity> HasASM()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check if this entity has an ASM.
EXAMPLE: if ( HasASM( self ) ) {
void <entity> HasDObj(<local client number>)
- [MANDATORY] <local client number> number of the local client on the machine.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the entity currently has a dobj.
EXAMPLE: if(ent HasDObj(0))
void <entity> HasPart(<tagname>,[modelname])
- [MANDATORY] <tagname> The tag to search for. (string)
- [OPTIONAL] [modelname] The optional model name to help specify the part location. (string)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether the entity has the given tagname as part of its skeleton.
EXAMPLE: has_part = self HasPart( "tag_weapon", "weapon_saw" )
void HeliTurretDogTrace(<position>,<dog>,<hitNum>)
- [MANDATORY] <position> place that check if you can see if being performed
- [MANDATORY] <dog> the dog that the helicopter wants to see
- [MANDATORY] <hitNum> if you run this more than once make sure to populate this with the return of the last as it will increase efficiency
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines if you helicopter turret can see the dog.
EXAMPLE: if (0 == (copter HeliTurretSightTrace(heli_turret_point, dog, lastHit))
void HeliTurretSightTrace(<position>,<player>,<hitNum>)
- [MANDATORY] <position> place that check if you can see if being performed
- [MANDATORY] <player> the player that the helicopter wants to see
- [MANDATORY] <hitNum> if you run this more than once make sure to populate this with the return of the last as it will increase efficiency
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines if you helicopter turret can see an the players eyes.
EXAMPLE: if (0 == (copter HeliTurretSightTrace(heli_turret_point, player, lastHit))
void <entity> Hide()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Hide the entity
EXAMPLE: self Hide()
void <entity> HideFromTeam(<team>)
- [MANDATORY] <team> The team to show the entity to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Hides the entity from a particular team
EXAMPLE: self HideFromTeam( friend_team )
void hideinfovolume(<entnum>)
- [MANDATORY] <entnum> the entity number of the info volume
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops an info volume from being drawn
EXAMPLE: InfoVolumeDebug_HideVolume( info_volume GetEntityNumber() )
void HideMiscModels(<targetname>)
- [MANDATORY] <targetname> targetname of misc model(s).
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Hide all misc models with this targetname
EXAMPLE: HideMiscModels( "crash_destruct" )
void <entity> HidePart(<tagname>,[modelname],[bApplyToChildren])
- [MANDATORY] <tagname> The tag to hide. All surfaces with a vertex weighted to the tag will be hidden and have no bullet collision. (string)
- [OPTIONAL] [modelname] The optional model name to help specify the part location. (string)
- [OPTIONAL] [bApplyToChildren] Optional flag to specify if we should apply the operation to children bones as well. (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Hide part of an entity.
EXAMPLE: self HidePart( "tag_weapon", "weapon_saw" )
void <entity> HideZBarrierPiece(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops the indexed piece from being drawn.
EXAMPLE: ent HideZBarrierPiece(1)
void IncrementCounter(<counterType>,<increment>)
- [MANDATORY] <counterType> The counter type
- [MANDATORY] <increment> The increment type
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Increments the counter
EXAMPLE: IncrementCounter( "global_comebacks", level.globalComebacks )
void <player> incrementSpecificWeaponPickedUpCount(<weapon>)
- [MANDATORY] <weapon> the weapon
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: increment the count of the times we've picked up this weapon (uniquely identified by weapon+attachemnts; see function: areWeaponsEqual )
EXAMPLE: self incrementSpecificWeaponPickedUpCount( weapon )
void InfoVolumeDebugInit()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Initializes the info volume debug array
EXAMPLE: DebugInfoVolume()
void InitClientObjectives(<localClientNum>)
- [MANDATORY] <localClientNum> client on which to clear the objectives.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Delete a spawned effect.
EXAMPLE: InitObjectives( 0 )
void <client> InLastStand()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check the last stand state for the client
EXAMPLE: if ( self InLastStand() )
void IPrintLn(<text>)
- [MANDATORY] <text> text to be written
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Write line to the screen
EXAMPLE: IPrintLn( "Where have all the cowboys gone?" )
void IPrintLnBold(<text>)
- [MANDATORY] <text> text to be written
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: write bold line to the screen
EXAMPLE: IPrintLnBold( "Mitchell!" )
void IsActor(<entity>)
- [MANDATORY] <entity> An entity object that may be an ai character
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an ai character
EXAMPLE: if ( IsActor( gun_owner ) ) ...
void IsActorCorpse(<entity>)
- [MANDATORY] <entity> An entity object that might be a corpse
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an actor corpse
EXAMPLE: if ( IsActorCorpse( corpse ) ) ...
void IsActorSpawner(<entity>)
- [MANDATORY] <entity> An entity object that may be an actor spawner
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an actor spawner
EXAMPLE: if ( IsActorSpawner( ent ) ) ...
void IsADS(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if this local client is in ADS, false otherwise
EXAMPLE: IsADS( 0 )
void IsAI(<entity>)
- [MANDATORY] <entity> An entity object that may be an ai character
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an ai character
EXAMPLE: if ( IsAI( gun_owner ) ) ...
void IsAirborne(<entity>)
- [MANDATORY] <entity> An entity object
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an airborne unit
EXAMPLE: if ( IsAirborne( gun_owner ) ) ...
void IsAlive(<entity>)
- [MANDATORY] <entity> An entity object that might be alive or dead
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is alive
EXAMPLE: if ( IsAlive( gun_owner ) ) ...
void IsAnimLooping(<animation>)
- [MANDATORY] <animation> an animation that needs to be identified as a looping or not
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets whether an animation is looped or not
EXAMPLE: boolLoop = IsAnimLooping( climbAnim )
void IsArchetypeLoaded()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if a given archetype is loaded in the level.
EXAMPLE: if ( IsArchetypeLoaded( ARCHETYPE_WARLORD ) )
void IsArenaMode()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if we are in arena mode
EXAMPLE: if ( IsArenaMode() ) ...
void IsAssetLoaded(<assetType>,<assetName>)
- [MANDATORY] <assetType> "weapon" or "material"
- [MANDATORY] <assetName> The name of the asset - should match zone_source
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check whether or not an asset is loaded.
EXAMPLE: IsAssetLoaded( "weapon", "rpg" )
void <entity> IsAttached(<modelname>,[tagname])
- [MANDATORY] <modelname> The name of the model to test if attached.
- [OPTIONAL] [tagname] The tag to test
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the model is attached to the entity
EXAMPLE: self IsAttached( "somemodel", "tag_origin" )
void <player> IsBonusCardActive(<bonuscard>,<classnum>)
- [MANDATORY] <bonuscard> BonusCard index from bonuscard.gsh
- [MANDATORY] <classnum> The current class num of the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns if the bonus card is enabled and active in the class, cannot be called on a larry
EXAMPLE: primary = self IsBonusCardActive( BONUSCARD_PRIMARY_GUNFIGHTER_INDEX, self.class_num )
void <entity> IsBot()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the entity is a bot controlled player
EXAMPLE: if( self IsBot() )
void IsCamAnimLooping(<cam_anim>)
- [MANDATORY] <cam_anim> The animation to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether or not a specific camera anim loop.
EXAMPLE: IsCamAnimLooping( "proto_melee_cam" )
void IsCameraSpikeToggled(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the camera spike owner
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the camera spike is toggled to be active, 0 otherwise
EXAMPLE: if ( IsCameraSpikeToggled( 0 ) )
void <player> IsClientCacheStable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Is the players client cache stable, have we loaded all other clients' resources.
EXAMPLE: player IsClientCacheStable()
void <player> IsContentScreenFilterPlaying()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns whether or not this player is playing a Graphics Content blocking filter at this moment or not.
void IsCorpse(<entity>)
- [MANDATORY] <entity> An entity object that might be a corpse
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is a corpse
EXAMPLE: if ( IsCorpse( gun_owner ) ) ...
void IsCoverNode(<node>)
- [MANDATORY] <node> The node to delete
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns true if the node is of type NODE_TYPEFLAGS_COVER_ONLY
EXAMPLE: IsCoverNode( node )
void <pathnode> IsDangerous(<team>)
- [MANDATORY] <team> Name of the team.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the pathnode is dangerous for the given team
EXAMPLE: if ( node IsDangerous( team ) ) { //do something }
void IsDedicated()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if we are running on the dedicated server
EXAMPLE: if ( IsDedicated() )
void IsDemoPlaying()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if a demo is currently playing back
EXAMPLE: if ( IsDemoPlaying() )
void <player> IsDoubleJumping()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is double jumping.
EXAMPLE: if(player DoubleJumping())
void <player> IsDriving(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum of the caller
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the player is driving a vehicle.
EXAMPLE: if ( self IsDriving( <localClientNum> ) )
void IsDynEntValid(<dynent>)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns if the dynEnt still valid or not
EXAMPLE: if( IsDynEntValid( dyn_id) )
void IsEMPJammed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if this player is jammed by the emp, false otherwise
EXAMPLE: if ( player IsEMPJammed() )
void IsEntity(<variable>)
- [MANDATORY] <variable> variable to test
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether given variable is of type entity.
EXAMPLE: if ( IsEntity( variable ) ) ...
void <parententity> IsEntityLinkedToTag(<entity>,[tag])
- [MANDATORY] <entity> The entity that we are checking
- [OPTIONAL] [tag] The tag we are checking
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns is the entity is linked to the parententity, ( on a specific tag optional )
EXAMPLE: if ( player IsEntityLinkedToTag( grenade, "j_head" ) )
void <ai> IsEventServiced(<eventId>)
- [MANDATORY] <eventId> The identifier of the event (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the specified event to serviced.
EXAMPLE: serviced = self IsEventServiced( 100 )
void <turret> IsFiringTurret()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this turret is firing. The entity must be a turret
EXAMPLE: turret IsFiringTurret()
void IsFlared()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check is a player is under the influence of a flare
EXAMPLE: if ( player IsFlared() )
void IsFriendly(<localclientnum>,[predicted])
- [MANDATORY] <localclientnum> Local client number of the local client you want to test against
- [OPTIONAL] [predicted] Test against predicted version, false by default
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if entity is friendly
EXAMPLE: if ( entity IsFriendly( <localClientNum>, [predicted] ) )
void IsGadgetMeleeCharging()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Is the player in the process of melee charging
EXAMPLE: self IsGadgetMeleeCharging()
void IsGlobalStatsServer()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the game is a global stats ranked server
EXAMPLE: level.ranked |= IsGlobalStatsServer()
void IsGodMode(<entity>)
- [MANDATORY] <entity> An entity object to check for god mode
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is in god mode
EXAMPLE: if ( IsGodMode( player ) ) ...
void <grenade> isGrenadeDud()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns if a grenade is a dud
EXAMPLE: if ( grenade isGrenadeDud() )
void <entity> IsHidden()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: return true if entity is hidden
EXAMPLE: self IsHidden()
void IsInHelicopter(<localClientNum>)
- [MANDATORY] <localClientNum> Client number to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the client is in a helicopter.
EXAMPLE: if( IsInHelicopter( 0 ) )
void IsInScrCam(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Check if the camera of local client is in scripted camera
EXAMPLE: inScrCam = IsInScrCam( 0 )
void <entity> IsInScritpedAnim()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the entity currently has scripted animation playing.
EXAMPLE: if(ent IsInScritpedAnim())
void IsInSecondChance()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: To check if player is needs revive
EXAMPLE: if ( self IsInSecondChance() )
void <entity> IsInsideHeightLock()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether the entity is inside the height lock or not
EXAMPLE: if( self IsInsideHeightLock() ) { //do something }
void <entity> IsLaserOn()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: check if the entity has laser turned on.
EXAMPLE: if ( IsLaserOn( entity ) ) { ...
void <entity> IsLinkedTo(<other>)
- [MANDATORY] <other> Entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the entity is linked to the other entity
EXAMPLE: if (ent IsLinkedTo( other )) { // dostuff }
void <player> IsLoadingCinematicPlaying()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Is the player playing the loading cinematic
EXAMPLE: player IsLoadingCinematicPlaying()
void IsLocalClientDead()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Checks if the pm_type > PM_DEAD
EXAMPLE: IsLocalClientDead()
void <vehicle> IsLocalClientDriver(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum of the caller
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the driver of the vehicle.
EXAMPLE: driver = self IsLocalClientDriver(0)
void IsLocalGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the game local only
EXAMPLE: level.local = IsLocalGame()
void <entity> IsLocalPlayer()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the ent it's called on is a local player.
void <player> IsLocalPlayerViewLinked(<localClientNum>)
- [MANDATORY] <localClientNum> The localClientNum of the caller
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns whether or not this entity is linked to the given local client
EXAMPLE: if ( script_mover IsLocalPlayerWeaponViewOnlyLinked( localClientIndex ) ) { ... }
void <player> IsLocalPlayerWeaponViewOnlyLinked()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns whether or not this player is linked to an enity with weapon view only linking.
EXAMPLE: weaponviewonlylinked = self IsLocalPlayerWeaponViewOnlyLinked()
void <player> IsMantling()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return true if the player is mantling, false otherwise.
EXAMPLE: self IsMantling()
void IsMapSubLevel([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether or not the map is a sublevel of a mission
EXAMPLE: level.isSubLevel = IsMapSubLevel( "cp_mi_cairo_ramses2" )
void IsMature(<player>)
- [MANDATORY] <player> The player to check if his Graphic Content Flag is on
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks if a player has his Graphic Content Flag is on
EXAMPLE: IsMature( player )
void <entity> ismissileinsideheightlock()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether the entity is inside the height lock or not
EXAMPLE: if( self IsInsideHeightLock() ) { //do something }
void IsMovingPlatform()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether platform is a moving platform or not
EXAMPLE: platform IsMovingPlatform()
void IsNavVolumeLoaded()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether nav volume is loaded
EXAMPLE: if ( IsNavVolumeLoaded() ) ...
void IsNodeEnabled(<node>)
- [MANDATORY] <node> The node to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns true if the node is enabled, false otherwise
EXAMPLE: IsNodeEnabled( node )
void IsNodeOccupied(<node>)
- [MANDATORY] <node> which node to check.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See if anyone has claimed a particular node.
EXAMPLE: if ( IsNodeOccupied( node ) )
void <entity> IsOnGround()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if entity is on ground
EXAMPLE: if( self IsOnGround() ) { //do something }
void <player> IsOnLadder()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return true if the player is on a ladder, false otherwise.
EXAMPLE: self IsOnLadder()
void <player> IsOnSlide()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return true if the player is in the player movement slide.
EXAMPLE: self IsOnSlide()
void IsOnTurret(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the player is currently on a turret
EXAMPLE: if( IsOnTurret( 0 ) )
void IsPathfinder(<entity>)
- [MANDATORY] <entity> An entity to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is registered with navigation system so it can do pathfinding and position query
EXAMPLE: if ( IsPathfinder( tank ) ) ...
void <entity> IsPaused()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether a given entity is paused as part of a world pause.
EXAMPLE: if ( ent IsPaused() )
void <vehicle> IsPeelingOut()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the vehicle is currently peeling out.
EXAMPLE: if ( self IsPeelingOut() ) { }
void IsPlayer(<entity>)
- [MANDATORY] <entity> An entity object that may be the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is the player
EXAMPLE: if ( IsPlayer( gun_owner ) ) ...
void <entity> IsPlayerCorpse()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the ent it's called on is a player corpse.
void <entity> IsPlayerDead()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the entity currently has health of 0 or less
EXAMPLE: if(ent IsPlayerDead())
void <entity> IsPlayerDoubleJumping()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently double jumping (boosting)
EXAMPLE: if(ent IsPlayerDoubleJumping())
void <entity> IsPlayerFiring()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently firing
EXAMPLE: if(ent IsDead())
void <entity> IsPlayerJumping()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently jumping
EXAMPLE: if(ent IsPlayerJumping())
void IsPlayerNumber()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in int is a valid client number
void <entity> IsPlayerSliding()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently sliding
EXAMPLE: if(ent IsPlayerSliding())
void <entity> IsPlayerSprinting()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently sprinting
EXAMPLE: if(ent IsPlayerSprinting())
void <player> IsPlayerSwimming()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return if a player is swimming
EXAMPLE: depth = get_players()[0] IsPlayerSwimming()
void <entity> IsPlayerSwimmingOnSurface()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Return if a player is swimming
EXAMPLE: swimming = player IsPlayerSwimmingOnSurface()
void <entity> IsPlayerSwimmingUnderwater()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Return if a player is swimming
EXAMPLE: swimming = player IsPlayerSwimmingUnderwater()
void <entity> IsPlayerTalking()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is talking
EXAMPLE: if(ent IsPlayerTalking())
void <player> IsPlayerUnderwater()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return if a player is underwater
EXAMPLE: depth = get_players()[0] IsPlayerUnderwater()
void <entity> IsPlayerWallRunning()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently wall running
EXAMPLE: if(ent IsPlayerWallRunning())
void <entity> IsPlayerWallRunningRight()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is currently wall running right
EXAMPLE: if(ent IsPlayerWallRunning())
void <entity> IsPlayingAnimScripted()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the entity is playing in scripted animation.
EXAMPLE: if(player IsPlayingAnimScripted())
void IsPlayingLoopSound([alias])
- [OPTIONAL] [alias] specific alias to check for
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the entity is playing a loop sound
EXAMPLE: car IsPlayingLoopSound()
void IsPointInNavVolume(<position>,<navVolumeName>)
- [MANDATORY] <position> Position to evaluate.
- [MANDATORY] <navVolumeName> Either "navvolume_small" or "navvolume_big".
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks if a given point is within the specified navigation volume.
EXAMPLE: result = IsPointInNavVolume( (10,20,30), "small volume" )
void IsPointOnNavMesh(<position>,[entity / radius])
- [MANDATORY] <position> Position to evaluate.
- [OPTIONAL] [entity / radius] the point is for this entity to path to, or an estimate radius of the expected character radius. default to radius 0. Note: not passing in the entity can cause false positive when point is on NavMesh but too close to boundary / on wrong material / in disabled navmesh trigger; or false negative when big character's origin is far below NavMesh but still within tolerant height.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks if a given point is valid on the NavMesh. This check performs all the necessary validation such as away from boundary, correct material, navmesh trigger, etc.
EXAMPLE: isValid = IsPointOnNavMesh( (10,20,30), self )
void IsPoisoned()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check is a player is under the influence of gas
EXAMPLE: if ( player IsPoisoned() )
void <player_or_playercorpse> IsRagdoll()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Return true if the entity is a ragdoll body, false otherwise.
EXAMPLE: if( player IsRagdoll() ) { //do something }
void <entity> IsRobot()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the ent it's called on is a sentient vehicle i.e. a Robot.
void <player> IsScrambled()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the if player is getting scrambled by an enemy
EXAMPLE: if ( player IsScrambled( ) )
void IsSentient(<entity>)
- [MANDATORY] <entity> An entity object that may be a sentient character
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is a sentient, that is normally either an ai actor, ai vehicle or the player
EXAMPLE: if ( IsSentient( vehicle.riders[j] ) ) ...
void IsShoutcaster(<localClientNum>,[checkFistPerson])
- [MANDATORY] <localClientNum> Number of the local client to check
- [OPTIONAL] [checkFistPerson] Check if we want first person spectating to be not considered as spectate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the local client is shoutcasting
EXAMPLE: if ( IsSpectating( localClientNum, false ) )
void <player> IsSlamming()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is slamming.
EXAMPLE: if(player IsSlamming())
void <player> IsSliding()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is sliding.
EXAMPLE: if(player IsSliding())
void <entity> IsSpawner(<entity>)
- [MANDATORY] <entity> An entity object that may be a spawner
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is a spawner
EXAMPLE: if ( IsSpawner( ent ) ) ...
void IsSpawnPointVisible(<point>,<angles>,<team>,<ignore player>)
- [MANDATORY] <point> Spawnpoint origin that needs to be checked
- [MANDATORY] <angles> Spawnpoint angles that needs to be checked
- [MANDATORY] <team> Team that we need to check against the point
- [MANDATORY] <ignore player> The player that we are spawning in
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true or false if a point is visible to the given team
EXAMPLE: if ( IsSpawnPointVisible( point_position, point_angles, "axis", player ) )
void IsSpectating(<localClientNum>,[checkFistPerson])
- [MANDATORY] <localClientNum> Number of the local client to check
- [OPTIONAL] [checkFistPerson] Check if we want first person spectating to be not considered as spectate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the local client is spectating
EXAMPLE: if ( IsSpectating( localClientNum, false ) )
void IsSplitScreen()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the game is a splitscreen game
EXAMPLE: level.splitscreen = IsSplitScreen()
void <player> IsSplitScreenHost()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if local player is the host
EXAMPLE: if ( player IsSplitScreenHost() ) { }
void <player> IsSprinting()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is sprinting.
EXAMPLE: if(player IsSprinting())
void <player> IsStarterPack()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player has starter pack
EXAMPLE: if ( self IsStarterPack() )
void <player> IsStartingClassDefault()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the starting class is the default class for the level
void <entity> IsStreamed()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if this entity is fully streamed in
EXAMPLE: thing isStream()
void <player> IsStreamerReady()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Is the players streamer ready.
EXAMPLE: player IsStreamerReady()
void IsSwimming(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is swimming.
EXAMPLE: isSwimming = IsSwimming( localclientnum )
void <player> IsTestClient()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is a test client (Does not have a remote user).
EXAMPLE: if( self IsTestClient() )
void IsThirdPerson()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Checks if the camera mode to third person if true
EXAMPLE: IsThirdPerson()
void <entity> IsTouching(<other entity>)
- [MANDATORY] <other entity> Entity.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if <other entity> is touching <entity>
EXAMPLE: if( player IsTouching( e_goal_volume ) ) { //do something }
void <entity> IsTouchingSwept(<other entity>)
- [MANDATORY] <other entity> Entity.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if <other entity> is touching <entity>
EXAMPLE: if( player IsTouchingSwept( e_goal_volume ) ) { //do something }
void <entity> IsTouchingVolume(<origin>,<volume mins>,<volume maxs>)
- [MANDATORY] <origin> Origin of the volume
- [MANDATORY] <volume mins> The min extents of the volume
- [MANDATORY] <volume maxs> The max extents of the volume
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if entity is touching the volume.
EXAMPLE: if ( crate_ent IsTouchingVolume( origin + (0,0,40), mins, maxs ) )
void <player> IsTraversing()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is traversing.
EXAMPLE: if(player IsTraversing())
void <trigger> IsTriggerEnabled()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if trigger is enabled. False otherwise
EXAMPLE: if( trig isTriggerEnabled() )
void <turret> IsTurretFiring()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks if this turret is firing
EXAMPLE: if( IsTurretFiring( roof_turret ) )
void <turret> IsTurretLockedOn()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this turret is locked onto a target. The entity must be a turret
EXAMPLE: turret IsTurretLockedOn()
void IsUnderwater(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the player is underwater.
EXAMPLE: clipCount = IsUnderwater( localclientnum )
void IsUsingNavVolume(<entity>)
- [MANDATORY] <entity> An entity object
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is using Nav Volume. Note this is a relatively low level check. For general gameplay check whether an entity is flying, consider using IsAirborne.
EXAMPLE: if ( IsUsingNavVolume( gun_owner ) ) ...
void isUsingT7Melee()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true T7 Melee system is being used
void IsValidGametype(<game type>)
- [MANDATORY] <game type> a string to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the string is a valid game type
void IsVehicle(<entity>)
- [MANDATORY] <entity> An entity object that may be an ai character
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an ai character
EXAMPLE: if ( IsVehicle( gun_owner ) ) ...
void <entity> IsVehicleSpawner(<entity>)
- [MANDATORY] <entity> An entity object that may be a vehicle spawner
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is a vehicle spawner
EXAMPLE: if ( IsVehicleSpawner( ent ) ) ...
void IsVisibleByPlayer()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns 1 if the actor can be seen by a player
EXAMPLE: if( IsVisibleByPlayer(ent) )
void isvr()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: check if this player has VR enabled
void <player> IsWallRunning()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is wall running.
EXAMPLE: if(player IsWallRunning())
void IsWallrunNode(<node>)
- [MANDATORY] <node> The node to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns true if the node has the PNF_WALLRUN flag set
EXAMPLE: IsWallrunNode( node )
void <vehicle> IsWheelColliding(<wheel>)
- [MANDATORY] <wheel> The wheel position, can be 'front_left', 'front_right', 'back_left', 'back_right', 'middle_left', 'middle_right'
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns if the given wheel is on the ground.
EXAMPLE: colliding = self IsWheelColliding( front_left )
void <vehicle> IsWheelPeelingOut(<wheel>)
- [MANDATORY] <wheel> The wheel position, can be 'front_left', 'front_right', 'back_left', 'back_right', 'middle_left', 'middle_right'
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns if the given wheel is sliding.
EXAMPLE: peeling = self IsWheelPeelingOut( front_left )
void <vehicle> IsWheelSliding(<wheel>)
- [MANDATORY] <wheel> The wheel position, can be 'front_left', 'front_right', 'back_left', 'back_right', 'middle_left', 'middle_right'
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns if the given wheel is sliding.
EXAMPLE: sliding = self IsWheelSliding( front_left )
void IsWorldPaused()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: returns whether or not the world is currently paused
EXAMPLE: if ( IsWorldPaused() )
void <entity> IsZBarrier()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the entity called on is a zbarrier.
EXAMPLE: if(ent IsZBarrier())
void <entity> IsZBarrierClosed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the state of all of the zbarrier's pieces is 'closed'.
EXAMPLE: closed = ent IsZBarrierClosed())
void <entity> IsZBarrierOpen()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the state of all of the zbarrier's pieces is 'open'.
EXAMPLE: open = ent IsZBarrierOpen())
void <item> ItemWeaponSetAmmo(<clipAmmo>,<reserveAmmo>,[altIndex])
- [MANDATORY] <clipAmmo> Ammo for the clip
- [MANDATORY] <reserveAmmo> Reserve ammo
- [OPTIONAL] [altIndex] Alternate weapon index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the weapon ammo to the given clip ammo and reserve ammo. Can give an alternate weapon index
EXAMPLE: weap ItemWeaponSetAmmo( clip, extra, 1 )
void Kick(<clientnum>)
- [MANDATORY] <clientnum> The client number of the player to kick.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Kicks the specified player.
EXAMPLE: Kick( 2 )
void <entity> Kill([source position],[attacker],[inflictor],[weapon])
- [OPTIONAL] [source position] The position that the damage comes from. Defaults to entity's origin
- [OPTIONAL] [attacker] The entity that dealt the damage (such as an AI or player)
- [OPTIONAL] [inflictor] The entity that the damage came from (such as a grenade or turret)
- [OPTIONAL] [weapon]weapon to do damage with
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Kills this entity. If the entity could not be killed, errors. Automatically sets setCanDamage( true ).
EXAMPLE: level.player kill()
void KillClientRadiantExploder(<exploder id>)
- [MANDATORY] <exploder id> string id of exploder to deactivate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Deactivates a client side radiant exploder
EXAMPLE: DeactivateClientRadiantExploder( "light_switch" )
void KillServer()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: kills the server
EXAMPLE: KillServer()
void <entity> LaserOff()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Turns off entity's laser sight.
EXAMPLE: self LaserOff()
void <entity> LaserOn()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Turns on entity's laser sight.
EXAMPLE: self LaserOn()
void <entity> Launch(<initial velocity>,[initial angular velocity])
- [MANDATORY] <initial velocity> The initial velocity of the launch.
- [OPTIONAL] [initial angular velocity] The initial angular velocity of the launch.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launch an object that interacts with the world, using an initial velocity. From this point on this object will no longer block either missiles or bullets.
EXAMPLE: self Launch( (x, y, z) )
void launchdynent(<dynent>,<force>,[hitp])
- [MANDATORY] <dynent>
- [MANDATORY] <force> the direction and magnitude of the force applied
- [OPTIONAL] [hitp] the location of the hitpoint in world space
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Launch a dynent
EXAMPLE: launchdynent( brick, (0,0,200) )
void <entity> LaunchRagdoll(<force>,[bonename])
- [MANDATORY] <force> launch force
- [OPTIONAL] [bonename] bone name to apply the force to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launch this ragdoll.
EXAMPLE: self LaunchRagdoll( (0,0,100) )
void <entity> LaunchVehicle(<force>,bone name to apply the force to)
- [MANDATORY] <force> launch force
- [OPTIONAL] bone name to apply the force to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launch this physics vehicle.
EXAMPLE: panzer LaunchVehicle( (0,0,100) )
void <player> LerpViewAngleClamp(<time>,<accel time>,<decel time>,<right arc>,<left arc>,<top arc>,<bottom arc>)
- [MANDATORY] <time> Lerp duration in seconds. A value of 0 means instantaneous.
- [MANDATORY] <accel time> Acceleration time.
- [MANDATORY] <decel time> Decelaration time.
- [MANDATORY] <right arc> Angle to clamp view to the right.
- [MANDATORY] <left arc> Angle to clamp view to the left.
- [MANDATORY] <top arc> Angle to clamp view to the top.
- [MANDATORY] <bottom arc> Angle to clamp view to the bottom.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Only works if the player is currently linked to another entity and angles aren't locked. Lerps the current view angle constraints to the provided ones over the specified time.
void LinkNodes(<node1>,<node2>)
- [MANDATORY] <node1> first node to link
- [MANDATORY] <node2> second node to link
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Connects node1 to node2. Call it again with arguments flipped if you want a two-way connection.
EXAMPLE: LinkNodes( node_moving_elev_left, node_moving_elev_right )
void <non_player_entity> LinkTo(<linkto entity>,[tag],[originOffset],[anglesOffset])
- [MANDATORY] <linkto entity> The entity to attach this thing to
- [OPTIONAL] [tag] The tag to attach the entity to
- [OPTIONAL] [originOffset] The positional offset from the base position
- [OPTIONAL] [anglesOffset] The angular offset from the base angles
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches one entity to another
EXAMPLE: self.rightturret LinkTo( self, "tag_gunRight", (0,0,0), (0,0,0) )
void <non_player_entity> LinkToBlendToTag(<linkto entity>,[tag],[only yaw],[collision physics])
- [MANDATORY] <linkto entity> The entity to attach this thing to
- [OPTIONAL] [tag] The tag to attach the entity to
- [OPTIONAL] [only yaw] Tells if blending only the yaw. Default to true.
- [OPTIONAL] [collision physics] Sets whether we should use collision physics. Defaults to false.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches one entity to another, gradually lerping entity to the parents orientation
EXAMPLE: self.rightturret LinkToBlendToTag( self, "tag_gunRight" )
void LinkToCamera(<linkType>,[offset])
- [MANDATORY] <linkType>, 0 - pitch only, 1 - yaw only, 2 - roll only, 3 - swimming, 4 - full, 5 - 3d compass. Full is the default if not specified."
- [OPTIONAL] [offset] Vector of the offset
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Links an entity directly to the camera. Good for scripted player arms.
EXAMPLE: swimming_arms LinkToCamera()
void <non_player_entity> LinkToUpdateOffset(<origin_offset>,[angles_offset])
- [MANDATORY] <origin_offset> The origin offset
- [OPTIONAL] [angles_offset] The angles offset
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches one entity to another, gradually lerping entity to the parents orientation
EXAMPLE: self.rightturret LinkToUpdateOffset( originsOffset, anglesOffset )
void LinkTraversal(<node>)
- [MANDATORY] <node> Negotiation begin node
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a user edge connecting two path nodes
EXAMPLE: LinkTraversal( beginNode )
void LoadSentientEventParameters(<scriptBundle>)
- [MANDATORY] <scriptBundle> String name of the script bundle to load
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Loads the global sentient event parameters for a given scriptbundle sentient events asset. (all AI will use these)
EXAMPLE: LoadSentientEventParameters( "sentientevents" )
void LoadSiegeAnim(<anim_name>)
- [MANDATORY] <anim_name> Name of the siege anim to load
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Load a siege anim into memory
EXAMPLE: LoadSiegeAnim( "flappy_bird" )
void LocalClientActive(<client>)
- [MANDATORY] <client> the client to check if it is active
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Return whether local client is active
EXAMPLE: active = LocalClientActive( 0 )
void <entity> LocalToWorldCoords(<local coordinate>)
- [MANDATORY] <local coordinate> The point in local coordinates (vector3)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Transform the given local coordinate point to a world coordinate point
EXAMPLE: ramboPoint = self LocalToWorldCoords( delta )
void <actor> LookAtEntity([otherguy])
- [OPTIONAL] [otherguy] the other guy to look at
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this actor to look at the specified entity. Call this function without any entity specified to turn it off.
EXAMPLE: guy LookAtEntity( otherguy )
void <actor> LookAtPos([pos])
- [OPTIONAL] [pos] the position to look at
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this actor to look at the specified position. Call this function without any position specified to turn it off.
EXAMPLE: guy LookAtPos( pos )
void <player> LUINotifyEvent([player],<lui event name>,<num of args>,<args>)
- [OPTIONAL] [player] the player to notify. If not specified, all players are notified.
- [MANDATORY] <lui event name> as an IString
- [MANDATORY] <num of args> number of parameters
- [MANDATORY] <args> argument to pass to LUI
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sends a notify from script to LUI.
EXAMPLE: LUINotifyEvent( &"update_objectives", 1, &"LEVEL_GOTO_NEXT_PLACE" )
void LUINotifyEventToSpectators(<lui event name>,<num of args>,<args>)
- [MANDATORY] <lui event name> as an IString
- [MANDATORY] <num of args> number of parameters
- [MANDATORY] <args> argument to pass to LUI
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sends a notify from script to LUI.
EXAMPLE: LUINotifyEventToSpectators( &"update_objectives", 1, &"LEVEL_GOTO_NEXT_PLACE" )
entity MagicBullet(<weapon>,<source>,<destination>,[attacker],[targetent],[targetOffset])
- [MANDATORY] <weapon> Weapon type of the bullet
- [MANDATORY] <source> Where the bullet will be spawned
- [MANDATORY] <destination> Where the bullet will be fired at
- [OPTIONAL] [attacker] Set the owner of the bullet to this
- [OPTIONAL] [targetent] The target of the bullet
- [OPTIONAL] [targetOffset] Offset the target by this vector
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a magic bullet at the source
EXAMPLE: MagicBullet( GetWeapon("sniper_hyperion"), level.sniper_loc.origin, target GetTagOrigin( "tag_eye" ), level.sniper_boss)
entity <actor> MagicGrenade(<origin>,<target position>,[time to blow],[weapon])
- [MANDATORY] <origin> The starting point of the grenade toss
- [MANDATORY] <target position> The target point of the grenade toss
- [OPTIONAL] [time to blow] The grenade fuse time in seconds
- [OPTIONAL] [weapon] The grenade weapon to use (defaults to equipped grenade weapon)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a "Magic" grenade from an actor.
EXAMPLE: self MagicGrenade( self.origin, target.origin, 2.0 )
entity <actor> MagicGrenadeManual(<origin>,<velocity>,[time to blow])
- [MANDATORY] <origin> The starting point of the grenade toss
- [MANDATORY] <velocity> The initial velocity vector for the grenade movement
- [OPTIONAL] [time to blow] The grenade fuse time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: creates a "Magic" grenade from an actor
EXAMPLE: self MagicGrenadeManual( self.origin, target.origin, 2.0 )
entity <player> MagicGrenadeManualPlayer(<origin>,<velocity>,<weapon>,[time to blow])
- [MANDATORY] <origin> The starting point of the grenade toss
- [MANDATORY] <velocity> The initial velocity vector for the grenade movement
- [MANDATORY] <weapon> The grenade weapon to base on
- [OPTIONAL] [time to blow] The grenade fuse time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: creates a "Magic" grenade from a player
EXAMPLE: self MagicGrenadeManualPlayer( self.origin, target.origin, 2.0 )
entity <player> MagicGrenadePlayer(<weapon>,<origin>,<velocity>)
- [MANDATORY] <weapon> The grenade weapon to use
- [MANDATORY] <origin> The starting point of the grenade toss
- [MANDATORY] <velocity> The initial velocity vector for the grenade movement
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a "Magic" grenade from a player.
EXAMPLE: MagicGrenadePlayer( "sticky_grenade_mp", self.origin, toss_velocity )
entity MagicGrenadeType(<weaponName>,<sourceLoc>,<velocity>,[time to blow])
- [MANDATORY] <weaponName> The name of the weapon
- [MANDATORY] <sourceLoc> The grenade starting point
- [MANDATORY] <velocity> The velocity of the grenade
- [OPTIONAL] [time to blow] The grenade fuse time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Fire a 'magic grenade', from the source location towards the destination point.
EXAMPLE: ent MagicGrenadeType( "fraggrenade", self.origin, myVelocity )
entity <attacker> MagicMissile(<weapon>,<position>,<velocity>,[targetent])
- [MANDATORY] <weapon> - Weapon name.
- [MANDATORY] <position> - Position to launch from.
- [MANDATORY] <velocity> - Direction and force of launch.
- [OPTIONAL] [targetent] The target of the bullet
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launches a weapon from the given position with the given velocity. Velocity determines direction.
EXAMPLE: bomb = player MagicMissile( "artillery_mp", (100,100,0), ( 0.1, 0.1, 0.1 ) )
void <script_model> MakeFakeAI()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a drone from script model, that can be moved around with simple commands
EXAMPLE: guy MakeFakeAI()
void <grenade> MakeGrenadeDud()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Turns a grenade into a dud
EXAMPLE: grenade MakeGrenadeDud()
void <vehicle> MakePathfinder()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Register a vehicle with Havok so it can do pathfinding and position query
void <entity> MakeSentient()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Turn a vehicle or script mover into a sentient.
EXAMPLE: heli MakeSentient()
void <turret> MakeTurretUnusable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a turret to be unable to be used
EXAMPLE: roof_turret MakeTurretUnusable()
void <turret> MakeTurretUsable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a turret able to be used
EXAMPLE: roof_turret MakeTurretUsable()
void <entity> MakeUnusable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets this entity to be not usable by the player
EXAMPLE: mover MakeUsable()
void <entity> MakeUsable([team])
- [OPTIONAL] [team] The team that is allowed to use the object. Only for script movers.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets this entity to be usable by the player
EXAMPLE: mover MakeUsable()
void Map(<map name>,[save persistent])
- [MANDATORY] <map name> The map to load
- [OPTIONAL] [save persistent] if true then player info is retained
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Loads a new map
void Map_Restart([save persistent])
- [OPTIONAL] [save persistent] if true then player info is retained
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Restarts the map
EXAMPLE: Map_Restart( true )
void MapExists(<map name>)
- [MANDATORY] <map name> The map to check.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the map with the given name exists on the server
void MapShaderConstant(<localClientNum>,<index>,<constant name>,[x],[y],[z],[w])
- [MANDATORY] <localClientNum> Local client for which to map the shader constant
- [MANDATORY] <index> the index you want this shader constant to map to
- [MANDATORY] <constant name> a string that's the name of the shader constant
- [OPTIONAL] [x] initial value of x component
- [OPTIONAL] [y] initial value of y component
- [OPTIONAL] [z] initial value of z component
- [OPTIONAL] [w] initial value of w component
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Maps a shader constant to an index. Returns 1 if success, 0 on failure
EXAMPLE: ent mapshaderconstant( 0, "shaderColor" ); ent mapshaderconstant( 0, "shaderColor", 1, 0, 1, 1 )
void MarkAsDirty()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Marks the entity as dirty
EXAMPLE: MarkAsDirty( entity )
void <destructible> MarkDestructibleDestroyed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: set destructible destroyed
EXAMPLE: barrel MarkDestructibleDestroyed()
void MarkNoVehicleNavMeshFaces()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Update the novehicle flag on navmesh faces. This should only be used in MP map for now.
void matchRecordOvertimeRound()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: call after matchRecordRoundStart to mark the round as an overtime round (only first overtimee round is actually recorded)
EXAMPLE: matchRecordOvertimeRound()
void matchRecordRoundStart()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: need a hook for round starts, to get time stamps
EXAMPLE: matchRecordRoundStart()
void Matrix4x4TransformPoints()
CATEGORY:
CLIENT/SERVER: Server
void MaySpawnEntity()
CATEGORY:
CLIENT/SERVER: Server
void MaySpawnFakeEntity()
CATEGORY:
CLIENT/SERVER: Server
void MisdirectionEnable(<localClientNum>,<bool>)
- [MANDATORY] <localClientNum> The local client number.
- [MANDATORY] <bool> 0 disables display, 1 enables it.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Enables or disables misdirection display
EXAMPLE: MisdirectionEnable( localclientnum, newVal )
void <entity> Missile_DroneSetVisible(<flag>)
- [MANDATORY] <flag> True to set visible, false otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the missile or drone to be visible
EXAMPLE: self Missile_DroneSetVisible( true )
entity <missile> Missile_GetTarget()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the target of the missile to the given entity, and resets if no entity is specified.
EXAMPLE: target = missile Missile_GetTarget()
void <missile> missile_settarget([target],[targetOffset])
- [OPTIONAL] [target] The target of the missile
- [OPTIONAL] [targetOffset] Offset to the target location (vector3)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the target of the missile to the given entity, and resets if no entity is specified.
EXAMPLE: self missile_settarget( player )
void MissionFailed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Restarts the map
EXAMPLE: MissionFailed()
void MissionHasAccolades([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this mission has any accolades associated with it
EXAMPLE: level.has_accolades = MissionHasAccolades( "cp_mi_cairo_ramses2" )
void MissionHasCollectibles([currentmap])
- [OPTIONAL] [currentmap] the name of the current map. If ommitted, use Dvar sv_mapname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this mission has any collectibles in it
EXAMPLE: level.has_collectibles = MissionHasCollectibles( "cp_mi_cairo_ramses2" )
void MissionRestart()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Restarts the mission, which might take you to a different BSP if this is a sublevel
EXAMPLE: MissionRestart()
void <script_model, script_origin or script_brushmodel> MoveGravity(<initial velocity>,<time>)
- [MANDATORY] <initial velocity> The initial velocity to fling this entity at
- [MANDATORY] <time> The time to move the entity in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Fling this entity.
EXAMPLE: self MoveGravity( break_vector, time )
void <script_model, script_origin or script_brushmodel> MoveSlide(<center>,<radius>,<initial velocity>)
- [MANDATORY] <center> The center of the entity's collision with the ground
- [MANDATORY] <radius> The radius of the entity's collision with the ground
- [MANDATORY] <initial velocity> The initial velocity to move the entity at
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Launches the entity in the given velocity. When on the ground it will slide smoothly. Call StopMoveSlide to make it stop moving.
EXAMPLE: self MoveSlide( 16, anglesToForward( self.angles ) * 10 )
void <script_model, script_origin or script_brushmodel> MoveTo(<point>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <point> The point to move the entity to
- [MANDATORY] <time> The time to move the entity in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating
- [OPTIONAL] [deceleration time] The time spent decelerating
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given point.
EXAMPLE: dummy MoveTo( dest_org, .5, .05, .05 )
void <script_model, script_origin or script_brushmodel> MoveX(<point>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <point> The x value to move the entity to, as a floating point number
- [MANDATORY] <time> The time to move the entity in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given world x value
EXAMPLE: train MoveX( -4400, 60, 15, 20 )
void <script_model, script_origin or script_brushmodel> MoveY(<point>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <point> The y value to move the entity to, as a floating point number
- [MANDATORY] <time> The time to move the entity in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: move this entity to the given world y value
EXAMPLE: hangardoor MoveY( 320, 10 )
void <script_model, script_origin or script_brushmodel> MoveZ(<point>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <point> The z value to move the entity to, as a floating point number
- [MANDATORY] <time> The time to move the entity in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Move this entity to the given world z value
void NavPointSightFilter(<points>,<origin>,[checksight])
- [MANDATORY] <points> Array of navmesh points
- [MANDATORY] <origin> Origin to check visibility from
- [OPTIONAL] [checksight] True to check sight, false otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Given an array of navmesh points, filters the array based on navmesh visibility to an origin.
EXAMPLE: points = NavPointSightFilter( points, nearest )
void NeedsRevive(<bool>)
- [MANDATORY] <bool> does player need to be reived
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Used for mini maps to display compass icon
EXAMPLE: self NeedsRevive( true )
void NodesAreLinked(<node1>,<node2>)
- [MANDATORY] <node1> first node
- [MANDATORY] <node2> second node
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if node1 is connected to node2.
EXAMPLE: NodesAreLinked( node_moving_elev_left, node_moving_elev_right )
void NodesVisible(<node1>,<node2>)
- [MANDATORY] <node1> pathnode to check
- [MANDATORY] <node2> pathnode to check against node1
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if these nodes are visible to one another, false otherwise.
EXAMPLE: if ( NodesVisible( cover, guy.node ) )
void <ent> NotSolid()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unsets the solid flag, so that this object is no longer collidable.
EXAMPLE: self NotSolid()
void NumRemoteClients()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the number of remote clients connected to the game. Very useful for scaling content for coop play, and network balancing.
EXAMPLE: num_remote_clients = NumRemoteClients()
void Obituary(<victim>,<attacker>,<weapon>,<weapon>)
- [MANDATORY] <victim> The victim entity
- [MANDATORY] <attacker> The attacker entity
- [MANDATORY] <weapon> The weapon name
- [MANDATORY] <weapon> The means of death as a string
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create an obituary for a character
EXAMPLE: Obituary( self, attacker, sWeapon, sMeansOfDeath )
void Objective_Add(<objective_number>,<state>,<entity>,[displayName],[entity])
- [MANDATORY] <objective_number> The number of the objective to add
- [MANDATORY] <state> A string value representing the state of the objective. Valid states are "empty", "active", "invisible", "done", "current" and "failed"
- [OPTIONAL] [position/onEntity] The position of the objective - or - <entity> entity to be tracked.
- [OPTIONAL] [displayName] The text to use for the objective. This should be a valid localized text reference
- [OPTIONAL] [entity] The owner entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Add a new objective, with ability to specify all the info for the objective
EXAMPLE: Objective_Add( objective_number, "active", closest.bomb.origin, objective_text, self.objective )
void Objective_ClearAllUsing(<objective_number>)
- [MANDATORY] <objective_number> The ID of the objective to alter
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the objective of all players using status.
void Objective_ClearEntity(<objective_number>)
- [MANDATORY] <objective_number> The ID of the objective to alter
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears the entity previous set on the objective
void Objective_ClearPlayerUsing(<objective_number>,<player>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <player> The player who is no longer using the objective
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be not being used by the specified player.
void Objective_Delete(<objective_number>)
- [MANDATORY] <objective_number> The ID of the objective to alter
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Deletes the objective
EXAMPLE: Objective_Delete( objective_number )
void Objective_FlipIcon(<localClientNum>,<objectiveID>,[shouldFlipMaterial])
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
- [OPTIONAL] [shouldFlipMaterial] 1 if the material should be flipped, 0 otherwise
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Flips the icon of the objective
EXAMPLE: Objective_FlipIcon( self.friendlyObjID )
void Objective_GetGamemodeFlags(<objective_index>)
- [MANDATORY] <objective_index> The ID of the objective.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the gamemode flags for the objective.
EXAMPLE: flags = Objective_GetGamemodeFlags( myObjNumber )
void Objective_Icon(<objective_number>,<icon>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <icon> The icon name
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the objective icon
EXAMPLE: objective_icon( crateObjID, "compass_supply_drop_black" )
void Objective_OnEntity(<objective_number>,<entity>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <entity> The entity to set the objective to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to get its position from an entity.
void Objective_Position(<objective_number>,<position>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <position> The position to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the objective position
EXAMPLE: objective_position( self.objectiveID, self.curOrigin )
void Objective_Set3D(<objective_number>,<use3D>,[unused],[unused],[unused],[unused])
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <use3D> true if should render in hud
- [OPTIONAL] [unused] not used
- [OPTIONAL] [unused] not used
- [OPTIONAL] [unused] not used
- [OPTIONAL] [unused] not used
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets flag determining if 3D state for an objective is drawn.
EXAMPLE: Objective_Set3D( myObjNum, true, undefined, undefined, undefined, (0,0,70) )
void Objective_SetColor(<objective_index>,<r/colorName>,[g],[b],[a])
- [MANDATORY] <objective_index> The ID of the objective.
- [MANDATORY] <r/colorName> Red float value for objective, or color name set from the UIEditor as an IString.
- [OPTIONAL] [g] Green float value for objective.
- [OPTIONAL] [b] Blue float value for objective.
- [OPTIONAL] [a] Alpha float value for objective. Default of 1.0 if not specified.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a color for the objective that the icon will then be drawn with.
EXAMPLE: Objective_SetColor( myObjNumber, 1.0, 0.0, 0.0, 1.0 )Objective_SetColor( myObjNumber, "FriendlyBlue" )
void Objective_SetFlag(<objective_index>,<flag>,<true/false>)
- [MANDATORY] <objective_index> The ID of the objective to alter
- [MANDATORY] <flag> - active, fadeoutonscreen, perk, drawdistance, drawname, in3d, clipToMap, primary
- [MANDATORY] <true/false> turn the flag on or off
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the gamemode flags for the objective.
EXAMPLE: Objective_SetFlag( myObjNumber, "active", true )
void Objective_SetGamemodeFlags(<objective_index>,<flags>)
- [MANDATORY] <objective_index> The ID of the objective.
- [MANDATORY] <flags> script managed flags.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the gamemode flags for the objective. This function only works for modes not using 3d objectives (mp).
EXAMPLE: Objective_SetGamemodeFlags( myObjNumber, 0 )
void Objective_SetIcon(<localClientNum>,<objectiveNumber>,<materialName>)
- [MANDATORY] <localClientNum> The local client that is using the objective
- [MANDATORY] <objectiveNumber> The ID of the objective to alter
- [MANDATORY] <materialName> The material to set
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the icon for the objective
EXAMPLE: Objective_SetIcon( localClientNum, clientObjID, "remotemissile_target" )
void Objective_SetIconSize(<localClientNum>,<objective_number>,<scale>)
- [MANDATORY] <localClientNum> The local client that is using the objective
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <scale> The value to scale the objective icon
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the objective's scale for the icon.
EXAMPLE: objective_SetIconSize( localClientNum, clientObjID, 50 )
void Objective_SetInvisibleToAll(<objective_number>)
- [MANDATORY] <objective_number> The ID of the objective to alter
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be invisible to all players.
void Objective_SetInvisibleToPlayer(<objective_number>,<player>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <player> The player to whom the objective is now invisible
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be invisible to the specified player.
void Objective_SetInvisibleToPlayerByIndex(<objective_number>,<entnum>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <entnum> The entity number of the player to whom the objective is now invisible
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be invisible to the specified player.
void Objective_SetPlayerUsing(<objective_number>,<player>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <player> The player who is using the objective
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to being used by the specified player.
void Objective_SetProgress(<objective_index>,<percent>)
- [MANDATORY] <objective_index> The ID of the objective.
- [MANDATORY] <percent> percent float value for objective [0-1].
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the progress for the objective.
EXAMPLE: Objective_SetProgress( myObjNumber, 0.5 )
void Objective_SetSize(<objective_index>,<entity/float>,[float])
- [MANDATORY] <objective_index> The ID of the objective.
- [MANDATORY] <entity/float> The entity to get the size from or a sizeX.
- [OPTIONAL] [float] If sizeX was used in prvious arg, this is sizeY.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a size for the objective that the icon will then be drawn at. Min is MIN_OBJECTIVE_ICON_SIZE = 5
EXAMPLE: Objective_SetSize( myObjNumber, myTrigger )Objective_SetSize( myObjNumber, 20, 30 )
void Objective_SetStencil(<localClientNum>,<objective_number>,<stencil>)
- [MANDATORY] <localClientNum> The local client that is using the objective
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <stencil> Set to true if you want the objective to stencil
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the objective's stencil for the icon.
EXAMPLE: Objective_SetStencil( localClientNum, clientObjID, true )
void Objective_SetUIModelValue(<objective_number>,<lui menu data name>,<lui menu data value>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <lui menu data name> precached name string for the data which we're trying to set.
- [MANDATORY] <lui menu data value> value for the data which we're trying to set on the objective.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set a UI Model Value for an objective
EXAMPLE: Objective_SetUIModelValue( 0, "killedCount", 4 ); or Objective_SetUIModelValue( 0, "killedCount", "Four" )
void Objective_SetVisibleToAll(<objective_number>)
- [MANDATORY] <objective_number> The ID of the objective to alter
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be visible to all players.
void Objective_SetVisibleToPlayer(<objective_number>,<player>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <player> The player to whom the objective is now visible
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be visible to the specified player.
void Objective_SetVisibleToPlayerByIndex(<objective_number>,<entnum>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <entnum> The entity number of the player to whom the objective is now visible
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the objective to be visible to the specified player.
void Objective_State(<objective_number>,<state>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <state> The state to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set a state for the objective
EXAMPLE: Objective_State( obj_id, "active" )
void Objective_Team(<objective_number>,<team>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <team> The team that the objective is for. Valid entries are 'allies', 'axis', 'team3', or 'none'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the team that the objective is for. Allows having different objectives for each team
EXAMPLE: Objective_Team( 0, "allies" )
void Objective_VisibleTeams(<objective_number>,<team>)
- [MANDATORY] <objective_number> The ID of the objective to alter
- [MANDATORY] <team> The team that the objective is for. Valid entries are 'allies', 'axis', 'team3', or 'none'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the team that the objective is visible too for. Allows having different objectives for each team
EXAMPLE: Objective_VisibleTeams( 0, 01101101 )
void <player> OffhandWeaponsEnabled()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determine if offhand weapons are enabled for the player
EXAMPLE: enabled = player OffhandWeaponsEnabled()
void <entity> OverrideLightingOrigin()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Uses the entity origin as the lighting origin instead of the center of the entity's bounding area
EXAMPLE: door OverrideLightingOrigin()
void <entity> OverrideSpawnflags()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the spawnflags on this entity. Used for patching.
EXAMPLE: entity OverrideSpawnflags( 64 )
void PathDistance(<start>,<end>,<generatePathForAccurateDist>,<pathEnt>,<pathDistanceType>,<maxCornerPredictions>)
- [MANDATORY] <start>.
- [MANDATORY] <end>.
- [OPTIONAL] <generatePathForAccurateDist> If set to true, a real path will be generated and the total length of the path segments will be returned.
- [OPTIONAL] <pathEnt> Only used when generatePathForAccurateDist is set. pathEnt will be used for generating a path, so it will respect the movement type. Only supported for actors.
- [OPTIONAL] <pathDistanceType> The method of pathdistance calculation. Two options are PATHDIST_APPROXIMATE(using getApproximateFuturePositions), PATHDIST_CORNERPREDICTED (using getCornerPredictor).
- [OPTIONAL] <maxCornerPredictions> Maximum number of cornerPrediction steps when PATHDIST_CORNERPREDICTED is used. Handles the edge case when cornerPrediction may not ever finish stepping the path all the way.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the approximate/semi-accurate path distance between two points or undefined if no path can be found.
void PhysicsExplosionCylinder(<position>,<outer radius>,<inner radius>,<magnitude>)
- [MANDATORY] <position> The origin of the cylinder
- [MANDATORY] <outer radius> The outer radius of the cylinder
- [MANDATORY] <inner radius> The inner radius of the cylinder
- [MANDATORY] <magnitude> The magnitude of the explosion
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Created a physics explosion cylinder
EXAMPLE: PhysicsExplosionCylinder( self.origin, 600, 240, 1 )
void PhysicsExplosionSphere(<position>,<outer radius>,<inner radius>,<magnitude>,[outer damage],[inner damage])
- [MANDATORY] <position> The origin of the sphere
- [MANDATORY] <outer radius> The outer radius of the sphere
- [MANDATORY] <inner radius> The inner radius of the sphere
- [MANDATORY] <magnitude> The magnitude of the explosion
- [OPTIONAL] [outer damage] The optional outer damage
- [OPTIONAL] [inner damage] The optional inner damage
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a physics explosion sphere
EXAMPLE: PhysicsExplosionSphere( origin, radius, radius, 5, max_damage, min_damage )
void PhysicsJetThrust(<origin>,<weapon facing dir>,<radius>,<magnitude>,<angle limit>)
- [MANDATORY] <origin> origin of the thrust
- [MANDATORY] <weapon facing dir> The weapon facing direction
- [MANDATORY] <radius> The radius of the thrust
- [MANDATORY] <magnitude> The magnitude of the thrust
- [MANDATORY] <angle limit> The angle limit for the thrust
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates a physics jet thrust
EXAMPLE: PhysicsJetThrust( self.origin, (0,0,1), 400, 1, 60)
void PhysicsJolt(<position>,<outer radius>,<inner radius>,<impulse>)
- [MANDATORY] <position> The origin of the jolt
- [MANDATORY] <outer radius> The outer radius of the jolt
- [MANDATORY] <inner radius> The inner radius of the jolt
- [MANDATORY] <impulse> The impulse created by the explosion
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a physics radius jolt
EXAMPLE: PhysicsJolt( self.origin, 600, 240, 1 )
void <script_model> PhysicsLaunch([contact_point],[initial_force])
- [OPTIONAL] [contact_point] The point to apply the initial force
- [OPTIONAL] [initial_force] The force vector to apply
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Permanently turn this entity into a physics object with an intial force vector at the specified point.
EXAMPLE: dummy PhysicsLaunch( contact_point, initial_force )
entity PhysicsTrace(<start>,<end>,[mins],[maxs],[ignore entity],[mask type])
- [MANDATORY] <start> starting position
- [MANDATORY] <end> ending position
- [OPTIONAL] [mins] minimum bounds
- [OPTIONAL] [maxs] maximum bounds
- [OPTIONAL] [ignore entity] the entity to not consider
- [OPTIONAL] [mask type] the trace modifier
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does a physics trace from start to end. Returns hit position
EXAMPLE: trace = PhysicsTrace( start, end, ( 0, 0, 0 ), ( 0, 0, 0 ), self, PHYSICS_TRACE_MASK_VEHICLE_CLIP )
entity PhysicsTraceEx(<start>,<end>,[mins],[maxs],[entity],[player clip])
- [MANDATORY] <start> The start point
- [MANDATORY] <end> The end point
- [OPTIONAL] [mins] trace capsule min
- [OPTIONAL] [maxs] trace capsule max
- [OPTIONAL] [entity] entity to ignore
- [OPTIONAL] [player clip] collide with the player solid mask instead of ai solid mask
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Physics trace, ignoring characters. Returns the full trace structure.
EXAMPLE: trace = PhysicsTraceEx( start, end, (-10,-10,0), (10,10,0) )
void <spawn point> PlaceSpawnPoint()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Raises the spawn point up to make sure it's not in the ground, then drops it back down into the ground.
EXAMPLE: spawnpoints[i] PlaceSpawnPoint()
void <entity> PlayBattleChatterToTeam(<aliasname1>,<aliasname2>,<teamname>,[ignoreplayer])
- [MANDATORY] <aliasname1> The first sound alias to play
- [MANDATORY] <aliasname2> The second sound alias to play
- [MANDATORY] <teamname> The team that will be able to hear the sound. Must be either 'axis' or 'allies' or 'team3'.
- [OPTIONAL] [ignoreplayer] If present, this player will not hear the sound.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the entity, so that only one team can hear it
EXAMPLE: self PlaySoundToTeam( "frag_out", "axis", self )
entity PlayerBeingSpectated(<localClientNum>)
- [MANDATORY] <localClientNum> Number of the local client to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the player the local client is spectating or the player himself if no spectating is going on
EXAMPLE: spectated = PlayerBeingSpectated( localClientNum )
entity PlayerBulletTrace(<start>,<end>,<ignore entity>)
- [MANDATORY] <start> The bullet start point
- [MANDATORY] <end> The bullet end point
- [MANDATORY] <ignore entity> An entity to ignore
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows script to do a bullet point trace with CONTENTS_PLAYER, collides with player hitboxes. Returns hit position, hit entity, hit surface normal.
EXAMPLE: trace = PlayerBulletTrace( magicBulletOrigin.origin, eyePos, undefined )
void <player> PlayerCamLinkTo(<entity>,<tagname>)
- [MANDATORY] <entity> Entity to look through.
- [MANDATORY] <tagname> Name of tag on host model to attach to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the player's vision to look through another entity.
EXAMPLE: level.player2 CameraLinkTo( cameraUpstairs, "tag_player" )
void <player> PlayerCamUnlink()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unlinks the player's vision from an entity.
EXAMPLE: level.player2 CameraUnlink( )
void PlayerGrappleTrace(<start>,<end>,[ignore entity])
- [MANDATORY] <start> starting position
- [MANDATORY] <end> ending position
- [OPTIONAL] [ignore entity] this entity should be ignored
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Trace to see if grapple is valid
EXAMPLE: hitp = PlayerGrappleTrace(player.origin, player.origin + (0,0,-500))
void <linked_player> PlayerLinkedOffsetDisable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: If disabled, the linked player's orientation will not use their link offset.
EXAMPLE: ac130guy PlayerLinkedOffsetDisable()
void <linked_player> PlayerLinkedOffsetEnable()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: If enabled, the linked player's orientation will use their link offset. This is traditional (CoD4) LinkTo behavior for a player.
EXAMPLE: ac130guy PlayerLinkedOffsetEnable()
void <linked_player> PlayerLinkedSetUseBaseAngleForViewClamp(<enable>)
- [MANDATORY] <enable> whether or not to enable using the base entity for the view angle clamp base.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the whether the player's view clamp is based on the entity (true) or the tag selected (false). Must be called after linking using WeaponViewToDelta
EXAMPLE: player PlayerLinkedSetUseBaseAngleForViewClamp( true )
NOTES: A Linked Player Entity using WeaponViewToDelta
void <player> PlayerLinkTo(<linkto entity>,[tag],[view fraction],[right arc],[left arc],[top arc],[bottom arc],[use tag angles],[auto recenter])
- [MANDATORY] <linkto entity> The entity to attach the player to.
- [OPTIONAL] [tag] The tag to attach the player to.
- [OPTIONAL] [view fraction] How much the change in the tag's rotation effects the players view. Defaults to 0.
- [OPTIONAL] [right arc] Angle to clamp view to the right. Defaults to 180.
- [OPTIONAL] [left arc] Angle to clamp view to the left. Defaults to 180.
- [OPTIONAL] [top arc] Angle to clamp view to the top. Defaults to 180.
- [OPTIONAL] [bottom arc] Angle to clamp view to the bottom. Defaults to 180.
- [OPTIONAL] [use tag angles] Determines how the player's view will be tilted. 'False' (default) means that the orientation of the tag when the player is linked will appear flat to the player. Any rotation from that orientation will tilt the player's view. 'True' means that only a tag angles of (0,0,0) will appear flat to the player. Any rotation from (0,0,0) will tilt the player's view.
- [OPTIONAL] [auto recenter] Players view will auto recenter to the tag he is linked to. use tag angles must be true.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. Rotating the parent entity/tag will not move the player's eye position, but only the player's view angles. Thus, the player's eye position is locked in place, always directly above the parent tag.
EXAMPLE: level.player PlayerLinkTo( vehicle, "tag_player", 0.5 )
void <player> PlayerLinkToAbsolute(<lockto entity>,[tag])
- [MANDATORY] <lockto entity> The entity to attach the player to
- [OPTIONAL] [tag] The tag to attach the player to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches the player to an entity. No view movement is allowed. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical)
EXAMPLE: player PlayerLinkToAbsolute( vehicle, "tag_player" )
void <player> PlayerLinkToBlend(<parent>,[tag],[pos time],[pos accel time],[pos decel time],<time>,[angle accel time],[angle decel time])
- [MANDATORY] <parent> The entity to attach the player to.
- [OPTIONAL] [tag] The tag to attach the player to.
- [OPTIONAL] [pos time] Lerp duration in seconds. Default is 1.
- [OPTIONAL] [pos accel time] Acceleration time. Default is 0.
- [OPTIONAL] [pos decel time] Decelaration time. Default is 0.
- [OPTIONAL] [angle time] angle Lerp duration in seconds. Default is <time>.
- [OPTIONAL] [angle accel time] angle Acceleration time. Default is 0.
- [OPTIONAL] [angle decel time] angle Decelaration time. Default is 0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Only works if the player is currently linked to another entity and angles aren't locked. Lerps the current view angle constraints to the provided ones over the specified time.
EXAMPLE: player PlayerLinkToBlend( ice_pick, "tag_origin
void <player> PlayerLinkToDelta(<linkto entity>,[tag],[view fraction],[right arc],[left arc],[top arc],[bottom arc],[use tag angles],[auto recenter])
- [MANDATORY] <linkto entity> The entity to attach the player to.
- [OPTIONAL] [tag] The tag to attach the player to.
- [OPTIONAL] [view fraction] How much the change in the tag's rotation effects the players view. Defaults to 0.
- [OPTIONAL] [right arc] Angle to clamp view to the right. Defaults to 180.
- [OPTIONAL] [left arc] Angle to clamp view to the left. Defaults to 180.
- [OPTIONAL] [top arc] Angle to clamp view to the top. Defaults to 180.
- [OPTIONAL] [bottom arc] Angle to clamp view to the bottom. Defaults to 180.
- [OPTIONAL] [use tag angles] Determines how the player's view will be tilted. 'False' (default) means that the orientation of the tag when the player is linked will appear flat to the player. Any rotation from that orientation will tilt the player's view. 'True' means that only a tag angles of (0,0,0) will appear flat to the player. Any rotation from (0,0,0) will tilt the player's view.
- [OPTIONAL] [auto recenter] Players view will auto recenter to the tag he is linked to. use tag angles must be true.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical)
EXAMPLE: level.player PlayerLinkToDelta( vehicle, "tag_player", 0.5 )
void <player> PlayerLinkWeaponViewToDelta(<linkto entity>,[tag],[view fraction],[right arc],[left arc],[top arc],[bottom arc],[use tag angles])
- [MANDATORY] <linkto entity> The entity to attach the player to.
- [OPTIONAL] [tag] The tag to attach the player to.
- [OPTIONAL] [view fraction] How much the change in the tag's rotation effects the players view. Defaults to 0.
- [OPTIONAL] [right arc] Angle to clamp view to the right. Defaults to 180.
- [OPTIONAL] [left arc] Angle to clamp view to the left. Defaults to 180.
- [OPTIONAL] [top arc] Angle to clamp view to the top. Defaults to 180.
- [OPTIONAL] [bottom arc] Angle to clamp view to the bottom. Defaults to 180.
- [OPTIONAL] [use tag angles] Determines how the player's view will be tilted. 'False' (default) means that the orientation of the tag when the player is linked will appear flat to the player. Any rotation from that orientation will tilt the player's view. 'True' means that only a tag angles of (0,0,0) will appear flat to the player. Any rotation from (0,0,0) will tilt the player's view.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Similar to PlayerLinkToDelta(), but the player's body stays behind. The player's view attaches to the tag, and any weapon fire will also come from there.
EXAMPLE: level.player PlayerLinkToDelta( vehicle, "tag_player", 0.5 )
void PlayerPhysicsTrace(<start>,<end>)
- [MANDATORY] <start> starting position
- [MANDATORY] <end> ending position
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does a physics trace and returns the hit point.
EXAMPLE: hitp = PlayerPhysicsTrace(player.origin + (0,0,72), player.origin + (0,0,-500))
void PlayerPhysicsTraceIgnoreEnt(<start>,<end>)
- [MANDATORY] <start> starting position
- [MANDATORY] <end> ending position
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does a physics trace and returns the hit point.
EXAMPLE: hitp = PlayerPhysicsTraceIgnoreEnt(player.origin + (0,0,72), player.origin + (0,0,-500))
void PlayerPositionValid(<position>)
- [MANDATORY] <position> The position of the potential spawn point
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in origin is valid for a spawn (ie not inside something).
EXAMPLE: if(playerpositionvalid(spawnpoints[i].origin))...
void PlayerPositionValidIgnoreEnt(<position>)
- [MANDATORY] <position> The position of the potential spawn point
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in origin is valid for a spawn (ie not inside something).
EXAMPLE: if(PlayerPositionValidIgnoreEnt(spawnpoints[i].origin))...
void <player> PlayerSetGroundReferenceEnt(<ground reference entity>)
- [MANDATORY] <ground reference entity> The entity used to rotate the player's view.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: The ground entity's rotation will be added onto the player's view. In particular, this will cause the player's yaw to rotate around the entity's z-axis instead of the world z-axis. You only need to call this function once. After that, any rotation that the reference entity undergoes will affect the player. Call this command again with undefined to turn it off.
EXAMPLE: player PlayerSetGroundReferenceEnt( seaEnt )
void PlayerSightTrace(<position>,<maxDistance>,<hitNum>)
- [MANDATORY] <position> place that check if you can see if being performed
- [MANDATORY] <maxDistance> if the position is further than this -1 will be returned
- [MANDATORY] <hitNum> if you run this more than once make sure to populate this with the return of the last as it will increase efficiency
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines if you can see an item. Checks distance and view cone before the trace to increase efficency.
EXAMPLE: if (0 == (self Playersighttrace(positionOfFlare, 200, lastHit))
entity PlayFX(<fx name>,<position>,[forward],[up],[ignore pause])
- [MANDATORY] <fx name> Name of the fx. Fx has to be cached
- [MANDATORY] <position> Position to play the fx at
- [OPTIONAL] [forward] The forward vector of the fx
- [OPTIONAL] [up] The up vector of the fx
- [OPTIONAL] [ignore pause] True if the fx should play even when the game is paused.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays the fx at the given location.
EXAMPLE: PlayFX( level._effect["nuke_fx"], nuke_pos.origin, forward, up )
entity PlayFXOnCamera(<fx name>,[offset],[forward],[up],[ignore pause])
- [MANDATORY] <fx name> Name of the fx. Fx has to be cached
- [OPTIONAL] [offset] Offset from camera to play fx
- [OPTIONAL] [forward] The forward vector of the fx
- [OPTIONAL] [up] The up vector of the fx
- [OPTIONAL] [ignore pause] True if the fx should play even when the game is paused.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays the fx at the given offset from the camera.
EXAMPLE: PlayFX( level._effect["bubbles"], offset, forward, up )
entity PlayFXOnTag(<fx name>,<entity>,<tag>,[ignore pause])
- [MANDATORY] <fx name> Name of the fx. Fx has to be cached
- [MANDATORY] <entity> The entity to play the fx on. Should have a model
- [MANDATORY] <tag> The tag to play the fx on
- [OPTIONAL] [ignore pause] True if the fx should play even when the game is paused.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play fx on a particular tag of an entity
EXAMPLE: PlayFxOnTag( level._effect["character_fire_death_torso"], self, "J_Spine1" )
entity PlayLoopedFX(<fx name>,<repeat>,<position>,[cull distance],[forward],[up])
- [MANDATORY] <fx name> Name of the fx. Fx has to be cached
- [MANDATORY] <repeat> Time to repeat after
- [MANDATORY] <position> Position to play the fx at
- [OPTIONAL] [cull distance] The cull distance for the fx
- [OPTIONAL] [forward] The forward vector of the fx
- [OPTIONAL] [up] The up vector of the fx
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play an fx which is looped
EXAMPLE: PlayLoopedFX( level._effect[self.v["trailfx"]], self.v["trailfxdelay"], self.v["origin"], 0, self.v["forward"], self.v["up"] )
void <entity> PlayLoopSound(<aliasname>,[fadetime])
- [MANDATORY] <aliasname> The sound alias to play
- [OPTIONAL] [fadetime] Time to fade the sound in. Range is between 1 and 31 inclusive.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play a looping sound with an optional fadetime in seconds.
EXAMPLE: fire_sound_ent playloopsound ("mpl_player_burn_loop")
void <entity> PlayRumbleLoopOnEntity(<rumble name>)
- [MANDATORY] <rumble name> The name of the rumble to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays a looping rumble on the given entity.
EXAMPLE: self PlayRumbleLoopOnEntity( "damage_heavy" )
void PlayRumbleLoopOnPosition(<rumblename>,<position>)
- [MANDATORY] <rumblename> The rumble name
- [MANDATORY] <position> The rumble position
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play a looping rumble on the given position
EXAMPLE: PlayRumbleLoopOnPosition( "grenade_rumble", origin )
void <entity> PlayRumbleOnEntity(<rumble name>)
- [MANDATORY] <rumble name> The name of the rumble to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays a rumble on the given entity.
EXAMPLE: self PlayRumbleOnEntity( "damage_heavy" )
void PlayRumbleOnPosition(<rumblename>,<position>)
- [MANDATORY] <rumblename> The rumble name
- [MANDATORY] <position> The rumble position
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play a rumble on the given position
EXAMPLE: PlayRumbleOnPosition( "grenade_rumble", origin )
void <entity> PlaySound(<aliasname>)
- [MANDATORY] <aliasname> The sound alias to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound at the entity
EXAMPLE: bomb PlaySound( "zmb_bomb_explode" )
void PlaySoundAtPosition(<aliasname>,<position>)
- [MANDATORY] <aliasname> The sound alias to play
- [MANDATORY] <position> The point where the sound is played
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias from a position
EXAMPLE: PlaySoundAtPosition("Dirt_skid", ( 100, 100, 0 ) )
void <entity> PlaySoundOnTag(<aliasname>,[tag],[team],[ent])
- [MANDATORY] <aliasname> The sound alias to play, this can be the string name, or the integer hash
- [OPTIONAL] [tag] If present, the sound will play at the position of the given tag
- [OPTIONAL] [team] If present or not undefined the sound will only be heard by the specified team
- [OPTIONAL] [ent] If present the sound will also be heard on the specified entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the tag
EXAMPLE: self PlaySoundOnTag( soundAlias, "J_Head")
void <entity> PlaySoundToAllButPlayer(<aliasname>,<player>)
- [MANDATORY] <aliasname> The sound alias to play (string)
- [MANDATORY] <player> The player that will not be able to hear the sound. (entity)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the entity, so that everyone but one player can hear it
EXAMPLE: self PlaySoundToAllButPlayer( "frag_out", self )
void <entity> PlaySoundToPlayer(<aliasname>,<player>)
- [MANDATORY] <aliasname> The sound alias to play (string) or the sound alias (int)
- [MANDATORY] <player> The player that will be able to hear the sound. (entity)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the entity, so that only one player can hear it
EXAMPLE: self PlaySoundToPlayer( "frag_out", self )
void <entity> PlaySoundToTeam(<aliasname>,<teamname>,[ignoreplayer])
- [MANDATORY] <aliasname> The sound alias to play
- [MANDATORY] <teamname> The team that will be able to hear the sound. Must be either 'axis' or 'allies' or 'team3'.
- [OPTIONAL] [ignoreplayer] If present, this player will not hear the sound.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the entity, so that only one team can hear it
EXAMPLE: self PlaySoundToTeam( "frag_out", "axis", self )
void <entity> PlaySoundWithNotify(<aliasname>,[notification string],[tag])
- [MANDATORY] <aliasname> The sound alias to play
- [OPTIONAL] [notification string] If present, the sound will notify this string on this entity when done.stopsounds
- [OPTIONAL] [tag] If present, the sound will play at the position of the given tag
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Play the sound alias as if coming from the entity
EXAMPLE: self PlaySoundWithNotify("Dirt_skid","skidsound")
void PositionQuery_Filter_Directness(<queryStruct>,<origin>,<target>,[resultVarName])
- [MANDATORY] <queryStruct> result from PositionQuery_Source function. each point contained here will have direction info computed.
- [MANDATORY] <origin> usually the position of AI before move.
- [MANDATORY] <target> the position AI is trying to approach.
- [OPTIONAL] [resultVarName] by default the result directness value will be stored in pointStruct.directness, but can be override by this string.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Directness filter compute the direction information for each of the positions, relative to <origin> and <target>.
EXAMPLE: PositionQuery_Filter_Directness( queryResult, self.origin, self.enemy.origin )
NOTES: The result includes:pointStruct.Directness = DistanceToTargetDifferenceAfterMove / DistanceMoved. Directness describes how efficient the point emerges to target. A close to 1.0 directness leads straight towards target; a close to 0.0 directness prefers strafing while maintain distance; a negative directness gets away from target.pointStruct.LeftDist = distance moved to the left using reference line passing <origin> and <target>. negative value means to the right.pointStruct.TargetDist = distance to <target>.
void PositionQuery_Filter_DistanceToGoal(<queryStruct>,<entity>)
- [MANDATORY] <queryStruct> result from PositionQuery_Source function."
- [MANDATORY] <entity> the entity used to check goal."
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Calculate the distance to <entity>.goalpos. If the point is in <entity>.goalradius, the distance will be 0. the result is in pointStruct.distToGoal
EXAMPLE: PositionQuery_Filter_DistanceToGoal( queryResult, self )
void PositionQuery_Filter_InClaimedLocation(<queryStruct>,<entity>)
- [MANDATORY] <queryStruct> result from PositionQuery_Source function."
- [MANDATORY] <entity> the entity used to check goal."
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Check if the locations are inside other sentients claimed locations <entity>.inClaimedLocation.
EXAMPLE: PositionQuery_Filter_InClaimedLocation( queryResult, self )
void PositionQuery_Filter_Sight(<queryStruct>,<targetPosition>,[offset],[visibleBy_Ent],[numOfPassedToEarlyOut],[ignoreEnt],[resultVarName])
- [MANDATORY] <queryStruct> result from PositionQuery_Source function. each point contained here will be used to check sight against <targetPosition>. "
- [MANDATORY] <targetPosition> the position to check sight."
- [OPTIONAL] [offset] offset to add on each point before sight checking. this is usually something like: offset = ai GetEye() - ai.origin. default to (0,0,0). "
- [OPTIONAL] [visibleBy_Ent] if defined, the corresponding sight check function on Actor or Vehicle will be called. Otherwise the checks just do simple bullet tracing."
- [OPTIONAL] [numOfPassedToEarlyOut] if defined and bigger than 0, the filter will early out after found this many passed sight checks. this is useful if the points are pre sorted by score and we don't care about lower scored ones."
- [OPTIONAL] [ignoreEnt] ignore entity during trace. if [visibleBy_Ent] is defined, it is already ignored internally. "
- [OPTIONAL] [resultVarName] by default the results will be stored in pointStruct.visibility, but can be override by this string. "
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sight filter do sight check on each of the positions to a target position, and store the result in pointStruct.visibility (boolean).
EXAMPLE: PositionQuery_Filter_Sight( queryResult, self.enemy.origin, self GetEye() - self.origin, self, 30, self.enemy );
void PositionQuery_Source_Navigation(<origin>,<minSearchRadius>,<maxSearchRadius>,<halfHeight>,<innerSpacing>,<origin>,<innerSpacing>,[distributionBias])
- [MANDATORY] <origin> Position to start the search around.
- [MANDATORY] <minSearchRadius> the minimum radius away from origin.
- [MANDATORY] <maxSearchRadius> the maximum radius away from origin. can equal to minSearchRadius.
- [MANDATORY] <halfHeight> the max height difference (both positive and negative) away from origin.
- [MANDATORY] <innerSpacing> the distance between points in.
- [OPTIONAL] [reachableBy_Ent] if defined, it will be used to make sure all the points are reachable by this entity from <origin> (not the entity's current position). Can pass in a float number radius to get points on NavMesh. Can also pass in string 'navvolume_small' or 'navvolume_big' to get points on navvolume. Note passing in entity radius only gives rough estimate, not correct result.
- [OPTIONAL] [outerSpacing] if defined, the distance between points will be Lerped from <innerSpacing> to [outerSpacing], to create a gradual distribution.
- [OPTIONAL] [distributionBias] (vec2) if defined, the density of the points will be changed gradually along the direction of this vector. the magnitude will be use as scalar, with 1 being the norm scale.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Generate points around <origin>, between <minSearchRadius> and <maxSearchRadius> and within <halfHeight> height difference. For ground AI, the points will be on Nav Mesh; for flying AI, the points will be in Nav Volume. Only the points in pathable area will be kept. If the <origin> itself is in pathable area, all the points are guaranteed to be reachable from <origin>. If the <origin> is outside pathable area, all the points will still be in pathable areas surrounding <origin>, but reach-abilities cannot be guaranteed.
EXAMPLE: queryResult = PositionQuery_Source_Navigation( goalpos, self.radius, self.radius * 8, heightRadius, AI_GOAL_POINT_STEP, self, AI_GOAL_POINT_STEP * 0.2 )if ( queryResult.centerOnNav ){foreach( pointStruct in queryResult.data ){position = pointStruct.origindist = pointStruct.distToOrigin2D...}}
NOTES: The returned data will be in following structure:rootStruct{// meta data of the queryvec3 originfloat maxRadiusstring sourceTypebool centerOnNav...// points data arraypointStruct{vec3 originfloat scorefloat distToOrigin2D// filters will add additional values here later, e.g.bool visibilityfloat distanceToPoint...} data[]} returnValue
void PositionWouldTelefrag(<position>)
- [MANDATORY] <position> The position of the potential spawn point
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in origin would telefrag a player if another player was spawned there.
EXAMPLE: if ( PositionWouldTelefrag( spawnpoints[i].origin ) ) ...
void PrecacheLeaderboards(<leaderboard names>)
- [MANDATORY] <leaderboard names> The name of the leaderboards to precache
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Precache a sp/mp leaderboard.
EXAMPLE: PrecacheLeaderboards( "LB_KILLS LB_WINS LB_TOTALXP LB_ACCURACY" )
void <grenade> PredictGrenade()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Predict where the grenade (self) will explode.
EXAMPLE: grenade PredictGrenade()
void PredictPosition(<ent>,<frames>)
- [MANDATORY] <ent> The entity to predict position of
- [MANDATORY] <frames> The frame count
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Predict position of the entity at the end of the frames
EXAMPLE: prediction = PredictPosition( ent, 4 )
void <player> PredictSpawnPoint(<origin>,<angles>)
- [MANDATORY] <origin> The origin to spawn at
- [MANDATORY] <angles> The angle.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Indicates to the Texture Streamer where we expect to spawn in.
EXAMPLE: player predictSpawnPoint( origin, angles )
void Print(<text>)
- [MANDATORY] <text> text to be written
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Development only - write to the console
EXAMPLE: Print( "Stuff and things!" )
void PrintLn(<text>)
- [MANDATORY] <text> text to be written
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Development only - write line to the console
EXAMPLE: PrintLn( "I could be doing better!" )
void <client> ProcessClientFieldsAsIfNew()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Process the client fields again
EXAMPLE: self ProcessClientFieldsAsIfNew()
void <ai_or_player> PropagateCurrentEvent()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Propagate the current event to other AI.
EXAMPLE: point = self PropagateCurrentEvent()
void QSortScoredSpawnPointsAscending(<input_array>)
- [MANDATORY] <input_array> The array of points
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sort the scored spawn points in an ascending order
EXAMPLE: sorted_spawn_points = QSortScoredSpawnPointsAscending( scored_spawn_points )
void queuemeleeactionstate()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the queued action state to melee for the player's default hand.
EXAMPLE: player QueueMeleeActionState()
void <entity> RadioActive_FX(<localClientNum>,true/false. Default is true.,Blur. 0 - 5. Default is 0.,Speed. 0 - 2. Default is 1.,Intensity. 0 - 5. Default is 2.)
- [MANDATORY] <localClientNum> Client number of the player
- [OPTIONAL] true/false. Default is true.
- [OPTIONAL] Blur. 0 - 5. Default is 0.
- [OPTIONAL] Speed. 0 - 2. Default is 1.
- [OPTIONAL] Intensity. 0 - 5. Default is 2.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Plays RadioActive/Fire FX
EXAMPLE: entity RadioActive_FX(0, true)
void RadiusDamage()
CATEGORY:
CLIENT/SERVER: Server
void ReCacheLeaderboards()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: recaches local client leaderboard
EXAMPLE: recacheleaderboards(0)
void RecordBreadcrumbDataForPlayer()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: record a breadcrumb data point for player at time
void <player> RefreshShieldAttachment()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Re-attach the shield model to the player.
EXAMPLE: player RefreshShieldAttachment()
void RegisterClientField(<Client field pool name>,<name>,<version>,<num bits>,<type>)
- [MANDATORY] <Client field pool name> Which pool the field is allocated from. Currently supported : "world", "actor", "vehicle", "scriptmover"
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <version> Number indicating version this field was added in - see _version.gsh for defines.
- [MANDATORY] <num bits> How many bits to use for the field. Valid values are in the range of 1-32. Only ask for as many as you need.
- [MANDATORY] <type> Type of the field. Currently supported types "int" or "float"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Register a client field. Client fields are variable bit length fields communicated from server to client.
EXAMPLE: RegisterClientField("world", "my_field", 2, "int"); // registers a world int field with 2 bits of resolution, that can hold the values 0,1,2,3.
void RegisterSkipto(<skipto_name>)
- [MANDATORY] <skipto_name> The skipto name to register
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Register a new skipto name
EXAMPLE: struct.code_index = RegisterSkipto( msg )
void <trigger> ReleaseClaimedTrigger()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Release a currently claimed trigger
EXAMPLE: self.trigger releaseClaimedTrigger()
void <player> RemoveAllFriendlyScramblers()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: removes all friendly scramblers
EXAMPLE: player RemoveAllFriendlyScramblers( )
void <player> RemoveAllSensorGrenadeAreas()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: removes all sensor grenade areas
EXAMPLE: player RemoveAllSensorGrenadeAreas( )
void <entity> RemoveForceNoCull()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes the force-no-cull flag. Entity will now be culled by portals
EXAMPLE: helicopter RemoveForceNoCull()
void <player> RemoveFriendlyScrambler(<handle>)
- [MANDATORY] <handle> will be used to remove the scrambler
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: removes new friendly scrambler from the compass using the same handle you gave when creating it
EXAMPLE: player RemoveFriendlyScrambler( scrambler.handle )
void RemoveInfluencer(<influencer id>)
- [MANDATORY] <influencer id> The influencer to remove
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes the given influencer
EXAMPLE: RemoveInfluencer( influencer_id )
void <entity> RemoveNoSunShadow()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes the no-sunshadow flag.
EXAMPLE: helicopter RemoveNoSunShadow()
void <player> RemoveSensorGrenadeArea(<handle>)
- [MANDATORY] <handle> will be used to remove the sensor
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Removes Sensor Grenade Area from the compass
EXAMPLE: player RemoveSensorGrenadeArea( sensor.handle )
void RemoveZombieBoxWeapon(<weapon>)
- [MANDATORY] <weapon> The weapon to remove
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Removes a zombie box weapon
EXAMPLE: RemoveZombieBoxWeapon( weapon )
void RenderHealthOverlay(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the whether the health overlay should be rendered or not
EXAMPLE: yesno = RenderHealthOverlay( localClientNum )
void RenderHealthOverlayHealth(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the player
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the whether the health overlay health ratio
EXAMPLE: yesno = RenderHealthOverlayHealth( localClientNum )
void ReportUser()
CATEGORY:
CLIENT/SERVER: Server
void ResetAILimit()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Clears any previous restrictions on the max number of AI.
void <entity> ResetDestructible()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Resets the destructible entity back to its start state
EXAMPLE: vehicle ResetDestructible()
void <player> ResetDoubleJumpRechargeTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Resets the double jump recharge timer as if the player had just used it
EXAMPLE: player ResetDoubleJumpRechargeTime()
void <player> ResetFOV()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Replace the current FOV by the default FOV
EXAMPLE: player ResetFOV()
void ResetGlass()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Server side glass struct loops through all glass and resets to inital state
EXAMPLE: ResetGlass()
void <entity> ResetMissileDetonationTime([time])
- [OPTIONAL] [time] Override the reset timer from the weapon and specify the time left.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Resets the timer for a grenade or missile to its max fuse time.
EXAMPLE: grenadeEnt ResetMissileDetonationTime()
void ResetWeaponCosts(<local client num>)
- [MANDATORY] <local client num> The local client num
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Reset the zombie weapon costs
EXAMPLE: ResetWeaponCosts( <local client num> )
void ResetZombieBoxWeapons()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Reset the zombie box weapons
EXAMPLE: ResetZombieBoxWeapons()
void ReviveObituary(<victim>)
- [MANDATORY] <victim> The victim entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create an revive obituary for a character
EXAMPLE: Obituary( self )
void RopeGetPosition(<ropeid>,<frac>)
- [MANDATORY] <ropeid> The id of the rope
- [MANDATORY] <frac> Value between 0 and 1 specifying what position we are querying.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Queries the position of the rope.
EXAMPLE: RopeGetPosition( ropeid, 1 )
void RopePulse(<origin>,<innerRadius>,<outerRadius>,<innerDamage>,<outerDamage>)
- [MANDATORY] <origin> Where the event is.
- [MANDATORY] <innerRadius> inner radius of event. At this radius or lower, innerDamage is done.
- [MANDATORY] <outerRadius> outer radius of event. Maximum extent at which outerDamage is done. Damage scales to innerDamage between outerRadius and innerRadius
- [MANDATORY] <innerDamage> how much damage is applied at innerRadius, or lower.
- [MANDATORY] <outerDamage> how much damage is applied at outerRadius.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Creates a stimulus that will effect ropes in the area and radius of the event. Amount of movement is based on damage calculation. Cheaper than physics events, as it only effects ropes. Zero network cost, as it's on the client.
EXAMPLE: RopePulse(sRopePulse.origin, 10, 150, 100, 1); // 150 damage applied at 10 units or less, 1 damage applied at 150 units distance.
void Rotate(<rotation vector>)
- [MANDATORY] <rotation vector> The direction of the bobbing
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Causes a script entity to rotate, rotating around its origin
EXAMPLE: self Rotate( rotationVir )
void <script_model, script_origin or script_brushmodel> RotatePitch(<pitch angle>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <pitch angle> The new pitch angle in degrees
- [MANDATORY] <time> The time to rotate in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given pitch
EXAMPLE: treeorg RotatePitch( -5, 0.26, 0.15, 0.1 )
void <model_origin_brushmodel> RotateRoll(<roll angle>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <roll angle> The new roll angle in degrees
- [MANDATORY] <time> The time to rotate in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given roll angle
EXAMPLE: self RotateRoll( (2 * 1500 + 3 * Randomfloat( 2500 )) * -1, 5, 0, 0 )
void <script_model, script_origin or script_brushmodel> RotateTo(<angles>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <angles> The new world angle to rotate to
- [MANDATORY] <time> The time to rotate in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given world rotation value
EXAMPLE: shutter RotateTo( (shutter.angles[0], newYaw, shutter.angles[2]), newTime )
void <script_model, script_origin or script_brushmodel> RotateVelocity(<rotate velocity>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <rotate velocity> The rotational velocity to rotate
- [MANDATORY] <time> The time to rotate in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity at a particular velocity for a given time
EXAMPLE: self RotateVelocity( (x,y,z), 12 )
void <script_model, script_origin or script_brushmodel> RotateYaw(<yaw angle>,<time>,[acceleration time],[deceleration time])
- [MANDATORY] <yaw angle> The new yaw angle in degrees
- [MANDATORY] <time> The time to rotate in seconds
- [OPTIONAL] [acceleration time] The time spent accelerating in seconds
- [OPTIONAL] [deceleration time] The time spent decelerating in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Rotate this entity to the given yaw
void ScreenShake(<sourcePoint>,<scalepitch>,<scaleyaw>,<scaleroll>,<duration>,<durationfadeup>,<durationfadedown>,<radius>,<frequencypitch>,<frequencyyaw>,<frequencyroll>,<exponent>,[target])
- [MANDATORY] <sourcePoint> The position of the earthquake.
- [MANDATORY] <scalepitch> The scale of the shake in player's pitch. Max is 100; Accurate to 2 decimal places.
- [MANDATORY] <scaleyaw> The scale of the shake in player's yaw. Max is 100; Accurate to 2 decimal places.
- [MANDATORY] <scaleroll> The scale of the shake in player's roll. Max is 100; Accurate to 2 decimal places.
- [MANDATORY] <duration> Duration in seconds.
- [OPTIONAL] <durationfadeup> Duration in seconds, included in base duration. Default is 0. Value of -1 means duration - durationfadeup.
- [OPTIONAL] <durationfadedown> Duration in seconds, included in base duration. Default is -1. Value of -1 means duration - durationfadedown.
- [OPTIONAL] <radius> The radius of shake, dampens as you move away from entity. Default is 0 = shake is global
- [OPTIONAL] <frequencypitch> The scaled speed of the shake's pitch. Default is 1. Max is 100; Accurate to 2 decimal places.
- [OPTIONAL] <frequencyyaw> The scaled speed of the shake's yaw. Default is 1. Max is 100; Accurate to 2 decimal places.
- [OPTIONAL] <frequencyroll> The scaled speed of the shake's roll. Default is 1. Max is 100; Accurate to 2 decimal places.
- [OPTIONAL] <exponent> The scale is multiplied by itself 'exponent' times to determine how the shake falls off. Default is 1 which is a linear falloff. Max is 100; Accurate to 2 decimal places
- [OPTIONAL] [target] Target is given if screen shake is to be shown to particular client only
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Create a screen shake event on the given point.
EXAMPLE: ScreenShake( jolt.origin, 0.3, 0.3, 0.3, 3, 0.2, 3, 850, 0.5, 0.25, 0.25 ); // locationalScreenShake( (0,0,0), 0.3, 0.3, 0.3, 3, 0.2, 3, 0, 0.5, 0.25, 0.25, player ); // non locational for one player only
void <entity> SendFaceEvent(<index>)
- [MANDATORY] <index> Face event index (string)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Broadcast to the client a face event
EXAMPLE: self SendFaceEvent( <index> )
void SendKillstreakDamageEvent([damage])
- [OPTIONAL] [damage] How much damage was done
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Send a killstreak damage event to the client
EXAMPLE: killstreakOwner SendKillstreakDamageEvent( 25 )
void ServerFieldGetValue(<player>,<name>)
- [MANDATORY] <player> player to get value from
- [MANDATORY] <name> name of field to retrieve
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the value of a serverfield from a given player
EXAMPLE: ServerFieldGetValue(self, "my_field");
void ServerFieldIncrement(<player>,<name>)
- [MANDATORY] <player> the player to operate on
- [MANDATORY] <name> Unique name to identify the field.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: increment the value in a server field. wrap on overflow.
EXAMPLE: ServerFieldIncrement(player, "my_field")
void serverfieldregister(<name>,<num bits>,<type>,<callback>)
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <num bits> How many bits to use for the field. Valid values are in the range of 1-32. Only ask for as many as you need.
- [MANDATORY] <type> Type of the field. Currently supported types "int" or "float"
- [MANDATORY] <callback> Function that gets called when the value changes (each client can toggle this bit independently of the others)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Register a server field. Server fields are variable bit length fields communicated from client to server
EXAMPLE: RegisterServerField("my_field", 2, "int"); // registers an int field with 2 bits of resolution, that can hold the values 0,1,2,3.
void serverfieldsetval(<player>,<name>,<value>)
- [MANDATORY] <player> the player to operate on
- [MANDATORY] <name> Unique name to identify the field.
- [MANDATORY] <value> the value of the field
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Register a server field. server fields are variable bit length fields communicated from client to server
EXAMPLE: RegisterServerField("my_field", VERSION_SHIP, 2, "int", ::my_cb_func); // registers a world int field with 2 bits of resolution, that can hold the values 0,1,2,3.
void ServerObjective_GetObjective(<localClientNum>,<objectiveName>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveName> The name of the objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the objective or undefined if it does not exist
EXAMPLE: objective_num = ServerObjective_GetObjective( localClientNum, "dom_a" )
entity ServerObjective_GetObjectiveEntity(<localClientNum>,<objectiveID>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the entity of the objective
EXAMPLE: origin = ServerObjective_GetObjectiveEntity( localClientNum, objective_num )
void ServerObjective_GetObjectiveGameModeFlags(<localClientNum>,<objectiveID>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the origin of the objective
EXAMPLE: origin = ServerObjective_GetObjectiveGameModeFlags( localClientNum, objective_num )
void ServerObjective_GetObjectiveOrigin(<localClientNum>,<objectiveID>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the index of the objective or undefined if it does not exist
EXAMPLE: origin = ServerObjective_GetObjectiveOrigin( localClientNum, objective_num )
void ServerObjective_GetObjectiveProgress(<localClientNum>,<objectiveID>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the origin of the objective
EXAMPLE: origin = ServerObjective_GetObjectiveProgress( localClientNum, objective_num )
void ServerObjective_GetObjectiveTeam(<localClientNum>,<objectiveID>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <objectiveID> The index of objective
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the origin of the objective
EXAMPLE: origin = ServerObjective_GetObjectiveTeam( localClientNum, objective_num )
void <ai> ServiceEvent(<eventId>)
- [MANDATORY] <eventId> The identifier of the event (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the specified event to serviced.
EXAMPLE: point = self ServiceEvent( 100 )
void <ai> ServiceEventsInRadius(<origin>,<radius>)
- [MANDATORY] <origin> Source position
- [MANDATORY] <radius> Radius of events to service (-1 for all)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the events within a radius to serviced.
EXAMPLE: self ServiceEventsInRadius( self.origin, 500 )
void SessionModeAbbreviation()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns abbreviation of the current session mode, or "default" if none
EXAMPLE: spawnpointname = SessionModeAbbreviation() + "_frontend_camera
void SessionModeIsCampaignDeadOpsGame()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true/false if the current session mode is DeadOps game
EXAMPLE: if ( SessionModeIsCampaignDeadOpsGame() )
void SessionModeIsCampaignGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a campaign game
EXAMPLE: if ( SessionModeIsCampaignGame() )
void SessionModeIsCampaignZombiesGame()
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Returns true/false if the current session mode is a campaign game and the campaign mode is set to zombies.
EXAMPLE: if ( SessionModeIsCampaignZombiesGame() )
void SessionModeIsMultiplayerGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a multiplayer game
EXAMPLE: if ( SessionModeIsMultiplayerGame() )
void SessionModeIsOnlineGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is onlinegame
EXAMPLE: if ( SessionModeIsOnlineGame() )
void SessionModeIsPrivate()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a private game
EXAMPLE: if ( SessionModeIsPrivate() )
void SessionModeIsPrivateOnlineGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a private onlinegame
EXAMPLE: if ( SessionModeIsPrivateOnlineGame() )
void SessionModeIsSystemlink()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a systemlink game
EXAMPLE: if ( SessionModeIsSystemlink() )
void SessionModeIsZombiesGame()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true/false if the current session mode is a zombies game
EXAMPLE: if ( SessionModeIsZombiesGame() )
void <entity> SetActorWeapon(<weaponname>,[weapon options])
- [MANDATORY] <weaponname> The weapon name. (string)
- [OPTIONAL] [weapon options] options value computed using calcweaponoptions
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the actor weapon.
EXAMPLE: self SetActorWeapon( "weapon_name" )
void SetAILimit()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows you to specify a max number of active AI - which over-rides the MAX_AI functionality in the engine, when it comes time to spawn in new AI. Setting the value higher will not give you more AI than the system supports.
EXAMPLE: SetAILimit( 10 )
void <turret> SetAISpread(<spread>)
- [MANDATORY] <spread> The spread of the turret in degrees
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the spread of this turret when used by an AI
EXAMPLE: roof_turret SetAISpread( 0.2 )
void SetAmbientSnapshot(<name>)
- [MANDATORY] <name> Name of the snapshot
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the ambient snapshot
EXAMPLE: SetAmbientSnapshot( level._sndActiveSnapshot )
void <entity> SetAnim(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Restart": These functions cause the animation to restart. If they had been previously playing, without this they would continue from their current time.
EXAMPLE: self SetAnim( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimForceNew(<animation>,[weight],[time],[goalTime],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to set this animation to after adding it. Defaults to 0.
- [OPTIONAL] [goalTime] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Debug only functionality that adds a new instance of an animation to an animtree setting its time to a specific point.
EXAMPLE: self SetAnimForceNew( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimKnob(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnob( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimKnobAll(<animation>,<root>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [MANDATORY] <root> An ancestor of the animation.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobAll( %precombatrun1, %body, 1, 0.1, 1 )
void <entity> SetAnimKnobAllLimited(<animation>,<root>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [MANDATORY] <root> An ancestor of the animation.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobAllLimited( %precombatrun1, %body, 1, 0.1, 1 )
void <entity> SetAnimKnobAllLimitedRestart(<animation>,<root>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [MANDATORY] <root> An ancestor of the animation.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobAllLimitedRestart( %precombatrun1, %body, 1, 0.1, 1 )
void <entity> SetAnimKnobAllRestart(<animation>,<root>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [MANDATORY] <root> An ancestor of the animation.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobAllRestart( %precombatrun1, %body, 1, 0.1, 1 )
void <entity> SetAnimKnobLimited(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobLimited( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimKnobLimitedRestart(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobLimitedRestart( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimKnobRestart(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimKnobRestart( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimLimited(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimLimited( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimLimitedRestart(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimLimitedRestart( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimRestart(<animation>,[weight],[time],[rate])
- [MANDATORY] <animation> The animation or animtree node to change.
- [OPTIONAL] [weight] Goal weight of this animation. Defaults to 1.0.
- [OPTIONAL] [time] Time to transition to this weight in seconds. Defaults to 0.2.
- [OPTIONAL] [rate] Playback rate of the animation. Defaults to 1.0.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: See "SetAnim.
EXAMPLE: self SetAnimRestart( %precombatrun1, 1, 0.1, 1 )
void <entity> SetAnimTime(<animation>)
- [MANDATORY] <animation> animation to manipulate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the animation time for the given animation.
EXAMPLE: if ( (self GetAnimTime( %walk_and_run_loops ) ) < 0.5 )
void <entity> SetAnimTimeByName(<animation>,<time>)
- [MANDATORY] <animation> animation to manipulate
- [MANDATORY] <time> 0->1
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the animation normalized time for the given animation.
EXAMPLE: self SetAnimTimeByName( "ai_anim_walk", 0.5)
void SetArchive()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: deprecated function, does nothing
void SetAssassinationEnabled(<flag>)
- [MANDATORY] <flag> Whether to use infrared material or not (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enable or disable assassinations on the AI. Also turns on/off the can assassinate indicator.
EXAMPLE: quadtank SetAssassinationEnabled( true )
void <weapon> SetAttachmentCosmeticVariantIndex(<weapon>,<attachment name>,<acvi>)
- [MANDATORY] <weapon> The weapon full name
- [MANDATORY] <attachment name> The attachment name of the weapon
- [MANDATORY] <acvi> The attachment cosmetic variant index
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the attachment cosmetic variant index for the weapon
EXAMPLE: level.weapon_clientscript_cac_model[type] SetAttachmentCosmeticVariantIndex( weaponFullName, level.attachment_names[i], 0 )
void <entity> SetAttachmentCosmeticVariantIndexes(<acvi>)
- [MANDATORY] <acvi> The AttachmentCosmeticVariantIndexes to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the previously calculated SetAttachmentCosmeticVariantIndexes of the entity. The entity should not be a player
EXAMPLE: killcamEnt SetAttachmentCosmeticVariantIndexes( acvi )
void SetAttachmentCosmeticVariants(<weaponname>,[attachmentname_1],[variantindex_1],[attachmentname_2],[variantindex_2],[attachmentname_3],[variantindex_3],[attachmentname_4],[variantindex_4],[attachmentname_5],[variantindex_5],[attachmentname_6],[variantindex_6],[attachmentname_7],[variantindex_7],[attachmentname_8],[variantindex_8])
- [MANDATORY] <weaponname> the name of the base weapon to return
- [OPTIONAL] [attachmentname_1] the name of the first attachment
- [OPTIONAL] [variantindex_1] the index of the cosmetic variant to use for the first attachment
- [OPTIONAL] [attachmentname_2] the name of the second attachment
- [OPTIONAL] [variantindex_2] the index of the cosmetic variant to use for the second attachment
- [OPTIONAL] [attachmentname_3] the name of the third attachment
- [OPTIONAL] [variantindex_3] the index of the cosmetic variant to use for the third attachment
- [OPTIONAL] [attachmentname_4] the name of the fourth attachment
- [OPTIONAL] [variantindex_4] the index of the cosmetic variant to use for the fourth attachment
- [OPTIONAL] [attachmentname_5] the name of the fifth attachment
- [OPTIONAL] [variantindex_5] the index of the cosmetic variant to use for the fifth attachment
- [OPTIONAL] [attachmentname_6] the name of the sixth attachment
- [OPTIONAL] [variantindex_6] the index of the cosmetic variant to use for the sixth attachment
- [OPTIONAL] [attachmentname_7] the name of the seventh attachment
- [OPTIONAL] [variantindex_7] the index of the cosmetic variant to use for the seventh attachment
- [OPTIONAL] [attachmentname_8] the name of the eighth attachment
- [OPTIONAL] [variantindex_8] the index of the cosmetic variant to use for the eighth attachment
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the AttachmentCosmeticVariantIndexes data to be passed in to the weapon
EXAMPLE: SetAttachmentCosmeticVariants( "mp7_mp", "acog", 2, "grip", 1 )
void <entity> SetAvoidanceMask(<Mask>)
- [MANDATORY] <Mask> (const string) Mask must be 'avoid all', 'avoid none', 'avoid actor', 'avoid ai'(actors+vehicles), 'avoid player', or 'avoid vehicle'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the avoidance mask of this Havok character.
EXAMPLE: randEnemy SetAvoidanceMask("avoid none")
void <entity> SetAvoidanceProperty(<Property>,<Value>)
- [MANDATORY] <Property> (const string) Property must be 'collision penalty' or 'dodge penalty'
- [MANDATORY] <Value> (float) The value to set the property to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the avoidance properties of this Havok character.
EXAMPLE: randAlly SetAvoidanceProperty("collision penalty", 0.1)
void SetBallPassAllowed()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables or disables ball passing for the given player.
EXAMPLE: player SetBallPassAllowed( true )
void SetBeastModeIconMaterial(<iconid>,<materialname>)
- [MANDATORY] <iconid> 1 melee 2 electricity 3 grapple
- [MANDATORY] <materialname> material name
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: sets the material used by beast mode icons
EXAMPLE: SetBeastModeIconMaterial( 1, "cool_icon_1" )
void SetBGBCost(<local client num>,<cost>)
- [MANDATORY] <local client num> The local client num
- [MANDATORY] <cost> The cost of a BGB
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the current BGB cost
EXAMPLE: SetBGBCost( 115935 )
void <entity> SetBlur(<target_blur>,<time>)
- [MANDATORY] <target_blur> The final blur. The value is pixels for Gaussian blur at 640x480. Must be a floating point value greater than 0.
- [MANDATORY] <time> Time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Blur the screen over a period of time.
EXAMPLE: setblur( 10.3, 3.0 )
void SetBlurByLocalClientNum(<localClientNum>,<blurFinalValue>,<blurTime>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <blurFinalValue> The blur value (must be positive)
- [MANDATORY] <blurTime> The time to blur (must be positive)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the blur for the local client given
EXAMPLE: SetBlurByLocalClientNum( localClientNum, curr_info.magnitude, curr_info.transition_in )
void <entity> SetBodyRenderOptions(<bodyRenderOptions>,<helmetRenderOptions>,<headRenderOptions>)
- [MANDATORY] <bodyRenderOptions> The packed body render options - calculated with GetHeroBodyRenderOptions
- [MANDATORY] <helmetRenderOptions> The packed helmet render options - calculated with GetHeroHelmetRenderOptions
- [MANDATORY] <headRenderOptions> The packed head render options - calculated with GetHeroHeadRenderOptions
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the entity body, helmet and head render options.
EXAMPLE: heroModel SetBodyRenderOptions( bodyRenderOptions, helmetRenderOptions, headRenderOptions )
void <entity> SetBodyRenderOptionsPacked(<value>)
- [MANDATORY] <value> Usually returned value from GetBodyRenderOptionsPacked()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the packed value of body render options (body type, style, colors)
EXAMPLE: gibEntity SetBodyRenderOptionsPacked( 0 )
void SetBombTimer(<flag bit>,<value>)
- [MANDATORY] <flag bit> The flag bit to change
- [MANDATORY] <value> The new value of the bit
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Bomb timer set in the match state
EXAMPLE: SetBombTimer( "A", 50000 )
void <entity> SetBurn(<time>)
- [MANDATORY] <time> Time to burn for ( greater than 0 )
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the entity burning for the given time
EXAMPLE: self SetBurn( 3.0 )
void <player> SetCameraSpikeActive(<toggle>)
- [MANDATORY] <toggle> 0 for off, 1 for on
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the state of a player's camera spike.
EXAMPLE: player SetCameraSpikeActive( 1 )
void <script_model, script_origin or script_brushmodel> SetCanDamage(<can damage>)
- [MANDATORY] <can damage> The can damage flag
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the candamage flag for this entity - this means that it can respond to notifies from bullets and grenade hits
EXAMPLE: self SetCanDamage( true )
void SetClearanceCeiling()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a new clearance ceiling. If the value is larger than the current ceiling, cut faces will be invalidated.
EXAMPLE: SetClearanceCeiling( 15.0 )
void SetClientNameMode(<name mode>)
- [MANDATORY] <name mode> either 'auto_change' or 'manual_change'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: alters the way that the player name is updated, to prevent cheating by spectators altering their name to communicate with active players.
EXAMPLE: SetClientNameMode( "auto_change" )
void <entity> SetClone()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the contents for the clone.
EXAMPLE: clone SetClone()
void <entity> SetCompassIcon(<iconName>)
- [MANDATORY] <iconName> Name of compass material
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the icon to be shown on the minimap
EXAMPLE: plane setCompassIcon(iconName)
void <entity> SetContents(<content>)
- [MANDATORY] <content> The content to set for the entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets contents of the entity to the given content
EXAMPLE: reconModel SetContents( 0 )
void <entity> SetCorpseGibState(<leg state>,<arm state>)
- [MANDATORY] <leg state> 0 - 3 state: 0 is no gib, 1 right, 2 left, 3 both
- [MANDATORY] <arm state> 0 - 3 state: 0 is no gib, 1 right, 2 left, 3 both
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the gib state for the body rendering.
EXAMPLE: corpse SetCorpseGibState( leg_state, arm_state )
void SetCullDist(<cull distance>)
- [MANDATORY] <cull distance> The cull distance
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the cull distance for a level
EXAMPLE: SetCullDist( 7200 )
void <entity> SetCursorHint()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Attach a cursor hint to the entity.
EXAMPLE: self setCursorHint( cursor_hint, cursor_hint_weapon )
void SetDamageDirectionIndicator(<indicator>)
- [MANDATORY] <indicator> 0 = regular, 1 = armor
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Use the armor version of the hit indicator
void <pathnode> SetDangerous(<team>,<flag>)
- [MANDATORY] <team> Name of the team.
- [MANDATORY] <flag> True if dangerous. False otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this node to be a dangerous node for a particular team. works only on pathnodes.
EXAMPLE: self SetDangerous( self.team, true )
void <entity> SetDedicatedShadow(<flag>)
- [OPTIONAL] <flag> True or False, enabled or disabled
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enabled or Disables dedicated shadow for a model
EXAMPLE: thing SetDedicatedShadow( true )
void <turret> SetDefaultDropPitch(<pitch>)
- [MANDATORY] <pitch> yaw of the turret (side to side) in degrees.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the default drop pitch that the turret attempts to return to when it is not in use.
EXAMPLE: turret SetDefaultDropPitch( -90 )
void SetDemoIntermissionPoint(<origin>,<angles>)
- [MANDATORY] <origin>
- [MANDATORY] <angles>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the intermission point for the demos.
EXAMPLE: setDemoIntermissionPoint( spawnpoint.origin, spawnpoint.angles )
void <entity> SetDepthOfField(<nearStart>,<nearEnd>,<farStart>,<farEnd>,<nearBlur>,<farBlur>)
- [MANDATORY] <nearStart> Near start (should be greater than 0)
- [MANDATORY] <nearEnd> Near end (should be greater than 0)
- [MANDATORY] <farStart> Far start (should be greater than 0)
- [MANDATORY] <farEnd> Far end (should be greater than 0)
- [MANDATORY] <nearBlur> Near blur
- [MANDATORY] <farBlur> Far blur
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the Depth of Field.
EXAMPLE: self SetDepthOfField( 0, 0, 512, 4000, 4, 0 )
void <player> SetDoubleJumpEnergy(<energy>)
- [MANDATORY] <energy> % energy to set on the player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a double jump energy amount on the player
EXAMPLE: player SetDoubleJumpEnergy( <energy> )
void SetDrawInfrared(<flag>)
- [MANDATORY] <flag> Whether to use infrared material or not (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Draw this entity using infrared material when using infrared scope.
EXAMPLE: helicopter SetDrawInfrared( true )
void <entity> SetDrawName(<text>,force vis Bool, alpha = full)
- [MANDATORY] <text> The name.
- [OPTIONAL] force vis Bool, alpha = full
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the drawnname of client ent
EXAMPLE: dude SetDrawName( "dJVahn" )
void <entity> SetDrawOwnerName(<bool>,<bool>)
- [MANDATORY] <bool> Enable/Disable using the owners name.
- [OPTIONAL] <bool> Whether to always draw the name rega
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Draws the entity's owners name above the entity.
EXAMPLE: entity SetDrawOwnerName( true, true )
void SetDvar(<dvar>,<value>)
- [MANDATORY] <dvar> The dvar name as a string.
- [MANDATORY] <value> The dvar value.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value of a dvar.
EXAMPLE: SetDvar( "r_eyesAdjust", "1" )
void SetDynEntBodyRenderOptionsPacked(dynent,<packed render options>)
- [MANDATORY] dynent
- [MANDATORY] <packed render options> Usually returned value from GetBodyRenderOptionsPacked()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the packed value of body render options (body type, style, colors)
EXAMPLE: SetDynEntBodyRenderOptionsPacked( gibEntity, 0 )
void SetDynEntEnabled(dynent,[enabled])
- [MANDATORY] dynent
- [OPTIONAL] [enabled] 1 if dynent is enabled, 0 otherwise
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set this dyn ent to enabled or disabled. Disabled stops the physics and hides the dyn ent.
EXAMPLE: SetDynEntEnabled( brick, 1 )
void <entity> SetElectrified(<time>)
- [MANDATORY] <time> Time to get electrified for ( greater than 0 )
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Electrify the entity for the given time
EXAMPLE: self SetElectrified( 3.0 )
void SetEMPJammed(<isJammed>)
- [MANDATORY] <isJammed> Whether the player should be jammed or not. ( boolean )
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a player/client is affected by EMP
EXAMPLE: player SetEMPJammed( true )
void SetEnableNode(<node>,[truefalse])
- [MANDATORY] <node> the node to enable/disable
- [OPTIONAL] [truefalse] whether it should be enabled
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disables or enabled this node.
EXAMPLE: SetEnableNode( node, false )
void <player> SetEnemyGlobalScrambler(<bool>)
- [MANDATORY] <bool> true if there is a scrabler active, false otherwise
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set to true if there is a global enemy scrambler active
EXAMPLE: player SetEnemyGlobalScrambler( 1 )
void <actor> SetEnemyModel(<model name>)
- [MANDATORY] <model name> The name of the model to set this actor to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the model of the actor that actors enemies will see to the given model name
EXAMPLE: dog SetEnemyModel( "german_shepard_black" )
void <player> SetEnemyScramblerAmount(<float>)
- [MANDATORY] <float> Between 0.0 and 1.0
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the amount alpha of the scrambler applied to the compass
EXAMPLE: player SetEnemyScramblerAmount( 1.0 )
void SetEntBeastModeIconType(<iconid>,<location>)
- [MANDATORY] <iconid> 1 melee 2 electricity 3 grapple
- [OPTIONAL] <location> icon location
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: sets the beast mode icon shown for a particular entity
EXAMPLE: object SetBeastModeIconMaterial( 2, object.origin )
void <player> SetEntGravityTrajectory(<trajectory>)
- [MANDATORY] <trajectory> 0 = TR_GRAVITY, 1 = TR_MOON_GRAVITY
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the gravity trajectory type for the entity.
EXAMPLE: player SetEntGravityTrajectory( 0 )
void <entity> SetEntityAnimRate(<rate>)
- [MANDATORY] <rate> animation rate
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: set the entity animation rate - ZOMBIES ONLY
EXAMPLE: self SetEntityAnimRate( 1.0 )
void <entity> SetEntityPaused(<ignore>)
- [MANDATORY] <ignore> Whether or not to advance normally.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a given entity will advance normally.
EXAMPLE: ent SetEntityPaused( true )
void <entity> SetEntityWeapon(weapon name)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set weapon ent field from script.
EXAMPLE: ent SetEntityWeapon( "kniferang_mp" )
void <trigger> SetExcludeTeamForTrigger(<team name>)
- [MANDATORY] <team name> The name of the team that the trigger will not respond to. Must be either 'axis', 'allies', 'team3', 'team4', 'team5', 'team6' or 'none'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the team that this trigger will not react to. Reacts to all other teams.
EXAMPLE: self SetExcludeTeamForTrigger( game["attackers"] )
void SetExpFog(<startDist>,<halfwayDist>,<red>,<green>,<blue>,<transition time>)
- [MANDATORY] <startDist> The distance, in world units, at which the fog begins.
- [MANDATORY] <halfwayDist> The distance, beyond the startDist, at which the scene will be 50% fogged.
- [MANDATORY] <red> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <green> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <blue> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <transition time> transition time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates an exponential fog.
EXAMPLE: SetExpFog(.0001144, 131/255, 116/255, 71/255, 0)
void SetFakeFire()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Simulates gun fire. Sound and radar blip.
EXAMPLE: entity SetFakeFire( <enabled> )
void <flag> SetFlagAsAway(<localClientNum>,<away>)
- [MANDATORY] <localClientNum> Local client number
- [MANDATORY] <away> A value of 1 sets the flag as away, 0 sets the flag as home
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets a flag as away/home.
EXAMPLE: flag SetFlagAsAway( localClientNum, 1 )
void <entity> SetForceNoCull()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the force-no-cull flag. Entity will not be culled by portals
EXAMPLE: helicopter SetForceNoCull()
void <entity> SetForceNotSimple()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the forceNotSimple flag on the entity
EXAMPLE: self SetForceNotSimple()
void <entity> SetFOVForKillcam(<fov>)
- [MANDATORY] <fov> The fov you want to use for the killcam
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the fov for use with this killcam entity. Setting it to zero makes it use the default fov.
EXAMPLE: killCamEnt SetFOVForKillcam( 25 )
void SetFriendlyNameDraw(<onOff>)
- [MANDATORY] <onOff> True if friendly name drawing is turned on
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: turns on or off local client friendly name drawing
EXAMPLE: SetFriendlyNameDraw( true )
void <player> SetFriendlyScramblerAmount(<float>)
- [MANDATORY] <float> Between 0.0 and 1.0
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the amount alpha of the friendly scrambler applied
EXAMPLE: player SetFriendlyScramblerAmount( 1.0 )
void SetGameEndTime(<time>)
- [MANDATORY] <time> The time to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the time the current match will end
EXAMPLE: setGameEndTime( getTime() + int(timeLeft) )
void SetGametypeSetting(<setting>,<value>)
- [MANDATORY] <setting> The setting name as a string.
- [MANDATORY] <value> The new value for the setting.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the value of a gametype setting.
EXAMPLE: SetGametypeSetting( "timeLimit", 0 )
void SetGlobalFutz(<name>)
- [MANDATORY] <name> The Futz name
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the global futz
EXAMPLE: SetGlobalFutz( futz_name )
void SetGrapplableType()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set how an entity is grappled.
EXAMPLE: platform SetGrapplableType( 1 )
void SetGravity(<gravity>)
- [MANDATORY] <gravity> The gravity to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: sets the gravity in inches per second per second.
EXAMPLE: SetGravity( 800 )
void SetGroupSnapshot(<name>)
- [MANDATORY] <name> Name of the snapshot
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the group snapshot
EXAMPLE: SetGroupSnapshot( level._sndActiveSnapshot )
void SetHealthSnapshot(<name>,<amount>)
- [MANDATORY] <name> The snapshot name
- [MANDATORY] <amount> The amount
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the health snapshot
EXAMPLE: SetHealthSnapshot( sn_name, sn_amount )
void SetHideonClientWhenScriptedAnimCompleted(<entity>)
- [MANDATORY] <entity> An entity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: hides the entity on the client side onces its scripted animation ends
EXAMPLE: SetHideonClientWhenScriptedAnimCompleted( ent )
void <entity> SetHideWhenScriptedAnimationCompleted()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: When playing a scene this will hide the entity when the scripted animation ends on it.
EXAMPLE: entity SetHideWhenScriptedAnimationCompleted()
void <entity> SetHighDetail([flag])
- [OPTIONAL] [flag] True or False, enabled or disabled
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enabled or Disables High Detail rendering for a model
EXAMPLE: thing SetHighDetail( true )
void SetHintLowPriority(<bool>)
- [MANDATORY] <bool> True\False if its on or off
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets this as a low priority hint which is lower priority then everything other then turrets and dropped weapons
EXAMPLE: m_e_hack_trigger SetHintLowPriority( true )
void <entity> SetHintString(<hint string>,[...])
- [MANDATORY] <hint string> The hint string that will be displayed to the player
- [OPTIONAL] [...] Additional arguments may be appended to the hint string
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the hint string for the entity
EXAMPLE: t_door SetHintString( "Press and Hold ^3[{+activate}]^7 to transmit unlock code" )
void SetHintStringForPerk(<perk>,<hint string>)
- [MANDATORY] <perk> The perk that the player needs to have to see this hint string
- [MANDATORY] <hint string> The hint string that will be displayed to the player that has the perk
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Shows this hint string to the player if the player has the specified perk
void SetHintStringForPlayer(<player>,<hint string>,[...])
- [MANDATORY] <player> The player that will see the hint string
- [MANDATORY] <hint string> The hint string that will be displayed to the player
- [OPTIONAL] [...] Additional arguments may be appended to the hint string in the same way as SetHintString.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the trigger hint string for one specific player
void <trigger> SetIgnoreEntForTrigger(<entity to ignore>)
- [MANDATORY] <entity to ignore> The entity that will be ignored during sight trace checks
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Ignores this entity when doing trigger sight traces. Currently only works for trigger_radius_use
EXAMPLE: self SetIgnoreEntForTrigger( camera_spike_ent )
void <entity> SetIgnorePauseWorld(<ignore>)
- [MANDATORY] <ignore> Whether or not to advance normally when the world is paused.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a given entity will advance normally when the world is paused.
EXAMPLE: ent SetIgnorePauseWorld( true )
void SetIncludeMeshes(<enabled>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a streamer hint entity to include mesh data
EXAMPLE: self setIncludeMeshes( true )
void SetInfluenceAt(<influenceMapIndex>,<origin>,<influence>)
- [MANDATORY] <influenceMapIndex> Index of the influence map
- [MANDATORY] <origin> The location to set the influence value
- [MANDATORY] <influence> The influence value to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the influence value on the influence map, returns true/false if the value was set.
EXAMPLE: SetInfluenceAt(influenceMapIndex, origin, influence)
void SetInfluencerTeamMask(<influencer id>,<team mask>)
- [MANDATORY] <influencer id> The influencer id
- [MANDATORY] <team mask> The team mask to apply
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the team mask for the given influencer
EXAMPLE: SetInfluencerTeamMask( influencer_id, team_mask )
void SetInfluencerTimeout(<influencer id>,<time>)
- [MANDATORY] <influencer id> The influencer id
- [MANDATORY] <time> The timeout for the influencer
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the timeout for the influencer in seconds from current time
EXAMPLE: SetInfluencerTimeout( influencer_id, 2.5 )
void <player> SetInfraredVision(<is infrared vision>)
- [MANDATORY] <is infrared vision> Whether using infrared vision
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Switches using the infrared vision (infrared visionset and thermal characters)
EXAMPLE: player SetInfraredVision( true )
void <entity> SetInfraredVisionSet(<visionNameInfrared>)
- [MANDATORY] <visionNameInfrared> name of the vision set
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the vision when using infrared
EXAMPLE: entity SetInfraredVisionSet("visionName")
void SetInitialPlayersConnected()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set initialPlayersConnected bool in match state to true
EXAMPLE: SetInitialPlayersConnected()
void setInTacticalHud(<onOff>)
- [MANDATORY] <onOff> false = off, true = on
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets if the player has the tactical hud open
void <entity> SetInvisibleToAll()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set entity invisible to all players
EXAMPLE: use_trigger SetInvisibleToAll()
void SetInvisibleToPlayer(<player>,[setInvisible])
- [MANDATORY] <player> The player to set the entity invisible to.
- [OPTIONAL] [setInvisible] True if entity has to be invisible to player. False otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Make the entity invisible to the player
EXAMPLE: hackable._trigger SetInvisibleToPlayer( player, false )
void SetJumpHeight(<height_in_inches>)
- [MANDATORY] <height_in_inches> The height to jump in inches
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the global jump height of all players. Minimum value of 0, maximum value of 1023.
EXAMPLE: SetJumpHeight( 100 )
void SetLevelFadeSnapshot(<name>,<amount>)
- [MANDATORY] <name> The snapshot name
- [MANDATORY] <amount> The level fade amount
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the level fade snapshot
EXAMPLE: SetLevelFadeSnapshot( sn_name, sn_amount )
void <light> SetLightColor(<color>)
- [MANDATORY] <color> An RGB vector with components in the range 0 to 1. The given values get rounded before they are stored. (vector3)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current color of the light, as an RGB vector.
EXAMPLE: self SetLightColor( (0.5, 0.75, 1.0) )
void <light> SetLightExponent(<exponent>)
- [MANDATORY] <exponent> A new value for the exponent of the light. This should be an integer in the range of 0 to 100. (integer)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current exponent of the light.
EXAMPLE: self SetLightExponent( 1 )
void <light> SetLightFovRange(<fov_outer>,[fov_inner])
- [MANDATORY] <fov_outer> A new value for the outer FOV of the light, in degrees. This cannot be larger than the fov when the map was compiled, or less than 1. (float)
- [OPTIONAL] [fov_inner] A new value for the inner FOV of the light, in degrees. This cannot be larger than fov_outer, or less than 0. If not specified, the map value is used. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current fov range of the light.
EXAMPLE: self SetLightFovRange( 200, 50 )
void SetLightingOnly(<enabled>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a streamer hint entity to only hint lighting data
EXAMPLE: self SetLightingOnly( true )
void SetLightingState(<new light state>)
- [MANDATORY] <new light state> new state to change to. Lighting state defaults to 1 at start of game
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Changes lighting state for the map
EXAMPLE: SetLightingState( 2 )
void <light> SetLightIntensity(<intensity>)
- [MANDATORY] <intensity> A new value for the intensity of the light. 1 is fullbright, but values can be larger than 1. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current intensity of the light.
EXAMPLE: self SetLightIntensity( 1.5 )
void <light> SetLightRadius(<radius>)
- [MANDATORY] <radius> A new value for the radius of the light. This cannot be larger than the radius when the map was compiled. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current radius of the light.
EXAMPLE: self SetLightRadius( 200 )
void SetLocalRadarEnabled(<localClientNum>,<enabled>)
- [MANDATORY] <localClientNum> Client number to set local radar on
- [MANDATORY] <enabled> 0 if disabled, 1 if enabled
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets whether a client's local radar is enabled.
EXAMPLE: SetLocalRadarEnabled( localClientNum, 1 )
void SetLocalRadarPosition(<localClientNum>,<position>)
- [MANDATORY] <localClientNum> Client number to set local radar position on
- [MANDATORY] <position> New position of the local radar
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the position of a client's local radar.
EXAMPLE: SetLocalRadarPosition( localClientNum, self.origin )
void SetLoopState(<aliasname>,<attenuation>,<pitch>,[attenuation_rate],[pitch_rate])
- [MANDATORY] <aliasname> The sound alias to play
- [MANDATORY] <attenuation> The desired volume attenuation
- [MANDATORY] <pitch> The desired pitch
- [OPTIONAL] [attenuation_rate] The desired attenuation rate
- [OPTIONAL] [pitch_rate] The desired pitch rate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: set pitch and volume per entity/alias
EXAMPLE: car SetLoopState( "peugeot_idle_low", 0.5, 1.0, 0.5, 0.2 )
void SetMapCenter(<mapCenter>)
- [MANDATORY] <mapCenter> The map center
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the center of the map (used by the network code to optimize position data)
EXAMPLE: SetMapCenter( level.mapCenter )
void SetMapLatLong(<mapX>,<mapY>,<longitude>,<latitude>)
- [MANDATORY] <mapX> map X coordinate for which the longitude is given
- [MANDATORY] <mapY> map Y coordinate for which the longitude is given
- [MANDATORY] <longitude> world longitude of the given map position
- [MANDATORY] <latitude> world latitude of the given map position
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the map's real world latitude & longitude and their corresponding map coordinates.
EXAMPLE: SetMapLatLong( 1000, 500, -118.448689, 34.021566 )
void <player> SetMatchFlag(<flag bit>,<value>)
- [MANDATORY] <flag bit> The flag bit to change
- [MANDATORY] <value> The new value of the bit
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Flags a bit in the match state
EXAMPLE: SetMatchFlag( "bomb_timer", "1" )
void SetMatchTalkFlag(<flag bit>,<value>)
- [MANDATORY] <flag bit> The flag bit to change
- [MANDATORY] <value> The new value of the bit
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Flags a bit in the match talk state
EXAMPLE: SetMatchTalkFlag( "DeadChatWithDead", "1" )
void <entity> SetMaterialOverride(<surfaceName>)
- [MANDATORY] <surfaceName> The new material
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the material override
EXAMPLE: self SetMaterialOverride("water")
void <entity> SetmaxHealth(<health>)
- [MANDATORY] <health> The new max health
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the max health of this entity
EXAMPLE: self SetMaxHealth( required_amount )
void SetMiniMap(<material>,<upperLeftX>,<upperLeftY>,<lowerRightX>,<lowerRightY>)
- [MANDATORY] <material> Sets the material
- [MANDATORY] <upperLeftX> Upper left X value
- [MANDATORY] <upperLeftY> Upper left Y value
- [MANDATORY] <lowerRightX> Lower right X value
- [MANDATORY] <lowerRightY> Lower right Y value
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the minimap bounds and material
EXAMPLE: setMiniMap(material, northwest[0], northwest[1], southeast[0], southeast[1])
void <missile> SetMissileBrake(<flag>)
- [MANDATORY] <flag> True to enable or disable missile brake.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Tells a remote missile to disable brake
EXAMPLE: missile DisableMissileBrake( true )
void <missile> SetMissileCoasting(<flag>)
- [MANDATORY] <flag> True to start coasting at reduced speed.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Tells a remote missile to start coasting at a reduced speed.
EXAMPLE: missile SetMissileCoasting( true )
void <missile> SetMissileOwner(player)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the missile entity owner.
EXAMPLE: grenade SetMissileOwner( player )
void <turret> SetMode(<mode>)
- [MANDATORY] <mode> The turret mode. Possible modes are "auto_ai", "manual", "manual_ai" and "auto_nonai
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the mode of a turret.
EXAMPLE: turret SetMode( "auto_ai" )
void <entity> SetModel(<model alias>)
- [MANDATORY] <model alias> Name of the model
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the model for the entity
EXAMPLE: raps_meteor SetModel( "veh_t7_drone_raps" )
void <entity> SetMoveSpeedScale(<speed scale multiplier>)
- [MANDATORY] <speed scale multiplier> The speed scale multiplier (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the speed scale multiplier for the entity
EXAMPLE: self SetMoveSpeedScale( HOLDING_CRATE_MOVEMENT_SPEED )
void SetMovingPlatformEnabled()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enbles the moving platfrom.
EXAMPLE: platform SetMovingPlatformEnabled( true )
void <player> SetNearestEnemyScrambler(<cent>)
- [MANDATORY] <cent> scrambler centity
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the nearest enemy scrambler
EXAMPLE: player AddEnemyScrambler( scrambler )
void SetNemesisXUID(<nemesisXuidString>)
- [MANDATORY] <nemesisXuidString> The Nemesis XUID string
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the Nemesis XUID
EXAMPLE: player setNemesisXuid( player.pers["nemesis_xuid"] )
void SetNodePriority(<node>,<enable>)
- [MANDATORY] <node> (node) A priority allowed node.
- [MANDATORY] <enable> (boolean) True if this node is enabled.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enable or disable the priority for this node.
void <entity> SetNormalHealth(<normal health>)
- [MANDATORY] <normal health> Health in normalized form. Range 0 - 1
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set health of entity. Input health is normalized.
EXAMPLE: self SetNormalHealth( 0.8 )
void <entity> SetNoSunShadow()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the no-sunshadow flag.
EXAMPLE: helicopter SetNoSunShadow()
void SetObjectivePointStatus(<objective_index>,<team>,<percent>)
- [MANDATORY] <objective_index> The objective index in the matchstate
- [MANDATORY] <team> The team of the objective
- [MANDATORY] <percent> Percentage completed
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Objective status set in the match state
EXAMPLE: SetObjectivePointStatus( 1, "allies", 80 )
void <turret_or_vehicle> SetOnTargetAngle(<angle>,[gunnerIndex])
- [MANDATORY] <angle> In degrees (float)
- [OPTIONAL] [gunnerIndex] Which gun, 0-3.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the angle range at which the turret_on_target notify will occur.
EXAMPLE: boat SetOnTargetAngle( 0, 15 )
void <entity> SetOwner(player)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the entity owner.
EXAMPLE: grenade SetOwner( player )
void SetPauseWorld(<pause>)
- [MANDATORY] <pause> Whether or not to pause the world
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: pauses playback of animations and effects, but doesn't affect the server tick the way slomo does
EXAMPLE: SetPauseWorld( 1 )
void <trigger> SetPerkForTrigger(<perk name>)
- [MANDATORY] <perk name> The name of the perk that the trigger will respond to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the perk that the player must have for this trigger will react to
EXAMPLE: self SetPerkForTrigger( "specialty_fastinteract" )
void <entity> SetPlayerCollision(<on_off>)
- [MANDATORY] <on_off> True for on and false for off
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Use to turn on off the collision with the player.
EXAMPLE: self SetPlayerCollision( true )
void <player> SetPlayerCurrentObjective(<objective_index>,<objective_type>)
- [MANDATORY] <objective_index> The objective index in the matchstate
- [MANDATORY] <objective_type> Type of the objective
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current objective information on the player
EXAMPLE: SetPlayerCurrentObjective( "flag_a", 1 )
void <player> SetPlayerCurrentStreak(<current streak>)
- [MANDATORY] <current streak> The current kill streak count
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the current kill streak count on the player
EXAMPLE: SetPlayerCurrentStreak( 3 )
void <player> SetPlayerGravity(<gravity>)
- [MANDATORY] <gravity> The gravity to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the gravity override value for the player.
EXAMPLE: player SetPlayerGravity( 600 )
void SetPlayerIgnoreRadiusDamage(<flag>)
- [MANDATORY] <flag> true to ignore radius damage, false otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the player to take or ignore radius damage
EXAMPLE: SetPlayerIgnoreRadiusDamage( true )
void <turret> SetPlayerSpread(<spread>)
- [MANDATORY] <spread> The spread of the turret in degrees
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the spread of this turret when used by the player
EXAMPLE: roof_turret SetPlayerSpread( 0.2 )
void <player> SetPlayerStateLoadoutBonusCards(<custom Class>)
- [MANDATORY] <custom Class> Class Num
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the player state to have bonus card info, for codcaster to view it
EXAMPLE: self SetPlayerStateLoadoutBonusCards( class_num )
void <player> SetPlayerStateLoadoutWeapons(<custom Class>)
- [MANDATORY] <custom Class> Class Num
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the player state to have primary and secondary weapon info, for codcaster to view it
EXAMPLE: self SetPlayerStateLoadoutWeapons( class_num )
void SetRenderInThirdPersonSpectate(<enable>)
- [MANDATORY] <enable> Enable or disable redering the entity in 3rd person
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: render the entity when spectated in 3rd person.
EXAMPLE: SetRenderInThirdPersonSpectate( true )
void SetReviveHintString(<hint string>,[team])
- [MANDATORY] <hint string> The hint string that will be displayed to the player that has the perk
- [OPTIONAL] [team] The team to show the hint to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the revive hint string to show to all or to a team.
EXAMPLE: self.revivetrigger setReviveHintString( &"GAME_BUTTON_TO_REVIVE_PLAYER", self.team )
void SetRoundsPlayed(<value>)
- [MANDATORY] <value> The number of rounds played
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set rounds played in match state
EXAMPLE: SetRoundsPlayed( game["roundsplayed"] )
void <entity> SetSAnim(<string anim name>,<int>,[float time])
- [MANDATORY] <string anim name> name of a SANIM asset
- [OPTIONAL] [string shot name] shot name of the sub animation to play, pass in <int> 0 to play the first one.
- [OPTIONAL] [float time] frame to start playing on, default is 0.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the anim shot to play on a static model
EXAMPLE: thing SetSAnim( anim, shot, 1 )
void <entity> SetScale(<scale>)
- [MANDATORY] <scale> The scale factor. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the model scale on a script mover.
EXAMPLE: entity SetScale(2.0)
void <turret> SetScanningPitch(<pitch>)
- [MANDATORY] <pitch> of the turret (up and down) in degrees.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the pitch that the turret attempts to use while scanning for enemies.
EXAMPLE: turret SetScanningPitch( -45 )
void SetScoreboardColumns(<column1>,[...])
- [MANDATORY] <column1> to <column5>
- [OPTIONAL] [...] More columns if needed.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the scoreboard columns.
EXAMPLE: SetScoreboardColumns( "score", "kills", "deaths", "kdratio", "assists" )
void <non_player_entity> SetScriptMoverFlag(<flag_number>)
- [MANDATORY] <flag_number>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets flag 0-7 on the script mover ent.
EXAMPLE: some_script_model SetScriptMoverFlag( 1 )
void SetScriptStreamBias(<bias>)
- [MANDATORY] <bias> Streaming bias (0 is the highest importance)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the base importance of materials being forced from script
EXAMPLE: setScriptStreamBias( 1.0 )
void <player> SetSessStat(<stat path>)
- [MANDATORY] <stat path> The path to the stat to set the value for.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indicated stat
EXAMPLE: self SetSessStat( "byteStat", 0, 12 )
void setshaderconstant(<localClientNum>,<index>,<x>,<y>,<z>,<w>)
- [MANDATORY] <localClientNum> Local client for which to set the shader constant
- [MANDATORY] <index> An 0-based index that refers to a previously-mapped shader constant(see MapShaderConstant)
- [MANDATORY] <x> A float value, x component of the shader constant
- [MANDATORY] <y> A float value, y component of the shader constant
- [MANDATORY] <z> A float value, z component of the shader constant
- [MANDATORY] <w> A float value, w component of the shader constant
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the value of a previously-mapped shader constant
EXAMPLE: ent setshaderconstant( 0, "shaderColor" , 0, 0, 0, 0)
void SetSharedViewPort(<mode>)
- [MANDATORY] <mode> true if shared viewport, false for independent (default splitscreen behavior)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the view mode to either shared or independent, shared combines all views into a single shared viewport, modifies the way input is handled, and places the camera into scripted camera mode (i.e. control it with script).
EXAMPLE: SetSharedViewPort(true)
void SetShowcaseWeaponPaintshopXUID()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the showcase weapon paintshop XUID for the given local client num
EXAMPLE: SetShowcaseWeaponPaintshopXUID( localClientNum, xuid )
void SetSkipTos(<skipto>)
- [MANDATORY] <skipto> The skipto name
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set skip tos
EXAMPLE: SetSkiptos( ToLower( skipto ) )
void SetSlowMotion(<startTimescale>,[endTimescale],[deltaTime])
- [MANDATORY] <startTimescale> The initial timescale.
- [OPTIONAL] [endTimescale] The final timescale. Default to 1.
- [OPTIONAL] [deltaTime] The time to go from start to end timescale. Default to 1. (in seconds)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: sets the current slow motion timescale interpolation.
EXAMPLE: SetSlowMotion( 1.0, 0.25, 0.5 )
void SetSModelSAnimShot(<target name>,<int>,[time],[loop],[append],[blend],[frames to blend])
- [MANDATORY] <target name> target name of the static model or <int index> The index of the static model or <array int indices> The indices of the static models (string)
- [OPTIONAL] [shot name] shot name of the sub animation to play, pass in <int> 0 to play the first one. (string)
- [OPTIONAL] [time] frame to start playing on, pass in -1 to use the static model random frame, this is the default. (float)
- [OPTIONAL] [loop] this is unused, looping is set in the asset editor. (integer)
- [OPTIONAL] [append] If !0 the animation will be played after the current animation(s), any loop flags in current animations are ignored. If 0, it will replace the current and any appended animation with the current one.(integer)
- [OPTIONAL] [blend] If !0 new animation will blend into the new one. default is 0 (integer)
- [OPTIONAL] [frames to blend] If number of frames to blend over (float)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the anim shot to play on a static model
EXAMPLE: SetSModelSAnimShot("tiny_bot_blend", "", -1, true, false, true, 5*30)
void <entity> SetSonarAttachmentEnabled(<enable>)
- [MANDATORY] <enable> true/false
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sonar attachment to be enabled or disabled
EXAMPLE: entity SetSonarAttachmentEnabled(false)
void SetSoundContext(<type>,<value>)
- [MANDATORY] <type> The type of context
- [MANDATORY] <value> The value for that type
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound context
EXAMPLE: SetSoundContext ("ringoff_plr", "outdoor"); //for weapon decay's
void <entity> SetSoundEntContext(<type>,<value>)
- [MANDATORY] <type> Sound Context type
- [MANDATORY] <value> Sound Context value
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the entity sound context
EXAMPLE: car SetSoundEntContext("type", "value")
void SetSoundPitch(<playbackId>,<pitch>)
- [MANDATORY] <playbackId> The sound id
- [MANDATORY] <pitch> The new pitch
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound pitch
void SetSoundPitchRate(<playbackId>,<pitchRate>)
- [MANDATORY] <playbackId> The sound id
- [MANDATORY] <pitchRate> The new pitch rate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound pitch rate
void SetSoundVolume(<playbackId>,<attenuation>)
- [MANDATORY] <playbackId> The sound id
- [MANDATORY] <attenuation> The attenuation of the sound
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound volume
void SetSoundVolumeRate(<playbackId>,<attenuationRate>)
- [MANDATORY] <playbackId> The sound id
- [MANDATORY] <attenuationRate> The new volume rate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound volume rate
void <player> SetSpawnClientFlag(<flag>)
- [MANDATORY] <flag> Flag to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set a flag on a client's spawn client data in the spawning system.
EXAMPLE: player SetSpawnClientFlag( "SCDFL_DISABLE_LOGGING" )
void SetSpawnPointRandomVariation(<variation>)
- [MANDATORY] <variation> random range will be [0, variation]
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Random value will be added into the spawn point weighting calculation.
EXAMPLE: SetSpawnPointRandomVariation( 10 )
void SetSpawnPointsBaseWeight(<team mask>,<objective position>,<angle>,<score>)
- [MANDATORY] <team mask> teams that this command will affect
- [MANDATORY] <objective position> Position of the objective that will be used in the facing calculations
- [MANDATORY] <angle> max angle that will be accepted
- [MANDATORY] <score> additional score that will be applied
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: If the spawn point is facing the objective position then it will have an additional score applied
EXAMPLE: SetSpawnPointsBaseWeight( team_mask, point, 30, 100 )
void <entity> SetStableMissile(<flag>)
- [MANDATORY] <flag> Set to true if the stable flag should be set. False otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the stable missile flag of the entity
EXAMPLE: self SetStableMissile( true )
void <player> SetStance(<stance>)
- [MANDATORY] <stance> The stance. Possible values are 'crouch', 'prone' and 'stand'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the stance of the player. It only works for the player.
EXAMPLE: player SetStance( "stand" );\
void <entity> SetStepTriggerSound(<sound alias>)
- [MANDATORY] <sound alias> The sound name
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound that is triggered by steps
EXAMPLE: trigPlayer SetStepTriggerSound(self.script_label + suffix)
void <entity> SetStowedWeapon(<weaponName>)
- [MANDATORY] <weaponName> The weapon name to attach (string).
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the stowed weapon for the player
EXAMPLE: self SetStowedWeapon( "mp40_mp" )
void SetStreamerRequest(<slot>,<name>)
- [MANDATORY] <slot> Request slot
- [MANDATORY] <name> Name of the streamer hint asset
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Put a streamer hint asset into a request slot (0-7)
EXAMPLE: setStreamerRequest(0, "apple_pie")
void <vehicle> SetStunned(<stunned>)
- [MANDATORY] <stunned> True/false stun state
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Puts the vehicle or takes the vehicle out of stun mode. Only works for nitrous vehicles.
EXAMPLE: vehicle SetStunned( 0, true )
void <turret> SetTargetEntity(<target>)
- [MANDATORY] <target> the turret target
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the target of this turret
EXAMPLE: roof_turret SetTargetEntity( target )
void <turret_or_vehicle> SetTargetOrigin(<origin>)
- [MANDATORY] <origin> the turret target origin
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the target origin of this turret or vehicle weapon
EXAMPLE: roof_turret SetTargetOrigin( origin )
void <entity> SetTeam(team)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the entity team.
EXAMPLE: panzer SetTeam( team )
void <trigger> SetTeamForTrigger(<team name>)
- [MANDATORY] <team name> The name of the team that the trigger will respond to. Must be either 'axis', 'allies', 'team3' or 'none'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the team that this trigger will react to
EXAMPLE: self SetTeamForTrigger( game["attackers"] )
void SetTeamReviveIcon(<team>,<material>)
- [MANDATORY] <team>
- [MANDATORY] <material> The icon to use
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the revive icon used by particular teams
EXAMPLE: SetTeamReviveIcon( "allies", "waypoint_revive_cdc_zm" )
void SetTeamSatellite(<team>,<availability>)
- [MANDATORY] <team> The name of a team. Must be either Must be 'axis', 'allies', 'team3' or 'none'.
- [MANDATORY] <availability> Whether the team has Satellite; defaults to false
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a team has Spyplane or not
EXAMPLE: SetTeamSatellite( "allies", true )
void SetTeamScore(<team>,<score>)
- [MANDATORY] <team> The name of a team. Must be either 'axis' or 'allies' or 'team3'.
- [MANDATORY] <score> The new team score
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set a team's score
EXAMPLE: SetTeamScore( "allies", 100 )
void SetTeamSpyplane(<team>,<availability>)
- [MANDATORY] <team> The name of a team. Must be either Must be 'axis', 'allies', 'team3' or 'none'.
- [MANDATORY] <availability> Whether the team has Spyplane; defaults to false
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a team has Spyplane or not
EXAMPLE: SetTeamSpyplane( "allies", true )
void SetThirdPerson(<onOff>)
- [MANDATORY] <onOff> set third person mode to this value
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the camera mode to third person if true
EXAMPLE: SetThirdPerson( true )
void <entity> SetTmodeProvider(<value>)
- [MANDATORY] <value> (int) 1-enable 0-disable
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables (or disables) the actor to provide tmode traces to the player.
EXAMPLE: entity SetTmodeProvider( 1 )
void SetTopDownCameraYaw(<yaw_angle>)
- [MANDATORY] <yaw_angle> The yaw angle to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the top down camera yaw that is used in DOA to get the player controls to work correctly in bgpmove.
EXAMPLE: SetTopDownCameraYaw( 180 )
void SetTopScorer(<index>,<player>,<taunt>,<gesture0>,<gesture1>,<gesture2>,<weapon>,<weapon render options>,<acvi>)
- [MANDATORY] <index> position [0..2] of the player
- [MANDATORY] <player> player who is the top scorer
- [MANDATORY] <taunt> players selected taunt index
- [MANDATORY] <gesture0> players selected gesture type 0 index
- [MANDATORY] <gesture1> players selected gesture type 1 index
- [MANDATORY] <gesture2> players selected gesture type 2 index
- [MANDATORY] <weapon> players weapon
- [OPTIONAL] <weapon render options> players weapon renderoptions
- [OPTIONAL] <acvi> players attachment cosmetic variant indexes
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the top scorer for the end game screen.
EXAMPLE: SetTopScorer( 0, player, weapon, renderoptions, acvi)
void <turret> SetTurretAccuracy()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Currently does nothing.
EXAMPLE: roof_turret SetTargetAccuracy()
void <turret> SetTurretCarried(<flag>)
- [MANDATORY] <flag> True if the turret is being carried
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a turret is being carried.
EXAMPLE: turret SetTurretCarried( true )
void <entity> SetTurretMinimapVisible(<flag>)
- [MANDATORY] <flag> True if the turret is visible on the minimap
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets whether a turret is visible on the minimap.
EXAMPLE: sentry SetTurretMinimapVisible( true )
void SetTurretNode(<node>,<turret>)
- [MANDATORY] <node> The turret node to connect to the turret
- [MANDATORY] <turret> The turret to connect to the node
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this turretnode to use this turret.
EXAMPLE: SetTurretNode( node, turret )
void <turret> SetTurretOwner(player)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the turret entity owner.
EXAMPLE: turret SetTurretOwner( player )
void <turret> SetTurretSpinning(<onoff>)
- [MANDATORY] <onoff> Turn it on or off (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the minigun spin for the turret on this entity. Works for vehicles also.
EXAMPLE: roof_turret SetTurretSpinning( true )
void <turret> SetTurretType(string, "sentry" or "tow")
- [MANDATORY] string, "sentry" or "tow"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the turret Type, Sentry or TOW.
EXAMPLE: turret SetTurretType( "sentry" )
void <entity> SetUnderwaterVisionSet(<visionNameUnderwater>)
- [MANDATORY] <visionNameUnderwater> name of the vision set
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the vision when underwater
EXAMPLE: entity SetUnderwaterVisionSet("visionName")
void SetupClientFieldAnimSpeedCallbacks()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Registers a code callback for each of the given clientfield names in a field pool.
EXAMPLE: SetupClientFieldAnimSpeedCallbacks( "world", 1, "flag_a_owner" )
void setupclientfieldcodecallbacks()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Registers a LUI code callback for each of the given clientfield names in a field pool.
EXAMPLE: SetupClientFieldLuiCodeCallbacks( "world", 1, "flag_a_owner" )
void SetupClientFieldLuiCodeCallbacks()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Registers a LUI code callback for each of the given clientfield names in a field pool.
EXAMPLE: SetupClientFieldLuiCodeCallbacks( "world", 1, "flag_a_owner" )
void SetupFieldOpsKitLoadouts(<mapname>)
- [MANDATORY] <mapname> The map to load the field ops kits for
CATEGORY:
CLIENT/SERVER: Both
SUMMARY: Sets up all the field ops custom classes (using slots 6 through 9)
EXAMPLE: SetupFieldOpsKitLoadouts( mapname )
void <player> SetViewAngleResistance(<right arc>,<left arc>,<top arc>,<bottom arc>,[snap to])
- [MANDATORY] <right arc> Angle to resist against the right plane of the view cone.
- [MANDATORY] <left arc> Angle to resist against the left plane of the view cone.
- [MANDATORY] <top arc> Angle to resist against the top plane of the view cone.
- [MANDATORY] <bottom arc> Angle to resist against the bottom plane of the view cone.
- [OPTIONAL] [snap to] false when the resistance will be blended to over time. True by default.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the zones in the player's view cone in which resistance will be applied in the direction of the view limit
EXAMPLE: level.player SetViewAngleResistance( 40, 40, 20, 0, 0 )
void <player> SetViewModelDepthOfField(<start>,<end>)
- [MANDATORY] <start> Start DOF ( >= 0 )
- [MANDATORY] <end> End DOF ( >= 0 )
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the view model depth of field of the player
EXAMPLE: self SetViewModelDepthOfField(0,1000)
void <entity> SetVisibleToAll()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Make the entity visible to all players
EXAMPLE: trigger SetVisibleToAll()
void <entity> SetVisibleToAllExceptTeam(<team>)
- [MANDATORY] <team> Which to teams not to show this entity too
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set self visible to all teams except the selected teams
EXAMPLE: plane SetVisibleToAllExceptTeam( self.team )
void <entity> SetVisibleToPlayer(<player>)
- [MANDATORY] <player> The player to set the entity visible to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Make the entity visible to the player
EXAMPLE: trigger SetVisibleToPlayer( self )
void <entity> SetVisibleToTeam(<team>)
- [MANDATORY] <team> Which to show this entity to
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set self visible only to selected team
EXAMPLE: plane SetVisibleToSquad( self.team )
void SetVisionSetForPlayer(<visionset name>,[transition time])
- [MANDATORY] <visionset name> Vision set to transition into (string)
- [OPTIONAL] [transition time] How long, in seconds, to take transitioning to the new vision set if a transition is possible. Default is one second. (float)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Specify the server override visionset and the transition time into it.
EXAMPLE: player SetVisionSetForPlayer( "mortar_thermal", 1.5 )
void SetVolFog(<startDist>,<halfwayDist>,<halfwayHeight>,<baseHeight>,<red>,<green>,<blue>,<transition time>,<startDist>,<halfwayDist>,<halfwayHeight>,<baseHeight>,<red>,<green>,<blue>,<fogColorScale>,<sunFogRed>,<sunFogGreen>,<sunFogBlue>,<sunFogDirX>,<sunFogDirY>,<sunFogDirZ>,<sunFogStartAng>,<sunFogEndAng>,<fog max opacity>,<transition time>)
- [MANDATORY] <startDist> The distance, in world units, at which the fog begins.
- [MANDATORY] <halfwayDist> The distance at which the scene will be 50% fogged.
- [MANDATORY] <halfwayHeight> The height at which the scene will be 50% fogged.
- [MANDATORY] <baseHeight> The ground-level Z position at which the fog will start from.
- [MANDATORY] <red> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <green> The green component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <blue> The blue component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <transition time> transition time in seconds
- [MANDATORY] <startDist> The distance, in world units, at which the fog begins.
- [MANDATORY] <halfwayDist> The distance at which the scene will be 50% fogged.
- [MANDATORY] <halfwayHeight> The height at which the scene will be 50% fogged.
- [MANDATORY] <baseHeight> The ground-level Z position at which the fog will start from.
- [MANDATORY] <red> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <green> The green component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <blue> The blue component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <fogColorScale> The scaler for the colors as a value between 1 and 10000.0
- [MANDATORY] <sunFogRed> The red component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <sunFogGreen> The green component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <sunFogBlue> The blue component of the fog as a value between 0.0 and 1.0
- [MANDATORY] <sunFogDirX> The X component of the fog direction as a value between -1.0 and 1.0
- [MANDATORY] <sunFogDirY> The Y component of the fog direction as a value between -1.0 and 1.0
- [MANDATORY] <sunFogDirZ> The Z component of the fog direction as a value between -1.0 and 1.0
- [MANDATORY] <sunFogStartAng> The starting angle of the sun fog as a value between 0 and 180
- [MANDATORY] <sunFogEndAng> The ending angle of the sun fog as a value between 0 and 180
- [MANDATORY] <fog max opacity> The maximum opacity of the fog as a value between 0 and 1
- [MANDATORY] <transition time> transition time in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Creates an exponential fog.
EXAMPLE: SetVolFog(0.0001144, 0.01, 131/255, 116/255, 71/255, 0)
void SetVoteNoCount(<no count>)
- [MANDATORY] <no count> Number of 'no' votes
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the number of No votes
void SetVoteString(<string>)
- [MANDATORY] <string> The vote string
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the string for a vote
void SetVoteTime(<time>)
- [MANDATORY] <time> The vote time in ms
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the start time for a vote
void SetVoteYesCount(<no count>)
- [MANDATORY] <no count> Number of 'yes' votes
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the number of Yes votes
void <entity> SetWaterDisturbanceParams(<force>,<length>,<width>,<damping>,<angle>)
- [MANDATORY] <force> The force of the disturbance influences the height and size of the wave
- [MANDATORY] <length> How long the wave is in the direction of travel
- [MANDATORY] <width> How wide the wave is (across direction of travel)
- [MANDATORY] <damping> How much the wave damps the water after it travels; larger values (>1) will cause the wave to leave very little wake, smaller values will leave lots of disturbance behind the wave. Keep > 0.
- [MANDATORY] <angle> The angle of the surge line in degrees; 0 -> +X
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets parameters describing the water disturbance created by the (script mover) entity
EXAMPLE: self SetWaterDisturbanceParams( 0.5, 500, 1500, 0.2, 70 )
void <player> SetWaterDrops(<count>)
- [MANDATORY] <count> Number of water drops (should be >= 0)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets water drops equal to the count
EXAMPLE: self SetWaterDrops( 3 )
void SetWaveWaterEnabled(<water name>,<enable>)
- [MANDATORY] <water name> The name of the water affected, or empty string for all
- [MANDATORY] <enable> whether water should be visible
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Makes a water completely appear or disappear
EXAMPLE: SetWaveWaterEnabled( "huge_lake", true )
void SetWaveWaterGeneratorAmplitude(<generator name>,<amplitude>)
- [MANDATORY] <generator name> The generator name
- [MANDATORY] <amplitude> The amplitude for the generator
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the wave water amplitude of the generator.
EXAMPLE: SetWaveWaterGeneratorAmplitude( "exampleGenerator", 1.1 )
void SetWaveWaterHeight(<water name>,<height>)
- [MANDATORY] <water name> The name of the water affected, or empty string for all
- [MANDATORY] <height> The new height value in world coordinates
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the height of one or all waters in a level
EXAMPLE: SetWaveWaterHeight( "huge_lake", 15.0 )
void <entity> SetWeapon(<weapon>)
- [MANDATORY] <weapon> The weapon to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the weapon of the entity. The entity should not be a player
EXAMPLE: killcamEnt SetWeapon( self.weapon )
void SetWeaponCosts(<local client num>,<weapon>,<weaponCost>,<ammoCost>,<playerAmmoCost>)
- [MANDATORY] <local client num> The local client num
- [MANDATORY] <weapon> The weapon to add
- [MANDATORY] <weaponCost> Cost to buy the weapon
- [MANDATORY] <ammoCost> Cost to buy ammo
- [MANDATORY] <playerAmmoCost> Cost to buy ammo through secret shopper
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Sets the cost of a weapon for use by prompts
EXAMPLE: SetWeaponCosts( weapon, weapon.cost, weapon.ammoCost, weapon.secretshopperCost )
void <entity> SetWeaponOptions(<weaponOptions>)
- [MANDATORY] <weaponOptions> The weapon options to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the previously calculated weapon options of the entity. The entity should not be a player
EXAMPLE: killcamEnt SetWeaponOptions( weapon_options )
void <entity> SetWeaponRenderOptions(<camo index>,<reticle index>,<show player tag>,<show emblem>,<show paintshop>)
- [MANDATORY] <camo index>
- [MANDATORY] <reticle index>
- [MANDATORY] <show player tag>
- [MANDATORY] <show emblem>
- [MANDATORY] <show paintshop>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the weapon render options in the entity.
EXAMPLE: level.weapon_clientscript_model SetWeaponRenderOptions( level.camo_index, level.reticle_index, level.show_player_tag, level.show_emblem, level.show_paintshop )
void SetWinningPlayer(<player>)
- [MANDATORY] <player> The player to set as the winning player
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a player to be the winner
void SetWinningTeam(<team>)
- [MANDATORY] <team> The team name of the winning team. Must be 'axis', 'allies' or 'none'
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets a team to be the winner
void <client> SetWorldFogActiveBank(<bankMask>)
- [MANDATORY] <bankMask> Active bank
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets world fog volumes active bank mask.
EXAMPLE: self setworldfogactivebank(1)
void <entity> SetZBarrierColModel(<model>)
- [MANDATORY] <model> The model.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the collision model for a zbarrier.
EXAMPLE: ent SetZBarrierColModel("p6_anim_zm_barricade_board_collision")
void <entity> SetZBarrierPieceState(<piece number>,<state>,[animation scalar])
- [MANDATORY] <piece number> The piece index.
- [MANDATORY] <state> State to set - valid states are open, opening, closed and closing.
- [OPTIONAL] [animation scalar] Valid range 0.1 - 2.0, changes the playback speed of the animation in the set state - numbers less than 1.0 are faster.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set's the state of the piece indexed in the zbarrier ent. States are open, opening, closed and closing.
EXAMPLE: ent SetZBarrierPieceState(1, "open", 0.8)
void <actor> SetZombieName()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set this actors name
EXAMPLE: guy SetZombieName( "zombie11" )
void ShellShock(<shellshockname>,<duration>,[allowReduceShellShockPerk])
- [MANDATORY] <shellshockname>
- [MANDATORY] <duration> duration in seconds. The duration must be between 0 and 60 seconds.
- [OPTIONAL] [allowReduceShellShockPerk] true if shell shock perk should be reduced
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start a shell shock sequence for the entity for given duration.
EXAMPLE: self shellShock( "frag_grenade_mp", 0.2 )
void <turret> ShootTurret()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Shoots a turret
EXAMPLE: roof_turret ShootTurret()
void ShootUp(<float>)
- [MANDATORY] <float> upwards velocity
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gives an entity vertical movement
EXAMPLE: betty ShootUp( 350 )
void <player> ShouldDoInitialWeaponRaise(<weapon>,<bool shouldDoRaise>)
- [MANDATORY] <weapon> The weapon to set the first raise anim state for
- [MANDATORY] <bool shouldDoRaise> Whether the weapon should do the initial raise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set weaponstate to force or prevent first raise animation the next time the player switches to it. Only works if the player currently has it
EXAMPLE: old_state = self ShouldDoInitialWeaponRaise( "ak47", false )
void <entity> Show()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show the entity
EXAMPLE: self Show()
void <entity> ShowAllParts()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show all parts of an entity.
EXAMPLE: self ShowAllParts()
void ShowInfoVolume(<entnum>,[rgb color],[alpha])
- [MANDATORY] <entnum> The entity number of the info volume
- [OPTIONAL] [rgb color] The rgb color that the info volume will be drawn with
- [OPTIONAL] [alpha] The alpha that the info volume will be drawn with
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables an info volume to be drawn with the specified color
EXAMPLE: InfoVolumeDebug_ShowVolume( info_volume GetEntityNumber(), ( 0.2, 0.2, 0.5 ), 0.5 )
void ShowMiscModels(<targetname>)
- [MANDATORY] <targetname> targetname of misc model(s).
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show all misc models with this targetname
EXAMPLE: ShowMiscModels( "crash_destruct" )
void <entity> ShowPart(<tagname>,[modelname],[bApplyToChildren])
- [MANDATORY] <tagname> The tag to show. All surfaces with a vertex weighted to the tag will be shown. (string)
- [OPTIONAL] [modelname] The optional model name to help specify the part location. (string)
- [OPTIONAL] [bApplyToChildren] Optional flag to specify if we should apply the operation to children bones as well. (boolean)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show part of an entity.
EXAMPLE: self ShowPart( "tag_weapon", "weapon_saw" )
void <entity> ShowToPlayer(<player>)
- [MANDATORY] <player> The player to show the entity to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show the entity to a given client
void <entity> ShowToTeam(<team>)
- [MANDATORY] <team> The team to show the entity to.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Show the entity to a particular team
EXAMPLE: self ShowToTeam( team )
void <entity> ShowZBarrierPiece(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Allows the indexed piece to be drawn.
EXAMPLE: ent ShowZBarrierPiece(1)
void <entity> SiegeCmd(<string cmd>,[string cmd])
- [MANDATORY] <string cmd> cmd to execute.
- [OPTIONAL] [string cmd] more cmd's...
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Apply a number of anim commands on a siege model
EXAMPLE: thing SiegeCmd( "set_shot", "myshot", "unpause
void <entity> SightConeTrace(<sight position>,[ignore entity],<sight position>,[cone angle])
- [MANDATORY] <sight position> The point the sight starts at
- [OPTIONAL] [ignore entity] An entity to ignore when doing the traces
- [OPTIONAL] [cone forward] The forward direction of the cone, whose base is at the <sight position>. Must be normalized.
- [OPTIONAL] [cone angle] Angle in degrees from the line of sight to the edge of the cone. Defaults to 65.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines how much the entity can be seen from the given position, using the same check that is used by grenades. Performs multiple sight traces and returns an approximation to how much of the entity is visible from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially visible.
EXAMPLE: tankVisibilityFraction = tank SightConeTrace( player.origin, player, player.angles, 65)
void SightTracePassed(<start>,<end>,<hit characters>,<ignore entity>)
- [MANDATORY] <start> The bullet start point
- [MANDATORY] <end> The bullet end point
- [MANDATORY] <hit characters> An entity to ignore
- [MANDATORY] <ignore entity> An entity to ignore
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does a sight trace from start to end. Returns true if doesnt hit anything
EXAMPLE: passed = SightTracePassed( player.origin + ( 0, 0, 64 ), self.origin + ( 0, 0, 64 ), false, undefined )
void SModelAnimCmd(<target>,<cmd>,[cmd])
- [MANDATORY] <target> target name of the static model or <int index> The index of the static model or <array int indices> The indices of the static models (string)
- [MANDATORY] <cmd> cmd to execute. (string)
- [OPTIONAL] [cmd] more cmd's... (string)
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Apply a number of anim commands on a siege model
EXAMPLE: SModelAnimCmd("targetName","pause")
void SnapshotAcknowledged(<array>)
- [MANDATORY] <array> The array returned by GetSnapshotIndexArray.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns 1 if all clients have acknowledged the snapshot or the timeout has expired. Otherwise returns undefined.
EXAMPLE: acked = SnapshotAcknowledged( snapindices )
void <ent> Solid()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the solid flag, so that this object is collidable.
EXAMPLE: self Solid()
void SoundExists(<soundName>)
- [MANDATORY] <soundName> The sound alias
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the given sound exists
EXAMPLE: if( SoundExists( soundAlias )) { //do something }
void SoundGetAlias(<soundId>)
- [MANDATORY] <soundId> the hashed sound id of the alias
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: The the string alias of a sound from the hashed sound id. Will return undefined if no sound is found
EXAMPLE: soundAlias = SoundGetAlias( soundId )
void SoundGetPlaybackTime(<soundName>)
- [MANDATORY] <soundName> The sound alias
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Get the playback time for the sound
EXAMPLE: playbackTime = SoundGetPlaybackTime( "evt_infection_record_oneshot" )
void SoundLineEmitter(<alias>,<origin 1>,<origin 2>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <origin 1> start point
- [MANDATORY] <origin 2> end point
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Play a sound from start point to end point
EXAMPLE: SoundLineEmitter( "wpn_micro_turret_loop", start, end )
void SoundLoopEmitter(<alias>,<position>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <position> The position to play sound at
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Play a sound loop at the position
EXAMPLE: SoundLoopEmitter("evt_beacon_loop_red", self.origin)
void SoundPlayAutoFX(<fxid>,<alias>,[offsetx],[offsety],[offset],[onground],[area],[threshold],[alias_override])
- [MANDATORY] <fxid> The ID of the FX you want to play alias off.
- [MANDATORY] <alias> Audio alias.
- [OPTIONAL] [offsetx] Offset x from effect origin to play the sound.
- [OPTIONAL] [offsety] Offset y from effect origin to play the sound.
- [OPTIONAL] [offset] Offset z from effect origin to play the sound.
- [OPTIONAL] [onground] Do a trace to ground to ensure audio is played above ground.
- [OPTIONAL] [area] If #threshold multiple effects of same id in target radius #area, play alias_override at center of fx instead.
- [OPTIONAL] [threshold] If #threshold multiple effects of same id in target radius #area, play alias_override at center of fx instead.
- [OPTIONAL] [alias_override] If #threshold multiple effects of same id in target radius #area, play alias_override at center of fx instead.
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: This function is used to play audio on createfx ents.
EXAMPLE: SoundPlayAutoFX( "fx_fire_barrel", "amb_fire_small", 5, -10, 5, false, 20, 5, "amb_fire_large" )
void SoundPlaying(<playbackId>)
- [MANDATORY] <playbackId> The sound id
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns true if the sound given by sound id is playing
EXAMPLE: while( soundplaying( soundId ) )
void SoundRattle(<origin>,<minDist>,[maxDist])
- [MANDATORY] <origin> The position
- [MANDATORY] <minDist> The min distance to play sound
- [OPTIONAL] [maxDist] The max distance to play sound
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the rattle sound's origin, min distance and max distance
EXAMPLE: soundrattle(origin,min,max)
void SoundRattleSetup(<alias>,<position>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <position> The position to play sound at
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Play a rattle sound at the position
EXAMPLE: SoundRattleSetup(rattles[i].script_sound, rattles[i].origin)
void SoundSetMusicState(<state id>)
- [MANDATORY] <state id> The state identifier
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the music state for the sound
EXAMPLE: SoundSetMusicState( state_id )
void SoundStopLineEmitter(<alias>,<origin 1>,<origin 2>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <origin 1> start point
- [MANDATORY] <origin 2> end point
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Stops the sound playing from start point to end point
EXAMPLE: SoundStopLineEmitter( "wpn_micro_turret_loop", start, end )
void SoundStopLoopEmitter(<alias>,<position>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <position> The position
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Stop the sound loop emitter at the position
EXAMPLE: SoundStopLoopEmitter("evt_beacon_loop_green", self.origin)
void SoundTimeScale(<time>)
- [MANDATORY] <time> The new time scale
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Set the sound time scale
EXAMPLE: SoundTimeScale( 1.1 )
void SoundUpdateLineEmitter(<alias>,<previous origin 1>,<previous origin 2>,<origin 1>,<origin 2>)
- [MANDATORY] <alias> The sound alias name
- [MANDATORY] <previous origin 1> start point
- [MANDATORY] <previous origin 2> end point
- [MANDATORY] <origin 1> start point
- [MANDATORY] <origin 2> end point
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Updates the sound playing from previous start point to previous end point
EXAMPLE: SoundUpdateLineEmitter( "wpn_micro_turret_loop", previousStart, previousEnd, start, end )
entity Spawn(<classname>,<origin>,[spawnflags])
- [MANDATORY] <classname> The classname of the entity to spawn
- [MANDATORY] <origin> The position to spawn at
- [OPTIONAL] [spawnflags] Optional spawn flags (up to 5)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawn an entity.
EXAMPLE: Spawn( "trigger_radius", trigger_origin )
entity SpawnActor(<AIType>,<origin>,<angles>,[targetname],[forcespawn],[fullyaware],[spawnerEnt])
- [MANDATORY] <AIType> AI type (constant string)
- [MANDATORY] <origin> The position of the vehicle (vector)
- [MANDATORY] <angles> The angle to spawn the vehicle at (vector)
- [OPTIONAL] [targetname] sets the targetname of the spawned entity
- [OPTIONAL] [forcespawn] forces a guy to spawn even if the spawn may be visible to the player
- [OPTIONAL] [fullyaware] gives the AI full awareness of all enemies
- [OPTIONAL] [spawnerEnt] if passed in, then the fields of the spawnerEnt will be duplicated to the newly spawned actor
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns an actor from an actor spawner, if possible (the spawner won't spawn if the player is looking at the spawn point, or if spawning would cause a telefrag)
EXAMPLE: spawned = SpawnActor( "spawner_bo3_soldier_ally_sniper_tool", origin, angles, "george", false )
entity SpawnCollision(<modelname>,<targetname>,<origin>,<angles>)
- [MANDATORY] <modelname> The name of the model to spawn (constant string)
- [MANDATORY] <targetname> target name (constant string)
- [MANDATORY] <origin> The position of the collision (vector)
- [MANDATORY] <angles> The angle to spawn the collision at (vector)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns a script mover thats used only for collision
void spawndynent(<model>,<origin>,<angles>)
- [MANDATORY] <model> The model of the dynent
- [MANDATORY] <origin> The position
- [MANDATORY] <angles> The angles
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Spawn a dynent
EXAMPLE: twig = spawndynent( "trashcan", origin, angles )
entity <actor_or_vehicle_spawner> SpawnFromSpawner([targetname],[forcespawn],[makeroom],[infinitespawn],[classnameOverride])
- [OPTIONAL] [targetname] sets the targetname of the spawned entity
- [OPTIONAL] [forcespawn] forces a guy to spawn even if the spawn may be visible to the player
- [OPTIONAL] [makeroom] will remove an undeletable entity if necessary to spawn a new one
- [OPTIONAL] [infinitespawn] don't increment the spawn count
- [OPTIONAL] [classnameOverride] override the spawner's classname
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns an actor or vehicle from a spawner, if possible (the spawner won't spawn if the player is looking at the spawn point, or if spawning would cause a telefrag) Unsupplied optional fields will use flag values from the entity
EXAMPLE: spawned = spawnerent SpawnFromSpawner( "george", false )
entity SpawnFX(<fx name>,<position>,[forward],[up])
- [MANDATORY] <fx name> Name of the fx. Fx has to be cached
- [MANDATORY] <position> Position to play the fx at
- [OPTIONAL] [forward] The forward vector of the fx
- [OPTIONAL] [up] The up vector of the fx
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawn an FX
EXAMPLE: fx = SpawnFx( level._effect[player.light_playFX], monkey.origin + (0,0,-12),(1,0,0),(0,0,1) )
entity SpawnHelicopter(<owner>,<origin>,<angles>,<vehicle name>,<model name>)
- [MANDATORY] <owner> the owner entity
- [MANDATORY] <origin> the location
- [MANDATORY] <angles> the angles
- [MANDATORY] <vehicle name> the vehicle name
- [MANDATORY] <model name> the model name
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns a helicopter
EXAMPLE: heliGuard = spawnHelicopter( self, startPos, startAng, "heli_guard_mp" , "veh_t6_drone_overwatch_light" )
void <entity> SpawnNapalmGroundFlame(<origin>,<weapon>,<direction>,[time])
- [MANDATORY] <origin> The origin of the flame
- [MANDATORY] <weapon> The weapon
- [MANDATORY] <direction> The direction of the flame
- [OPTIONAL] [time] The time to live
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawn a napalm ground flame at the origin with the direction.
EXAMPLE: self SpawnNapalmGroundFlame( bot_pos , weapon, forward)
pathnode SpawnPathNode(<classname>,<origin>,<angles>,[key1],[value1],[key2],[value2])
- [MANDATORY] <classname> The class name
- [MANDATORY] <origin> The origin
- [MANDATORY] <angles> The view angles
- [OPTIONAL] [key1] Key 1
- [OPTIONAL] [value1] Value for key 1
- [OPTIONAL] [key2] Key 2
- [OPTIONAL] [value2] Value for key 2
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawn a dynamically created path node or cover node
EXAMPLE: node = SpawnPathNode( cover_left, origin, angles )
entity SpawnPlane(<player>,<classname>,<origin>,[spawnflags])
- [MANDATORY] <player> the owner
- [MANDATORY] <classname> class of entity
- [MANDATORY] <origin> location to spawn at
- [OPTIONAL] [spawnflags] optional spawn flags
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns a plane at the origin
EXAMPLE: plane = spawnplane( owner, "script_model", origin )
void SpawnStruct()
CATEGORY:
CLIENT/SERVER: Server
entity SpawnTimedFX(<weapon>,<origin>,[direction> default (0,0,1),[time],[team])
- [MANDATORY] <weapon> weapon to spawn fx on
- [MANDATORY] <origin> the position to spawn fx at
- [OPTIONAL] [direction> default (0,0,1)
- [OPTIONAL] [time] default 10 seconds
- [OPTIONAL] [team] defaults to TEAM_FREE
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns a broadcast entity that plays an oriented timed FX using the weapon's property projExplosionEffect
EXAMPLE: ent = SpawnTimedFX( smokeGrenade, position, directionUp, duration )
void SpawnTurret()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unsupported function. Do not use.
entity SpawnVehicle(<vehicletype>,<origin>,<angles>,[targetname],[destructibledef])
- [MANDATORY] <vehicletype> vehicle type (constant string)
- [MANDATORY] <origin> The position of the vehicle (vector)
- [MANDATORY] <angles> The angle to spawn the vehicle at (vector)
- [OPTIONAL] [targetname] vehicle target name (constant string)
- [OPTIONAL] [destructibledef] The destructibledef to use to make this vehicle a destructible
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Spawns a new vehicle and returns a reference to it
void StartBinocs(<player>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start Binoculars on player
EXAMPLE: player StartBinocs()
void <entity> StartFadingBlur(<blur_amount>,<time>)
- [MANDATORY] <blur_amount> The initial blur amount. The value is pixels for Gaussian blur at 640x480. Must be a floating point value greater than 0.
- [MANDATORY] <time> Time in seconds, how long the fade out will take
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Blurs the screen, then fades out the blur to 0, over a period of time.
EXAMPLE: player StartFadingBlur( 3, 2 )
void <turret> StartFiring()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Starts a turret firing
EXAMPLE: turret StartFiring()
void StartMission(<mission_index>)
- [MANDATORY] <mission_index> index of the mission name to start - mission names can be retrieved by calling GetMissions to return the available mission array
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start the (server side) mission script for the specified mission - all loading (on all clients) should be completed before calling - use client side LoadMission to load missions
EXAMPLE: StartMission()
void StartPoisoning(<player>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start poisoning player
EXAMPLE: player StartPoisoning()
void <player_or_playercorpse> StartRagdoll([immediate])
- [OPTIONAL] [immediate] Start the ragdoll immediately and don't do the velocity capture on the client.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Begin ragdoll physics for this entity. Does nothing if the entity is already a ragdoll.
EXAMPLE: self StartRagdoll()
void StartResurrectViewAngleTransition()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Finishes the flashback
EXAMPLE: self StartResurrectViewAngleTransition()
void StopAllLoopSounds([fade])
- [OPTIONAL] [fade] The fade out time
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Stops a loop sound
EXAMPLE: car StopAllLoopSounds( 0.5 )
void StopAllRumbles()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop all the rumbles playing right now
EXAMPLE: StopAllRumbles()
void <entity> StopAnimScripted([blend],[ImmediateStop])
- [OPTIONAL] [blend] The blend out time for the animation
- [OPTIONAL] [ImmediateStop] Stop the animation immediatly on the client side (no client/server time sync)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Halts animscript on this entity.
EXAMPLE: self StopAnimScripted()
void StopBinocs(<player>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop Binoculars on player
EXAMPLE: player StopBinocs()
void StopDemoRecording()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops demo recording
EXAMPLE: Demo_End()
void <turret> StopFiring()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops a turret firing
EXAMPLE: turret StopFiring()
void StopForceStreamingMaterial(<material>)
- [MANDATORY] <material> Material to stop force streaming
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the streamer to load the texture LODs for a material even if it isn't yet visible. Returns true when all levels are loaded. Call StopForceStreamingMaterial when you no longer need it, or Steve will be upset that you're wasting Streamer memory.
EXAMPLE: StopForceStreamingMaterial( material )
void StopForceStreamingXModel(<model>)
- [MANDATORY] <model> The model to stop force streaming
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the streamer to load model and texture LODs for a model even if it isn't yet visible. Returns true when all levels are loaded. Call StopForceStreamingXModel when you no longer need it, or Steve will be upset that you're wasting Streamer memory.
EXAMPLE: areAllForcedLodsLoaded = CScr_StopForceStreamingXModel( model )
void StopForcingStreamer()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Remove all streamer forcing
EXAMPLE: StopForcingStreamer()
void <player> StopJukeMove()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops the player juke movement in progress
EXAMPLE: player StopJukeMove()
void <entity> StopLoopSound([fadetime])
- [OPTIONAL] [fadetime] Time to fade the sound in. Range is between 1 and 31 inclusive.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops the looping sound with an optional fadetime.
EXAMPLE: m_chasm stoploopsound( 5 )
void StopMission()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: fire Mission_Stop event to terminate the current mission
EXAMPLE: StopMission()
void <model_origin_brushmodel> StopMoveSlide()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops the movement caused by MoveSlide().
EXAMPLE: self StopMoveSlide()
void StopPoisoning(<player>)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop poisoning player
EXAMPLE: player StopPoisoning()
void <entity> StopRumble(<rumble name>)
- [MANDATORY] <rumble name> The name of the rumble to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Plays a looping rumble on the given entity.
EXAMPLE: self StopRumble( "damage_heavy" )
void <player> StopShellShock()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops the shell shock sequence for the player
EXAMPLE: player StopShellShock()
void <turret> StopShootTurret()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stops a turrent from firing.
EXAMPLE: roof_turret StopShootTurret()
void StopSound()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop a particular sound on an entity *WARNING*, You must have a wait between StopSounds() and delete() or the sound will not stop.
EXAMPLE: beatBox StopSound("alias");
void <entity> StopSounds()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop all sounds on an entity. *WARNING*, You must have a wait between StopSounds() and delete() or the sound will not stop.
EXAMPLE: beatBox StopSounds()
void StreamerModelHint(<modelname>,<duration>)
- [MANDATORY] <modelname> The name of the model.
- [MANDATORY] <duration> Length of time (in seconds) to keep it loaded.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Force a model to be loaded for a set period of time.
EXAMPLE: streamerModelHint( "c_hro_hendricks_base_fb", 10 )
void StreamerNotify(<id>)
- [MANDATORY] <id> integer value indicating the current streamer notify
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Send a streamer notify to the server indicating that the streamer is ready
EXAMPLE: StreamerNotify(1)
void StreamerRequest(<command>,<name>)
- [MANDATORY] <command> "set", "clear" or "play"
- [MANDATORY] <name> Name of the streamer hint asset
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Streamer request
EXAMPLE: streamerRequest( "set", "ramses_igc1" )
void StreamerSkiptoDebug()
CATEGORY:
CLIENT/SERVER: Server
void StreamTextureList(<name>)
- [MANDATORY] <name> Texturelist to stream
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Specify a texture list file for the streamer to load
EXAMPLE: StreamTextureList( "igc1" )
void SubtitlePrint(<localClientNum>,<msec>,<subtitle>)
- [MANDATORY] <localClientNum> The localClientNum to flush the subtitles for
- [MANDATORY] <msec> The time to display the subtitle for
- [MANDATORY] <subtitle> The message to display
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: print to the subtitle channel
EXAMPLE: SubtitlePrint( 0, 100, "zombies everywhere")
void SwitchMap_Load(<map name>)
- [MANDATORY] <map name> the name of the map to preload
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start loading a map/level.
EXAMPLE: SwitchMap_Load( "cp_sh_cairo", "coop", 0 )
void SwitchMap_Preload(<map name>)
- [MANDATORY] <map name> the name of the map to preload
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start preloading a map/level. A 'switchmap_preload_finished' notify is sent to the level when its finished.
EXAMPLE: SwitchMap_Preload( "cp_sh_cairo" )
void SwitchMap_SetLoadingMovie(<movie_name>)
- [MANDATORY] <movie_name> The name of the movie
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the loading movie to play
EXAMPLE: SwitchMap_SetLoadingMovie( str_intro_movie )
void SwitchMap_Switch()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Switch to the loaded map/level
EXAMPLE: SwitchMap_Switch()
void Target_BoundingIsUnderReticle(<player>,<target entity>,<maxDistance>)
- [MANDATORY] <player> The player entity
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <maxDistance> The maximum distance to check for target intersection
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player's cursor is roughly inside of the target's bounding box.
EXAMPLE: player Target_BoundingIsUnderReticle( player, enemy_chopper, 1000 )
void Target_ClearReticleLockOn()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Cancels any lock-on sequence on the hud.
EXAMPLE: Target_ClearReticleLockOn()
entity Target_GetArray()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets an array of entities that are set as targets
EXAMPLE: mytargets = Target_GetArray()
void Target_GetOffset(<entity>)
- [MANDATORY] <entity> The entity that is the target
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Gets the target offset
EXAMPLE: offset = Target_GetOffset( entity )
void Target_IsInCircle(<target entity>,<player>,<fov>,<radius>,[zoffset])
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <player> The player entity
- [MANDATORY] <fov> The player's field of view
- [MANDATORY] <radius> radius of the circle, centered at the center of the screen
- [OPTIONAL] [zoffset] if entity is not in target array, use optional zoffset for target pos
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether a target is within a given radius from the center of the player's screen
EXAMPLE: player Target_IsInCircle( enemy_chopper, player, 65, 100 )
void Target_IsInRect(<target entity>,<player>,<fov>,<halfwidth>,<halfheight>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <player> The player entity
- [MANDATORY] <fov> The player's field of view
- [MANDATORY] <halfwidth> half the width of the rectangle
- [MANDATORY] <halfheight> half the height of the rectangle
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether a target is within a given rectangle, centered in the center of the player's screen
EXAMPLE: player Target_IsInRect( enemy_chopper, player, 65, 100, 100 )
void Target_IsTarget(<entity>)
- [MANDATORY] <entity> The entity to check
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether an entity has been marked as a target
EXAMPLE: if ( Target_IsTarget( foundEnt ) ) ...
void Target_OriginIsInCircle(<origin>,<player>,<fov>,<radius>)
- [MANDATORY] <origin> The origin to test
- [MANDATORY] <player> The player entity
- [MANDATORY] <fov> The player's field of view
- [MANDATORY] <radius> radius of the circle, centered at the center of the screen
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns whether a target is within a given radius from the center of the player's screen
EXAMPLE: player Target_IsInCircle( enemy_chopper, player, 65, 100 )
void Target_Remove(<target entity>)
- [MANDATORY] <target entity> The entity that is the target
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Removes a target
EXAMPLE: Target_Remove( enemy_chopper )
void Target_ScaleMinMaxRadius(<target entity>,<player>,<fov>,<radius_min>,<radius_max>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <player> The player entity
- [MANDATORY] <fov> The player's field of view
- [MANDATORY] <radius_min> radius of the circle, centered at the center of the screen
- [MANDATORY] <radius_max> radius of the circle, centered at the center of the screen
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the ratio from 0-1 of where the target is in relation to the radius min and radius max
EXAMPLE: scale = Target_ScaleMinMaxRadius( target, self, level.hackerToolLockOnFOV, radiusInner, radiusOuter )
void Target_Set(<target entity>,[target offset])
- [MANDATORY] <target entity> The entity that is the target
- [OPTIONAL] [target offset] The offset of the target position from the entity's origin
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Adds a new target to draw on the hud
EXAMPLE: Target_Set( enemy_chopper )
void Target_SetAllowHighSteering(<target entity>,[bool])
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] [bool] true/false"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Target will allow incoming missiles to steer more making the target easier to hit
EXAMPLE: Target_SetAllowHighSteering( enemy_tank, true )
void Target_SetAttackMode(<target entity>,<mode name>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <mode name> "top" or "direct"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets how missiles and rockets should approach the target.
EXAMPLE: Target_SetAttackMode( enemy_tank, "top" )
void Target_SetJavelinOnly(<target entity>,<mode name>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <mode name> "top" or "direct"
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Target will only draw on player's hud when they are looking through the Javelin-weapon's site.
EXAMPLE: Target_SetJavelinOnly( enemy_tank, true )
void Target_SetOffscreenShader(<target entity>,<materialname>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <materialname> The shader for the quad drawn over the target
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the material that is used when a target clamps to the edge of the screen. The target must have already been created with target_set()
EXAMPLE: Target_SetOffscreenShader( enemy_chopper, "arrow" )
void Target_SetOffset(<target entity>,[target offset])
- [MANDATORY] <target entity> The entity that is the target
- [OPTIONAL] [target offset] The offset of the target position from the entity's origin
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the offset for a particular target
EXAMPLE: Target_SetOffset( enemy_chopper, ( 0, 0, -100 ) )
void Target_SetShader(<target entity>,<materialname>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <materialname> The shader for the quad drawn over the target
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Changes the material of a target. The target must have already been created with target_set()
EXAMPLE: Target_SetShader( enemy_chopper, "locked_on_shader" )
void Target_SetTurretAquire(<entity>,[bool])
- [MANDATORY] <entity> The entity to set the flag
- [OPTIONAL] [bool] false if you want the SAM turret to ignore the targe. default is true.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets if the target can be attacked by SAM turrets
EXAMPLE: Target_SetTurretAquire( chopper, false )
void Target_StartReticleLockOn(<target entity>,<duration>)
- [MANDATORY] <target entity> The entity that is the target
- [MANDATORY] <duration> The amount of time between now and fully locked-on, in seconds.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Begins the lock-on sequence for the target on the hud. This affects the animation of the vehicle reticle.
EXAMPLE: Target_StartReticleLockOn( enemy_chopper, 4 )
void TestSpawnPoint(<point>)
- [MANDATORY] <point> the point to test
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if the player would not be in a solid when spawned at the given point.
EXAMPLE: TestSpawnPoint( self.origin )
void <entity> TmodeSetServerUser(<value>)
- [MANDATORY] <value> (int) 1-using 0-not usuing
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: informs the server if the entity is using tmode
EXAMPLE: entity TmodeSetServerUser( 1 )
void ToggleNoVehicleFaceTraversability()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set whether the entity can use NoVehicleFaces. This should only be used in MP map for now.
void TracePassedOnNavMesh(<start>,<end>,[characterRadius],[materialFlags])
- [MANDATORY] <start> start of the trace
- [MANDATORY] <end> end of the trace
- [OPTIONAL] [characterRadius] the radius of the capsule used in trace. default to 0.
- [OPTIONAL] [materialFlags] the flags marking whether a face type can be used
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Run a trace on NavMesh to see if a character can go straight from start to end.
EXAMPLE: posOnNavMesh = TracePassedOnNavMesh( (10,20,30), 25, 15 )
void TracePoint(<start>,<end>)
- [MANDATORY] <start> Start point
- [MANDATORY] <end> End point
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Traces a poitn throught the world with MASK_SHOT. Returns hit position, hit surface normal.
EXAMPLE: trace = TracePoint( p0, p1 )
void <trigger> TriggerEnable(<flag>)
- [MANDATORY] <flag> True if trigger should be enabled, false otherwise
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables or disables the trigger
EXAMPLE: trig TriggerEnable( true )
void TriggerFX(<entity>,[time delay])
- [MANDATORY] <entity> The fx entity
- [OPTIONAL] [time delay] The time delay for the fx to play
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Trigger the fx after some time delay
EXAMPLE: triggerFx( domFlag.enemyBaseEffect, 0.001 )
void <trigger> TriggerIgnoreTeam()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Trigger ignores team
EXAMPLE: trig TriggerIgnoreTeam()
void <player_actor> Underwater()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: checks if the player or actor is underwater
EXAMPLE: if( player Underwater() ) ...
void <entity> Unlink()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unlinks a linked entity from another entity
EXAMPLE: guy Unlink()
void UnlinkNodes(<node1>,<node2>)
- [MANDATORY] <node1> first node to unlink
- [MANDATORY] <node2> second node to unlink
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disconnects node1 from node2. Call it again with arguments flipped if you want to completely disconnect the two nodes.
EXAMPLE: UnlinkNodes( node_moving_elev_left, node_moving_elev_right )
void UnlinkTraversal(<node>)
- [MANDATORY] <node> Negotiation begin node
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Destroys a user edge connecting two path nodes
EXAMPLE: UnlinkTraversal( beginNode )
void UnloadSiegeAnim(<anim_name>)
- [MANDATORY] <anim_name> Name of the siege anim to unload
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Unload a siege anim from memory
EXAMPLE: UnloadSiegeAnim( "flappy_bird" )
void <entity> UnlockSongByAlias(<aliasname>)
- [MANDATORY] <aliasname> The sound alias to play (string)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unlock the the sound alias
EXAMPLE: self UnlockSongByAlias( "frag_out" )
void UnSetTurretNode(<node>)
- [MANDATORY] <node> The turret node to disconnect
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unset the turret from this node.
EXAMPLE: UnSetTurretNode( node )
void UpdateClientNames()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Update all of the client names: only works in 'manual_change' mode
void UpdateNavTriggers()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Optimized code that performs the update_nav_triggers() script functionality
EXAMPLE: UpateNavTriggers()
void <entity> UpdateUnlockedAttachmentBits()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Updates client->unlockedAttachments
EXAMPLE: self UpdateUnlockedAttachmentBits()
void <player> UseAlternateAimParams()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Forces the local player to use alternate values for aim assist. Only works in zombie/campaign mode. Can only be called on players
EXAMPLE: self UseAlternateAimParams( )
void UseAlternateHud(<onOff>)
- [MANDATORY] <onOff> 0 = regular, 1 = alternate
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Use the alternate HUD in lui. Zombies only
void <entity> UseAnimTree(<anim tree>)
- [MANDATORY] <anim tree> The anim tree to set
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the anim tree for the entity
EXAMPLE: self UseAnimTree( #animtree )
void UseBuildKitWeaponModel(<player>,<weapon>,[camoIndex],<upgraded>)
- [MANDATORY] <player> The player whose build kit data will be used
- [MANDATORY] <weapon> The weapon to base the build kit on
- [OPTIONAL] [camoIndex] The index of the camo to override the build kit's camo with
- [OPTIONAL] <upgraded> bool whether this should be the upgraded version. If so extclip and fmj will be added
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Use a build kit weapon model
EXAMPLE: wall_weapon_model UseBuildKitWeaponModel( player, magicbox.weapon )
entity <entity> UseBy(<activator entity>)
- [MANDATORY] <activator entity>
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Uses the entity with the passed in entity as the activator
EXAMPLE: self UseBy( player )
void <player> UseServerVisionset(<use it>)
- [MANDATORY] <use it> Whether using the server override visionset
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Switches using the server supplied (via SetVisionSetForPlayer()) visionset.
EXAMPLE: player UseServerVisionset( true )
void <trigger> UseTriggerIgnoreUseHoldTime()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the require look at flag for the trigger
EXAMPLE: e_trig_mobile_armory UseTriggerIgnoreUseHoldTime()
void <trigger> UseTriggerRequireLookAt()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the require look at flag for the trigger
EXAMPLE: e_trig_plaza_igc UseTriggerRequireLookAt()
void <trigger> UseTriggerRequireLookToward()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the require look along flag for the trigger
EXAMPLE: e_trig_plaza_igc UseTriggerRequireLookToward()
void UseWeaponHideTags(<weaponName>)
- [MANDATORY] <weaponName> The name of the weapon to base the tags to hide on
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Hides tags on this entity based on the hidetags value of the provided weaponname
EXAMPLE: wall_weapon_model UseWeaponHideTags()
void UseWeaponModel(<weaponName>,[model],[weapon options])
- [MANDATORY] <weaponName> The name of the weapon to base the tags to hide on
- [OPTIONAL] [model] The name of a model to use. If none is specified the world model for the weapon will be used
- [OPTIONAL] [weapon options] The weapon options
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Use a weapon model
EXAMPLE: wall_weapon_model UseWeaponModel("m16_zm")
void Vibrate(<direction vector>,<amplitude>,<period>,<time>)
- [MANDATORY] <direction vector> The direction of the vibration
- [MANDATORY] <amplitude> The amount of the vibration in degrees
- [MANDATORY] <period> The period of the vibration in seconds
- [MANDATORY] <time> The length of time of the vibration in seconds
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Causes a script entity to vibrate, rotating around its origin, along a given vector dir
EXAMPLE: self Vibrate( directionVir, 0.3, 0.4, 1.0 )
void VideoPause(<name>)
- [MANDATORY] <name> name of movie to pause. do not add a file suffix (like .mp4)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Pause video playback
EXAMPLE: VideoPause( "MyAwesomeMovie" )
void VideoPrime(<name>,<loop>)
- [MANDATORY] <name> name of movie to play. do not add a file suffix (like .mp4)
- [OPTIONAL] <loop> Set this to true if the movie should automatically restart when it reaches the end.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Preload the first second of a movie. Call this several seconds before the movie needs to play to prevent any delay
EXAMPLE: VideoPrime( "MyAwesomeMovie" )
void VideoStart(<name>,<loop>)
- [MANDATORY] <name> name of movie to play. do not add a file suffix (like .mp4)
- [OPTIONAL] <loop> Set this to true if the movie should automatically restart when it reaches the end.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Start a video for playback on an in-game surface
EXAMPLE: VideoStart( "MyAwesomeMovie" )
void VideoStop(<name>)
- [MANDATORY] <name> name of movie to stop. do not add a file suffix (like .mp4)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Stop a video being played on an in-game surface
EXAMPLE: VideoStop( "MyAwesomeMovie" )
void VideoUnpause(<name>)
- [MANDATORY] <name> name of movie to pause. do not add a file suffix (like .mp4)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Unpause video playback
EXAMPLE: VideoUnpause( "MyAwesomeMovie" )
void <player> ViewKick(<damage>,<origin>)
- [MANDATORY] <damage> The damage to inflict
- [MANDATORY] <origin> The origin of the kick
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Give the player a view kick
EXAMPLE: entity ViewKick( 25, self.origin )
void ViewmodelHasTag(<local_client_num>,<tag>)
- [MANDATORY] <local_client_num> The client number
- [MANDATORY] <tag> The tag to see if it exists on the current weapon
CATEGORY:
CLIENT/SERVER: Client
void VisionSetLastStand(<vision name>,[transition time])
- [MANDATORY] <vision name> Vision to transition to.
- [OPTIONAL] [transition time] How long, in seconds, to take transitioning to the new vision set if a transition is possible. Default is one second.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets players' laststand vision. Optionally give a transition time from the current vision.
EXAMPLE: VisionSetLastStand( "armada", 1.5 )
void VisionSetLerpRatio(<float>)
- [MANDATORY] <float> ratio between 0 and 1
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determines if you can see an item. Checks distance and view cone before the trace to increase efficency.
EXAMPLE: self VisionSetLerpRatio ( currentDistance / maxDistance )
void VisionSetNaked(<name>,[duration])
- [MANDATORY] <name> The vision set name
- [OPTIONAL] [duration] The duration of the vision
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Set the vision and its duration
EXAMPLE: VisionSetNaked( "cp_igc_chinatown_intro", 0.05 )
void VrIsActive()
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns whether the game is currently in VR mode.
EXAMPLE: do_vr_stuff = VrIsActive() ...
void <player> WalkUnderwater(<boolean>)
- [MANDATORY] <boolean> true if player should walk underwater. False if player should swim
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets if a player should walk while underwater
EXAMPLE: depth = get_players()[0] WalkUnderwater( true )
void <player> WeaponCyclingEnabled()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Determine if weapon cycling is enabled for the player
EXAMPLE: enabled = player WeaponCyclingEnabled()
void WeaponFriendlyHacking(<localClientNum>,<localClientNum>)
- [MANDATORY] <localClientNum> Local client number of the player
- [MANDATORY] <localClientNum> Weapon to check
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Returns the value of the friendlyHacking bit on the specified weapon of the specified player
EXAMPLE: currentWeapon = GetCurrentWeapon( localClientNum )
void WeaponHasAttachment()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does the weapon have all the attachments specified?
EXAMPLE: WeaponHasAttachment( weapon, "extbarrel", "damage, "fmj" )
void WeaponHasAttachmentAndUnlocked(<weapon>,<string>)
- [MANDATORY] <weapon> weapon
- [MANDATORY] <string> string id for attachment
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Does the weapon have all the attachments specified? And are they all unlocked for challenge stat purposes?
EXAMPLE: player WeaponHasAttachmentAndUnlocked( weapon, "extbarrel", "damage, "fmj" )
void WorldEntNumber()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns the entity number for the world
void <entity> WorldToLocalCoords(<world coords>)
- [MANDATORY] <world coords> The point in world coordinates (vector3)
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Transform the given world point into the local space of the entity
EXAMPLE: local_point = self WorldToLocalCoords( world_point )
void WorldTrace(<start>,<end>)
- [MANDATORY] <start> The trace start point
- [MANDATORY] <end> The trace end point
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Trace from start to end
EXAMPLE: trace = WorldTrace( start_pos, end_pos )
entity <entity> ZBarrierGetPiece(<piece_index>)
- [MANDATORY] <piece_index> piece index to get
CATEGORY:
CLIENT/SERVER: Client
SUMMARY: Gets the entity for the zbarrier's given piece index
EXAMPLE: zbarrier ZBarrierGetPiece( 3 )
void <entity> ZBarrierPieceUseAlternateModel(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indexed piece to use the alternate model.
EXAMPLE: ent ZBarrierPieceUseAlternateModel(1)
void <entity> ZBarrierPieceUseAttachWeapon(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indexed piece to attach the zbarrier's weapon to tag_weapon (and tag_weapon_left if it's dual wield).
EXAMPLE: ent ZBarrierPieceUseAttachWeapon( 1 )
void <entity> ZBarrierPieceUseBoxRiseLogic(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indexed piece to use the box rise logic.
EXAMPLE: ent ZBarrierPieceUseBoxRiseLogic(1)
void <entity> ZBarrierPieceUseDefaultModel(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indexed piece to use the default model.
EXAMPLE: ent ZBarrierPieceUseDefaultModel(1)
void <entity> ZBarrierPieceUseUpgradedModel(<piece number>)
- [MANDATORY] <piece number> The piece index.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Sets the indexed piece to use the upgraded model.
EXAMPLE: ent ZBarrierPieceUseUpgradedModel(1)
void <entity> ZBarrierSupportsZombieReachThroughAttacks()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if this zbarrier supports zombie reach through attacks.
EXAMPLE: useAttack = ent ZBarrierSupportsZombieReachThroughAttacks()
void <entity> ZBarrierSupportsZombieTaunts()
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Returns true if this zbarrier supports zombie taunt anims.
EXAMPLE: useTaunt = ent ZBarrierSupportsZombieTaunts()
void ZeroGravityVolumeOff(<volume name>)
- [MANDATORY] <volume name> The volume name.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Disables Zero Gravity Volume.
EXAMPLE: ZeroGravityVolumeOff( "area_four" )
void ZeroGravityVolumeOn(<volume name>)
- [MANDATORY] <volume name> The volume name.
CATEGORY:
CLIENT/SERVER: Server
SUMMARY: Enables Zero Gravity Volume.
EXAMPLE: ZeroGravityVolumeOn( "area_four" )
void <sentient> AddSentientEventListener(<event>)
- [MANDATORY] <event> The event name
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Registers entity to listen to a specific event. Call waittill(<event>) to get the notification in script.
EXAMPLE: self AddSentientEventListener("bulletwhizby")
void <actor> aithrowgrenade()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first.
EXAMPLE: self GrenadeThrow()
void <actor> AllowPitchAngle(<on_off>)
- [MANDATORY] <on_off> 1 to allow and 0 to disallow
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Allows AI to pitch on stairs
EXAMPLE: guy AllowPitchAngle ( 1 )
void <entity> AnimMode(<mode>,[clear path])
- [MANDATORY] <mode> which animmode to use. Must be 'gravity', 'nogravity', 'angle deltas', 'pos deltas', 'normal', 'normal_nogravity', 'zonly_physics', 'nophysics', 'none'
- [OPTIONAL] [clear path] The clear path flag
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the way that animation deltas are interpreted by the game engine
EXAMPLE: self AnimMode( "gravity" )
NOTES: none: Use default animmode behavior (i.e., code controls the movement).
void <actor> AtDangerousNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determine whether this actor is near a dangerous node.
EXAMPLE: if ( ai atDangerousNode() )...
void <sentient> AttackedRecently(<entity>,<time>)
- [MANDATORY] <entity> The enemy entity
- [MANDATORY] <time> Time interval in seconds.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns true if given sentient has attacked the entity within last "time" sec.
EXAMPLE: self AttackedRecently(self.enemy)
void <actor> CalcApproximatePathToPosition(<position>,[clear path])
- [MANDATORY] <position> The goal position for the path
- [OPTIONAL] [clear path] True to clear path, false otherwise. Defaults to True
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns an array of world positions representing the approximate path an actor will take. Calculating an approximate path will cause the AI to clear their current path.
EXAMPLE: self CalcApproximatePathToPosition( position )
void <actor> CalcLookaheadPos(<startPos>,<numIter>)
- [MANDATORY] <startPos> Starting position of the lookahead traces
- [MANDATORY] <numIter> Number of times to iterate (more gives better results, but is more expensive). Set to 0 to get current lookahead.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Calculate a lookahead point based on a given starting location and number of iterations. Returns an array with these keys: "position", "node" and "next_node", which contain vectors for the actual lookahead position and the next two nodes on the path, respectively.
EXAMPLE: self CalcLookaheadPos( self.origin, 3 )
void <actor> CanAttackEnemyNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks if this actor can attack its enemies node.
EXAMPLE: self CanAttackEnemyNode()
void <sentient> CanSee(<target>,[cacheLength])
- [MANDATORY] <target> (entity) The entity to check.
- [OPTIONAL] [cacheLength] (integer) The cache length
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check to see if the AI can see the given entity.
EXAMPLE: if( self CanSee( player ) )
void <actor> CanShoot(<shoot at position>,[offset from gun])
- [MANDATORY] <shoot at position> (vector) The position to shoot at.
- [OPTIONAL] [offset from gun] (vector) The offset from the gun muzzle from which to calculate collision.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check to see if the actor can shoot the given position.
EXAMPLE: canShoot = self CanShoot( eye, offset )
void <actor> CanShootEnemy([cache duration])
- [OPTIONAL] [cache duration] (int) When set, uses a custom time value for the cache.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check to see if the actor can shoot his current enemy.
EXAMPLE: canShootEnemy = self CanShootEnemy()
void <actor> CanThrowGrenade(<hand offset>,<random range>)
- [MANDATORY] <hand offset> (vector) the estimated offset of the hand for the throw
- [MANDATORY] <random range> (float) random range from target position to throw at
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether the actor can throw a grenade at a given position. If he can't then result will be undefined, otherwise the result is the resultant velocity vector
EXAMPLE: throwvel = self CanThrowGrenade( armOffset, 0 )
void <actor> CanThrowGrenadePos(<hand offset>,<targetpos>)
- [MANDATORY] <hand offset> (vector) the estimated offset of the hand for the throw
- [MANDATORY] <targetpos> (vector) The target position, should be at ground level of potential target
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether the actor can throw a grenade at a given position. If he can't then result will be undefined, otherwise the result is the resultant velocity vector
EXAMPLE: throwvel = self CanThrowGrenadePos( armOffset, targetPos )
void <actor> CheckGrenadeThrow(<hand offset>,<method>,<random range>)
- [MANDATORY] <hand offset> (vector) the estimated offset of the hand for the throw
- [MANDATORY] <method> (string) The grenade toss method. Can be 'min energy', 'min time', and 'max tune'
- [MANDATORY] <random range> (float) random range from target position to throw at
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether the actor can throw a grenade at his target. If he can't then result will be undefined, otherwise the result is the resultant velocity vector
EXAMPLE: throwvel = self CheckGrenadeThrow( armOffset, "min energy", 0 )
void <actor> CheckGrenadeThrowPos(<hand offset>,<method>,<targetpos>)
- [MANDATORY] <hand offset> (vector) the estimated offset of the hand for the throw
- [MANDATORY] <method> (vector) The grenade toss method. Can be 'min energy', 'min time', and 'max tune'
- [MANDATORY] <targetpos> (vector) The target position, should be at ground level of potential target
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether the actor can throw a grenade at a given position. If he can't then result will be undefined, otherwise the result is the resultant velocity vector
EXAMPLE: throwvel = self CheckGrenadeThrowPos( armOffset, "min energy", targetPos )
void <actor> CheckProne(<position>,<yaw>,<is prone>)
- [MANDATORY] <position>(vector) The position of the prone character.
- [MANDATORY] <yaw>(float) The world yaw in degrees.
- [MANDATORY] <is prone>(bool) Flag if the character is already prone.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns true when a character can go prone at the specified position. Specifically setup for use by AI characters.
EXAMPLE: canFitProne = self CheckProne( origin, yaw, alreadyProne )
pathnode <actor> ChooseBetterCoverNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Chooses a better cover node for an ai
EXAMPLE: newNode = behaviorTreeEntity ChooseBetterCoverNode()
void <actor> ClearEnemy()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clear the actor's current enemy entity.
EXAMPLE: self ClearEnemy()
void <actor> ClearEntityOwner()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears an AI's entity owner.
EXAMPLE: self ClearEntityOwner()
void <actor> ClearEntityTarget()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears an AI's entity target.
EXAMPLE: self ClearEntityTarget( vehicle_entity )
void <actor> ClearFixedNodeSafeVolume()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears this actor's fixed node safe volume.
EXAMPLE: self ClearFixedNodeSafeVolume()
void <sentient> ClearForcedGoal()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears the forcedGoal for this AI's goal.
EXAMPLE: self ClearForcedGoal()
void <sentient> ClearGoalVolume()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears this actor's goal volume.
EXAMPLE: self ClearGoalVolume()
void <actor> ClearPath()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clears the AI's current path.
EXAMPLE: self ClearPath()
void <actor> ClearPitchOrient()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clear pitch orientation
EXAMPLE: self clearPitchOrient()
void <entity> ClearPotentialThreat(<dir>)
- [MANDATORY] <dir> direction of the threat. This is the angle from which the NPC should expect danger
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clear the potential threat direction. See SetPotentialThreat for more info on potential threats
EXAMPLE: self ClearPotentialThreat( 90 )
void <actor> ClearUsePosition()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Clear the override for the goal pos.
EXAMPLE: self ClearUsePosition()
void <actor> CollideWithActors((bool) Turn collision on or off.)
- [MANDATORY] (bool) Turn collision on or off.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Toggles collision with other actors. Actor will go through each other, when its toggled off.
EXAMPLE: entity CollideWithActors( true )
void CreateThreatBiasGroup(<name>)
- [MANDATORY] <name> threat bias group name.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Create a new threat bias group. If it already exists, do nothing
EXAMPLE: CreateThreatBiasGroup( "flanking_team" )
void <actor> DamageMode(<damage mode>)
- [MANDATORY] <damage mode> (const string) DamageMode must be 'normal' or 'next_shot_kills'
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the damage mode of this actor.
EXAMPLE: randAlly DamageMode("next_shot_kills")
entity <actor> DropWeapon(<weapon name>,<hand>,[velocity],[angular velocity],[scavenger])
- [MANDATORY] <weapon name> (string) The name of the weapon.
- [MANDATORY] <hand> (string) The tag to throw the weapon from.
- [OPTIONAL] [velocity] (vector) The initial velocity of the weapon.
- [OPTIONAL] [angular velocity] (vector) The initial angular velocity of the weapon.
- [OPTIONAL] [scavenger] (bool) If the weapon requires the player to have scavenger perk to pick up the weapon.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Drop the actor's weapon
EXAMPLE: self DropWeapon(self.weapon, self.anim_gunHand, throwVel)
pathnode <actor> FindBestCoverNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Find the best cover node for a given NPC given his state.
EXAMPLE: self FindBestCoverNode()
pathnode <actor> FindBestCoverNodes(<radius>,<origin>)
- [MANDATORY] <radius> search radius
- [MANDATORY] <origin> search origin
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Find the best cover nodes for a given NPC given his state. Sorted by best
EXAMPLE: nodes = self FindBestCoverNodes(radius,origin)
pathnode <actor> FindCoverNodeAtLocation(<radius>,<origin>)
- [MANDATORY] <radius> search radius
- [MANDATORY] <origin> search origin
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Finds a near by cover node for the character.
EXAMPLE: guy FindCoverNodeAtLocation(512,loc)
void <actor> FindReacquireDirectPath([ignore suppression])
- [OPTIONAL] [ignore suppression] Whether to ignore suppression when looking for a path. True makes a success more likely but may result in a more dangerous path.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Finds a path directly to the enemy. Call ReacquireMove to use the path.
void <actor> FindReacquireNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Finds a reacquire node when exposed.
EXAMPLE: guy FindReacquireNode()
void <actor> FindReacquireProximatePath([ignore suppression])
- [OPTIONAL] [ignore suppression] Whether to ignore suppression when looking for a path. True makes a success more likely but may result in a more dangerous path.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Finds a path to a point that can see the enemy without leaving goal. Call ReacquireMove to use the path.
entity <actor> FinishActorDamage(<Inflictor>,<Attacker>,<Damage>,<Damage Flags>,<Means Of Death>,<Weapon>,<Direction>,<Hit Loc>,<Damage Origin>,<Offset Time>,<Bone Index>,[Surface Type],[Surface Normal])
- [MANDATORY] <Inflictor> The entity that causes the damage.(e.g. a turret)
- [MANDATORY] <Attacker> The entity that is attacking.
- [MANDATORY] <Damage> Integer specifying the amount of damage done
- [MANDATORY] <Damage Flags> Integer specifying flags that are to be applied to the damage
- [MANDATORY] <Means Of Death> Integer specifying the method of death
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
- [MANDATORY] <Direction> (vector) The direction of the damage
- [MANDATORY] <Hit Loc> The location of the hit
- [MANDATORY] <Damage Origin> Position of the originator of the damage
- [MANDATORY] <Offset Time> The time offset for the damage
- [MANDATORY] <Bone Index> Index of nearest bone
- [OPTIONAL] [Surface Type] The surface type of the hit location
- [OPTIONAL] [Surface Normal] The surface normal at hit location
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Does damage to an actor - usually as part of the damage callback
EXAMPLE: self FinishActorDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, vDamageOrigin, psOffsetTime, iBoneIndex, iSurfaceType, vSurfaceNormal )
void <actor> ForceTeleport(<position>,[angles],[updategoalpos],[resetEntity])
- [MANDATORY] <position> (point) The actor's new position.
- [OPTIONAL] [angles] (vector) The actor's new angles.
- [OPTIONAL] [updategoalpos] (bool) Update the script goal position to the teleport location. True by default.
- [OPTIONAL] [resetEntity] (bool) Reset the entity behaviors.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Force Teleport the actor to a new position with the given origin and angles, regardless of wether it will be visible to the player or not.
EXAMPLE: self ForceTeleport( org, angles )
void <actor> GenerateRadioEvent(<type of event>)
- [MANDATORY] <type of event> The type of radio event
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Searches animation selector table and returns an animation alias based on current state of the blackboard.
EXAMPLE: self GenerateRadioEvent("radio_event_low")
void <actor> GetAimLimitsFromEntry()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Searches animation selector table and returns an animation alias based on current state of the blackboard.
void <actor> GetBehaviorTreeStatus()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns current status/BHTN_STATUS of the behavior tree for an actor.
EXAMPLE: isBehaviorTreeInRunningState = behaviorTreeEntity GetBehaviortreeStatus() == BHTN_RUNNING
void <sentient> GetClosestEnemySqDist()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the distance to the nearest enemy
EXAMPLE: dist = self GetClosestEnemySqDist()
NOTES: either AI or player
void <entity> GetDropToFloorPosition([position])
- [OPTIONAL] [position] test position. Defaults to entity's current origin
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Gets the floor position for dropping an AI or player to the ground. Returns undefined if the AI is in solid.
EXAMPLE: position = ai GetDropToFloorPosition( ai.origin )
void GetFinalPathPos()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the last position in the path
void <actor> GetFireMode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns the firemode
EXAMPLE: soldier GetFireMode()
entity <actor> GetFixedNodeSafeVolume()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get this actor's fixed node safe volume.
EXAMPLE: volume = self GetFixedNodeSafeVolume()
void <actor> GetFlashBangedStrength()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Retrieves how strongly the actor was initially hit by a flashbang. 1.0 is full strength, 0.0 is none at all.
EXAMPLE: flashedPercent = self GetFlashBangedStrength()
entity <sentient> GetGoalVolume()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get this actor's goal volume.
EXAMPLE: goalVolume = self GetGoalVolume()
void <actor> GetGroundEntType()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the entity type of the 'ground' that the actor is on.
EXAMPLE: self GetGroundEntType()
void <actor> GetHitEntType()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the type of entity that the actor has hit. Can be 'hit', 'obstacle' or 'world'.
EXAMPLE: self GetHitEntType()
void <actor> GetHitYaw()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the direction in degrees that the player has hit an obstacle at. Returns an error if nothing was hit.
EXAMPLE: self GetHitYaw()
void <sentient> GetIgnoreEnt(<sentient>)
- [MANDATORY] <sentient> Another sentient entity
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns if a specific sentient entity is ignored by this sentient entity or not
EXAMPLE: if ( aiGuy GetIgnoreEnt( player ) )
void GetNextFindBestCoverTime(<minEngageDist>,<maxEngageDist>,<noEnemyInterval>)
- [MANDATORY] <minEngageDist> Min engage enemy dist.
- [MANDATORY] <maxEngageDist> Max engage enemy dist.
- [MANDATORY] <noEnemyInterval> How often cover should be searched when without an enemy
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Generates a new next find cover time
EXAMPLE: behaviorTreeEntity.nextFindBestCoverTime = GetActorNextFindBestCoverTime( behaviorTreeEntity.engageMinDist, behaviorTreeEntity.engagemaxdist, behaviorTreeEntity.coversearchinterval )
void <actor> GetNodeOffsetAngles()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns the angles the actor thinks the node is facing, this can contain additional rotation from the node's actual angles.
EXAMPLE: self GetNodeOffsetAngles( self.node )
void <actor> GetNodeOffsetPosition()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns the position the actor thinks the node's origin is at, this can be offset from where the actual node's position in the world is.
EXAMPLE: self GetNodeOffsetPosition( self.node )
void <actor> GetOrientMode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the orient mode of this actor.
EXAMPLE: orientMode = randAlly GetOrientMode()
void <actor> GetPathLength()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Gets the length of the path being used by this actor
EXAMPLE: self GetPathLength()
void <actor> GetPathMode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the path mode of this actor.
EXAMPLE: pathMode = randAlly GetPathMode()
void <actor> GetPerfectInfo(<entity>,[update sight])
- [MANDATORY] <entity> An entity to become aware of. Must be a sentient (i.e. AI or player)
- [OPTIONAL] [update sight] If true then it will update the last seen position also.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Forces the AI to become aware of this entity regardless of whether it can be seen or not.
EXAMPLE: self GetPerfectInfo( get_players()[0] )
void <sentient> GetPersonalThreatBias(<sentient>,<enemy>)
- [MANDATORY] <sentient> Self
- [MANDATORY] <enemy> The enemy to get threat bias for
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: return the personal threat bias for this sentient versus the other sentient
EXAMPLE: value = self GetPersonalThreatBias( self.enemy )
pathnode <actor> GetReacquireNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Gets the reacquire node of this actor.
EXAMPLE: guy GetReacquireNode()
void <sentient> GetStealthSightValue(<otherSentient>)
- [MANDATORY] <otherSentient> other sentient you want to get the value on this sentient for
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the current stealth sight value for this sentient seeing another sentient (floating point from 0.0 to 1.0)
EXAMPLE: aiGuy GetStealthSightValue( forOtherGuy )
void GetThreatBias(<of group>,<against group>)
- [MANDATORY] <of group>(string) threat bias group for.
- [MANDATORY] <against group>(string) threat bias group against.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get threat bias of first group against second group
EXAMPLE: GetThreatBias( "axis", "flanking_team" )
void <entity> GetThreatBiasGroup()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Get the threat bias group of an AI or player
EXAMPLE: GetThreatBiasGroup()
void <actor> GetTurnExitYaw()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Predicts exit yaw vector using havok pathfinding.
void <actor> GrenadeThrow()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first.
EXAMPLE: self GrenadeThrow()
void <sentient> HasPath()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if AI has a path
EXAMPLE: self HasPAth()
void <actor> HasValidInterrupt(<interrupt name>)
- [MANDATORY] <interrupt name> The name of the interrupt
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return true if there is a valid interrupt with the given name alive on the current server frame.
EXAMPLE: if ( entity HasValidInterrupt("pain") )
void <actor> IsActorShooting(<entity>)
- [MANDATORY] <entity> An actor
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether this entity is an ai is shooting
EXAMPLE: if ( meanGuy IsActorShooting() ) ...
void <actor> IsApproachingGoal()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor at the goal or approaching the goal.
EXAMPLE: self IsApproachingGoal()
void <actor> IsAtCoverNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor is at cover node. (exposed node is considered as covernode)
EXAMPLE: self IsAtCoverNode()
void <actor> IsAtCoverNodeStrict()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor is at cover node. (exposed node is not considered as covernode)
EXAMPLE: self IsAtCoverNode()
void <actor> IsAtGoal()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor has at/reached its current goal, similar to waiting for "goal" notify.
EXAMPLE: self IsAtGoal()
void <entity> IsBadGuy()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns true if the sentient is on the bad guy team (not 'allies', not 'neutral').
EXAMPLE: if ( ai IsBadGuy() )
void <actor> IsCoverValid(<pathnode>)
- [MANDATORY] <pathnode> The pathnode to check for validity
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return true if the passed in node is a valid cover node.
EXAMPLE: if( self IsCoverValid( pathnode ) )
void <actor> IsCurrentBTActionLooping()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return true if there is an action running and its looping.
EXAMPLE: if( behaviorTreeEntity IsCurrentBTActionLooping() )
void <actor> IsDeflected()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check if the actor has been deflected.
EXAMPLE: self IsDeflected()
void <actor> IsFlankedAtCoverNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor is at is flanked at cover node
EXAMPLE: self IsFlankedAtCoverNode()
void <actor> IsGrenadePosSafe(<throw pos>,[radius])
- [MANDATORY] <throw pos> (vector) position to throw at
- [OPTIONAL] [radius] (float) safety radius
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks a grenade throw target position is safe.
EXAMPLE: if ( self IsGrenadeThrowSafe( throwPos, 200 ) )
void <actor> IsInAnyBadPlace()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns whether the AI is in a bad place.
EXAMPLE: self IsInAnyBadPlace()
void <sentient> IsInGoal(<point>)
- [MANDATORY] <point> which point to check.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determine whether a given point is in the actor's current goal area
EXAMPLE: if ( ai IsInGoal( point ) )
void <actor> IsInScriptedState()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks if actor is in a scripted state (animscripted, custom, negotiation)
EXAMPLE: self isInScripteState()
void <actor> IsKnownEnemyInRadius(<position>,<radius>)
- [MANDATORY] <position> center of radius to check.
- [MANDATORY] <radius> .
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks if there is a known enemy in a radius for an AI.
EXAMPLE: if ( self IsKnownEnemyInRadius( pos, radius ) ) ...
void <actor> IsKnownEnemyInVolume(<volume>)
- [MANDATORY] <volume> volume entity to check in.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks if there is a known enemy in a volume for an AI.
EXAMPLE: if ( self isKnownEnemyInVolume( volume ) )
void <actor> IsMoveSuppressed()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether this actor is in a suppressed state ( blocked by friendly fire ).
EXAMPLE: while ( self IsMoveSuppressed() )...
void <sentient> IsNoTarget()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns if the sentient is marked no target
EXAMPLE: if ( self IsNoTarget() )
NOTES: either AI or player
void <actor> IsPathDirect()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check whether the actor's current path is direct
EXAMPLE: self IsPathDirect()
void <actor> IsPosAtGoal()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if position is inside the current goal
EXAMPLE: self IsPosAtGoal(position)
void <sentient> IsPosInClaimedLocation()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if position is claimed by another sentient
EXAMPLE: self IsPosInClaimedLocation( position )
void <actor> IsSafeFromGrenade()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor is within a blast radius of a grenade.
EXAMPLE: self IsSafeFromGrenade()
void <actor> IsStanceAllowed(<stance>)
- [MANDATORY] <stance> (string) A stance, can be 'prone', 'crouch', 'stand'.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether this actor can go to the given stance.
EXAMPLE: if ( self IsStanceAllowed( "stand" ) )...
void <actor> IsSuppressed()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether this actor is in a suppressed state ( under fire ).
EXAMPLE: while ( self IsSuppressed() )...
void <actor> IsSuppressionWaiting()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Checks whether this actor is still doing suppression wait.
EXAMPLE: while ( self IsSuppressionWaiting() )...
void <sentient> IsThreateningMyProtectEntity(<target>)
- [MANDATORY] <target> (sentient) The sentient to check.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Returns true if the enemy is currently threatening my protect entity.
EXAMPLE: if ( self IsThreateningMyProtectEntity( self.enemy ) )
void <actor> Knockback(<true/false>)
- [MANDATORY] <true/false> if true, actor affected by knockback
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Turn knockback on and off for an actor
EXAMPLE: self Knockback( true )
void <sentient> LastKnownPos(<target>)
- [MANDATORY] <target> (sentient) The sentient to check.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return the last known pos of an AI.
EXAMPLE: if ( self lastKnownPos( player ) )
void <sentient> LastKnownTime(<target>)
- [MANDATORY] <target> (sentient) The sentient to check.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return the last time an AI was aware of target. Includes visibility and ai events like footstep, gunshot etc.
EXAMPLE: if( self lastKnownTime( player ) )
void <actor> LerpPosition(<origin>,<angles>)
- [MANDATORY] <origin>(vector) the position to interpolate to.
- [MANDATORY] <angles>(vector) the angles to interpolate to.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Interpolate an actor's position, and angles.
EXAMPLE: self LerpPosition( entry['origin'], entry['angles'] )
void <actor> MayMoveFromPointToPoint(<start>,<end>,[check drop],<Position>)
- [MANDATORY] <start> (point) start position.
- [MANDATORY] <end> (point) end position.
- [OPTIONAL] [check drop] checks if the point would cause the AI to drop. Defaults to true.
- [OPTIONAL] [check direct] checks if there are no obstructions between actor origin and <Position>.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check whether the actor can move from a given point to a given point. Does not check friendly fire and in goal radius unlike maymovetopoint
EXAMPLE: if ( !self MayMoveFromPointToPoint( startPoint endPoint ) )...
void <actor> MayMoveToPoint(<position>,[check drop],<Position>)
- [MANDATORY] <position> (point) The position that the actor may be able to move to.
- [OPTIONAL] [check drop] checks if the point would cause the AI to drop. Defaults to true.
- [OPTIONAL] [check direct] checks if there are no obstructions between actor origin and <Position>.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check whether the actor can move to a given point.
EXAMPLE: if ( !self MayMoveToPoint( endPoint ) )...
entity <actor> Melee([direction])
- [OPTIONAL] [direction] direction to attack, if not specified, uses direction to current enemy.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Makes this actor melee attack. Returns the entity hit, if any.
EXAMPLE: guy Melee()
entity <actor> MeleeWithOffset(<offset>)
- [MANDATORY] <offset> A vector offset added to the actor's eye position from which to start the melee trace.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Makes this actor melee attack. Returns the entity hit, if any.
EXAMPLE: guy MeleeWithOffset( (0,0,32) )
void <actor> NearClaimNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determine whether this actor is near its claim node.
EXAMPLE: if ( ai NearClaimNode() )...
void <actor> NearClaimNodeAndAngle()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determine whether this actor is near its claim node and nearly matches the angle.
EXAMPLE: if ( ai NearClaimNodeAndAngle() )...
void <actor> NearNode(<node>)
- [MANDATORY] <node> The path node to check.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determine whether this actor is near to a given path node.
EXAMPLE: if ( ai NearNode( node ) )...
void <actor> OrientMode(<orient mode>,[face angle],[direction vector],[face position])
- [MANDATORY] <orient mode> (const string) OrientMode must be 'face angle', 'face current', 'face direction', 'face enemy', 'face enemy or motion', 'face goal', 'face motion', 'face point', or 'face default'
- [OPTIONAL] [face angle] (float) The yaw angle to face if orient mode is 'face angle'
- [OPTIONAL] [direction vector] (vector) The direction vector to face if orient mode is 'face direction'
- [OPTIONAL] [face position] (vector) The point to face if orient mode is 'face point'
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the orient mode of this actor.
EXAMPLE: randAlly OrientMode("face direction", player.origin-randAlly.origin )
void <actor> PathMode(<path mode>,[clear path],[path delay])
- [MANDATORY] <path mode> (const string) PathMode must be 'dont move', 'move allowed', or 'move delayed'
- [OPTIONAL] [clear path] (integer) 1 to clear path
- [OPTIONAL] [path delay] (float) Amount of time (seconds) to wait if path mode is 'move delayed'
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the path mode of this actor.
EXAMPLE: randAlly PathMode("dont move")
void <actor> PickUpGrenade()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Pick up a grenade
EXAMPLE: self PickUpGrenade()
void <actor> PredictArrival()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Predicts the arrival direction vector using havok corner predictor.
void <actor> PredictExit()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Predicts the exit direction vector using havok corner predictor.
EXAMPLE: predictedLookAheadInfo = self PredictExit()
void <actor> PredictPath()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Predicts the path to look for upcoming corner using havok corner predictor.
EXAMPLE: predictedLookAheadInfo = self PredictPath()
void <actor> PushPlayer(<can push player>)
- [MANDATORY] <can push player>(bool) True if this character can push the player.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set whether this character can push the player. Don't call this unless you know what you are doing.
EXAMPLE: level.elder PushPlayer( true )
void <actor> ReacquireMove()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Start the reaquire move
void <actor> ReacquireStep(<dist>)
- [MANDATORY] <dist>(floating point number) amount to side step left or right
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Do side step move to safe place left or right while facing enemy.
EXAMPLE: reacquirePos = entity ReacquireStep( step_size )
void <sentient> RemoveSentientEventListener([event])
- [OPTIONAL] [event] The event name
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: De-Registers entity to listen to a specific event. if event is undefined, entity will stop listening to all the evnets.
EXAMPLE: self RemoveSentientEventListener("bulletwhizby")
void ResetVisibilityCacheWithinRadius(<origin>,<radius>)
- [MANDATORY] <origin> Center of reset bounds
- [MANDATORY] <radius> Distance around the origin to scan for sentients
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Reset the viscache for sentients within the specified radius
EXAMPLE: ResetVisibilityCacheWithinRadius(origin, 500)
void <sentient> SeeRecently(<target>,<time>)
- [MANDATORY] <target> (entity) The entity to check.
- [MANDATORY] <time> (int) seconds.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check to see if the AI saw the given sentient in the past <time>. If called on a non-sentient, just does a cansee check
EXAMPLE: if( self SeeRecently( player ) )
void <actor> SetEntityOwner(<entity>)
- [MANDATORY] <entity> An entity for owner.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set an entity as the AI's owner. The owner will never be targeted.
EXAMPLE: self SetEntityOwner( vehicle_entity )
void <actor> SetEntityTarget(<entity>,[threat],[tag name])
- [MANDATORY] <entity> An entity to target (cannot be server only entity).
- [OPTIONAL] [threat] A fraction of maximum possible threat an AI can have. Must be in 0 to 1 range. Defaults to 1.
- [OPTIONAL] [tag name] Tag to aim/shoot at on this entity. Defaults to tag_eye for actors/players".
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set an entity as the AI's target. This is for special cases only. Do not set AI or player targets with this.
EXAMPLE: self SetEntityTarget( vehicle_entity, 0.7, "tag_head" )
void <actor> SetFixedNodeSafeVolume(<volume entity>)
- [MANDATORY] <volume entity>(entity) The safe volume entity.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this actor's fixed node safe volume.
EXAMPLE: self SetFixedNodeSafeVolume( volume )
void <actor> SetFlashBanged(<flashed>,[strength])
- [MANDATORY] <flashed> Whether or not the actor is under the affect of a flashbang.
- [OPTIONAL] [strength] If actor is flashed, how severely they were initially affected. Between 0.0 and 1.0 (full strength).
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets whether an actor is under a flashbang effect.
EXAMPLE: self SetFlashBanged( true, 0.8 )
void <actor> SetFlashbangImmunity(<immune>)
- [MANDATORY] <immune> If the actor can be affected by flashbangs.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets whether an actor is succeptable to flashbangs.
EXAMPLE: level.suicideguy SetFlashbangImmunity( true )
void <actor> SetFreeCameraLockOnAllowed(<allowed>)
- [MANDATORY] <allowed> boolean of whether it is allowed
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets whether the ai is allowed to be locked onto in the demo free camera
void <sentient> SetGoal(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> setgoalentity(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> setgoalnode(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> setgoalpos(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> setgoalvolume(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> setgoalvolumeauto(<pos>,[forced],[goalradius],[goalheight])
- [MANDATORY] <pos>/<node>/<entity>/<volume>
- [OPTIONAL] [forced](bool) should go directly to this pos/node/entity. Forced means AI will get within approx 4 units of the entity.
- [OPTIONAL] [goalradius] radius of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
- [OPTIONAL] [goalheight] height of the goal. Applicable for entity and position/node and not the volume or forcedGoal.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set this AI 's goal. Any of the above function name will work. They all call into SetGoal function internally.
EXAMPLE: self SetGoal( node )
void <sentient> SetIgnoreEnt(<sentient>,<ignored>)
- [MANDATORY] <sentient> Another sentient entity
- [MANDATORY] <ignored> true/false
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set a sentient entity to ignore another specific sentient entity or not
EXAMPLE: aiGuy SetIgnoreEnt( player, true )
void SetIgnoreMeGroup(<ignored group>,<ignoring group>)
- [MANDATORY] <ignored group>(string) ignored group.
- [MANDATORY] <ignoring group>(string) ignoring group.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Make first group ignored by second group
EXAMPLE: SetIgnoreMeGroup( "flanking_team", "axis" )
void <sentient> SetPersonalIgnore(<sentient>,<enemy>,[duration])
- [MANDATORY] <sentient> Self
- [MANDATORY] <enemy> The enemy to set threat bias for
- [OPTIONAL] [duration] How long this threat bias lasts in seconds
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: self will not pick enemy as target for the duration
EXAMPLE: self SetPersonalIgnore( self.enemy, 5 )
void <sentient> SetPersonalThreatBias(<sentient>,<enemy>,<threatBias>,[duration])
- [MANDATORY] <sentient> Self
- [MANDATORY] <enemy> The enemy to set threat bias for
- [MANDATORY] <threatBias> The threat bias amount
- [OPTIONAL] [duration] How long this threat bias lasts in seconds
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets a personal threat bias for this sentient versus the other sentient. It lasts for the given duration.
EXAMPLE: self SetPersonalThreatBias( self.enemy, -1000 )
void <actor> SetPhysParams(<radius>,<minsz>,<maxsz>)
- [MANDATORY] <radius> size of the actor.
- [MANDATORY] <minsz> min height of the actor.
- [MANDATORY] <maxsz> max height of the actor.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets the collision bounds for an actor.
EXAMPLE: self setPhysParams( 15, 0, 72 )
void <actor> SetPitchOrient()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set pitch orientation
EXAMPLE: self setPitchOrient()
void <entity> SetPotentialThreat(<dir>)
- [MANDATORY] <dir> direction of the threat. This is the angle from which the NPC should expect danger
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: In non-combat situations. This is mostly useful for friendlies.
EXAMPLE: self SetPotentialThreat( 90 )
void <actor> SetRepairPaths(<on_off>)
- [MANDATORY] <on_off> true to enable repair paths, false otherwise
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: True allows havok to repath automatically if the AI moves off their predefined path.
EXAMPLE: self SetRepairPaths( true )
void <actor> SetStairsExitTransform()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets the base transform for the exit stairs animation using the current position in the looping anim
EXAMPLE: self SetStairsExitTransform()
void SetStealthSight(<awareness>,<timeDecay>,<timeDistMin>,<timeDistMax>,<distMin>,<distMax>,<extendSight>)
- [MANDATORY] <awareness> "unaware", "low_alert", "high_alert", or "combat"
- [MANDATORY] <timeDecay> float value of seconds stealth sight takes to fall off completely (0 for never/infinite)
- [MANDATORY] <timeDistMin> float value of seconds stealth sight takes to grow completely at min range (0 for never/infinite)
- [MANDATORY] <timeDistMax> float value of seconds stealth sight takes to grow completely at max range (0 for never/infinite)
- [MANDATORY] <distMin> float value of the min distance
- [MANDATORY] <distMax> float value of the max distance
- [OPTIONAL] <extendSight> indicates of sight continues beyond max range at the max rate
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the parameters for given awarenesslevel of stealth sight when active on an sentient
EXAMPLE: SetStealthSight( "high_alert", 2, 1, 10, 200, 1000 )
void <sentient> SetStealthSightAwareness([awareness],[decayEnabled])
- [OPTIONAL] [awareness] "unaware", "low_alert", "high_alert", "combat", or undefined to disable it (default disabled)
- [OPTIONAL] [decayEnabled] if true stealth sight will decay when other sentient is not in sight (default true)
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the current stealth sight awareness state for this sentient
EXAMPLE: aiGuy SetStealthSightAwareness( "unaware", true )
void <sentient> SetStealthSightValue(<otherSentient>,<newValue>)
- [MANDATORY] <otherSentient> other sentient you want to set the value on this sentient for
- [MANDATORY] <newValue> The new stealth sight value
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the current stealth sight value for this sentient seeing another sentient (floating point from 0.0 to 1.0)
EXAMPLE: aiGuy SetStealthSightValue( forOtherGuy, 0.5 )
void <actor> SetSteeringMode(<steering mode>)
- [MANDATORY] <steering mode> Mode to set.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Sets the steering mode for the actor. Valid modes are "normal steering", "slow steering", "vignette steering".
EXAMPLE: self SetSteeringMode( "slow steering" )
void SetThreatBias(<against group>,<for group>,<threat bias>)
- [MANDATORY] <against group> (string) threat bias group against.
- [MANDATORY] <for group> (string) threat bias group for.
- [MANDATORY] <threat bias> (int) threat bias value.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set threat bias of second group against first group
EXAMPLE: SetThreatBias( "axis", "flanking_team", 120 )
void SetThreatBiasAgainstAll(<group>,<value>)
- [MANDATORY] <group> (string) threat bias group name.
- [MANDATORY] <value> (int) threat bias value.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the threatbias a group has against all others
EXAMPLE: SetThreatBiasAgainstAll( "flanking_team", 120 )
void <entity> SetThreatBiasGroup([threat_bias_group])
- [OPTIONAL] [threat_bias_group](string) threat bias group name. If none, remove actor from current threat bias group
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set or clear threat bias group of an AI or player
EXAMPLE: SetThreatBiasGroup( "flanking_team" )
void <actor> Shoot([accuracy modifier],[shoot override vector[ (vector) The shoot vector)
- [OPTIONAL] [accuracy modifier] (floating point number)
- [OPTIONAL] [shoot override vector[ (vector) The shoot vector
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Makes this actor shoot.
EXAMPLE: guy shoot()
void <actor> ShouldFaceMotion()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Determines if the AI should face the motion direction. Use self.faceMotion instead of this except when the AI is just beginning to move.
EXAMPLE: self ShouldFaceMotion()
void <actor> ShouldHoldGroundAgainstEnemy()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Return true if enemy is within pathEnemyFightDist.
EXAMPLE: if( behaviorTreeEntity ShouldHoldGroundAgainstEnemy() )
void <actor> ShouldStartArrival()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor should start arriving at given node
EXAMPLE: self ShouldStartArrival()
void <actor> ShouldStartTraversal()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor should start traversal
EXAMPLE: self ShouldStartTraversal()
void <actor> ShouldUseCoverNode()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: returns true/false if actor is at is safe at cover node and use it as a cover
EXAMPLE: self ShouldUseCoverNode()
void <actor> StartCoverArrival(<start pos>,<yaw angles>)
- [MANDATORY] <start pos> the offset to start the arrival animation from
- [MANDATORY] <yaw angles> the arrival angle
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Runs cover arrival animscript on an actor.
EXAMPLE: soldier StartCoverArrival( pos, 45 )
void <actor> Teleport(<position>,[angles])
- [MANDATORY] <position> (point) The actor's new position.
- [OPTIONAL] [angles] (vector) The actor's new angles.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Teleport the actor to a new position with the given origin and angles.
EXAMPLE: self Teleport( org, angles )
void ThreatBiasGroupExists(<name>)
- [MANDATORY] <name> threat bias group name.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Check if a threat bias group exists
EXAMPLE: ThreatBiasGroupExists( "flanking_team" )
void <actor> TraverseMode(<traverse mode>)
- [MANDATORY] <traverse mode> (const string) Possible traverse modes are 'gravity', 'nogravity', or 'noclip'
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Set the traverse mode of this actor.
EXAMPLE: self TraverseMode( "nogravity" )
void <actor> TrimPathtoAttack()
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Trims the path to attack.
void <actor> UseCoverNode(<path node>)
- [MANDATORY] <path node> The path node to use as cover
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Tells this actor to use the given cover node. This is invalid if the actor's keepclaimednode flag is set. Returns true or false depending on whether the actor can claim the node.
EXAMPLE: guy UseCoverNode( covernode )
void <actor> UsePosition(<position>,[arrivalfinalposition])
- [MANDATORY] <position> The position for the actor to run to.
- [OPTIONAL] [arrivalfinalposition] The arrivalfinalposition if this is an arrival.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Override where the actor should run to. This overrides the goal pos and the claimed node.
EXAMPLE: self UsePosition( pos )
void <actor> UseReacquireNode(<node>)
- [MANDATORY] <node>(path node) the node to use.
CATEGORY: AI
CLIENT/SERVER: Server
SUMMARY: Use the given reacquire node.
void AddBoltedFXExclusionVolume(<localClientNum>,<entity>,<tag name>,<half extents>,<offset>)
- [MANDATORY] <localClientNum> The local client to create the volume on.
- [MANDATORY] <entity> The entity to attach the volume to.
- [MANDATORY] <tag name> The tag to use as the volume's origin.
- [MANDATORY] <half extents> The half extents of the volume.
- [OPTIONAL] <offset> An offset from the tag name for the volume's origin; default is 0 0 0.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Create a bolted volume that will exclude FX that are flagged as "Respect Exclusion Volumes". Returns volume ID.
EXAMPLE: volumeID = AddBoltedFXExclusionVolume( 0, entity, tag_origin, (10, 10, 10) )
void <entity> AddDuplicateRenderOption(<dupeType>,<dupeMethod>,<mappedMaterialId>,<dupeCull>)
- [MANDATORY] <dupeType> this is one of [DR_TYPE_FRAMEBUFFER|DR_TYPE_FRAMEBUFFER_DUPLICATE|DR_TYPE_OFFSCREEN], as defined in _duplicaterender.csc. Sets the duplicate type of this call
- [MANDATORY] <dupeMethod> this is one of [DR_CULL_ALWAYS|DR_CULL_NEVER], as defined in _duplicaterender.csc. Sets the render method of this call
- [OPTIONAL] <mappedMaterialId> This is the mapped material id
- [OPTIONAL] <dupeCull> this is one of [DR_METHOD_OFF|DR_METHOD_DEFAULT_MATERIAL|DR_METHOD_THERMAL_MATERIAL|DR_METHOD_CUSTOM_MATERIAL|DR_METHOD_FORCE_CUSTOM_MATERIAL], as defined in _duplicaterender.csc. Sets the render method of this call
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Add a duplicate render option for the entity
EXAMPLE: myEnt AddDuplicateRenderOption( DR_TYPE_FRAMEBUFFER, DR_METHOD_THERMAL_MATERIAL, DR_CULL_ALWAYS )myEnt AddDuplicateRenderOption( DR_TYPE_OFFSCREEN, DR_METHOD_CUSTOM_MATERIAL, DR_CULL_NEVER, mapped_material_id(player,"gfx_my_material_2") )
void AddFXExclusionVolume(<localClientNum>,<center>,<angles>,<half extents>)
- [MANDATORY] <localClientNum> The local client to create the volume on.
- [MANDATORY] <center> The center of the volume.
- [MANDATORY] <angles> The rotation angles of the volume.
- [MANDATORY] <half extents> The half extents of the volume.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Create a volume that will exclude FX that are flagged as "Respect Exclusion Volumes". Returns volume ID.
EXAMPLE: volumeID = AddFXExclusionVolume( 0, (0,0,0), (0, 45, 0), (10, 10, 10) )
void BeamKill(<localClientNum>,<beam handle>)
- [MANDATORY] <localClientNum> Local client on which to play the beam
- [MANDATORY] <beam handle> The beam handle
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Kill the previously launched beam.
EXAMPLE: BeamKill(0, beamHandle)
void BeamLaunch(<localClientNum>,<entity from>,<tag from>,<entity to>,<tag to>,<beam>)
- [MANDATORY] <localClientNum> Local client on which to play the beam
- [MANDATORY] <entity from> The originating entity
- [MANDATORY] <tag from> The tag on the originating entity to start from
- [MANDATORY] <entity to> The target entity
- [MANDATORY] <tag to> The target tag
- [MANDATORY] <beam> The beam
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Launch this beam and return the internal handle.
EXAMPLE: handle = BeamLaunch(0, launcher, launcherTag, target, targetTag, beam)
void BulletTracer(<start>,<end>)
- [MANDATORY] <start> The starting point bullet tracer
- [MANDATORY] <end> The end point bullet tracer
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: creates a bullet tracer from the start to end point
EXAMPLE: BulletTracer(self.origin, target.origin)
void CaptureFrame(<localClientNum>,<name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <name> The code image name
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Captures the current frame into the given code image - he image had to be already created with CreateSceneCodeImage()
EXAMPLE: CaptureFrame( self.localClientNum, "freezeFrame" )
void ClearExtraCam()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Finds the extracam associated with an entity and removes it
EXAMPLE: cameraEnt ClearExtraCam()
void <entity> codeplaypostfxbundle()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Displays a postfx on the screen
EXAMPLE: entity PlayPostfxBundle( "myBundle" )
void <entity> codestoppostfxbundle()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Ends a postfx
EXAMPLE: entity StopPostfxBundle( 2 )
void CreateSceneCodeImage(<localClientNum>,<name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <name> A unique name
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Creates a scene size code image
EXAMPLE: CreateSceneCodeImage( self.localClientNum, "freezeFrame" )
void DeleteFX(<localClientNum>,<effect id>,[deleteImmediate])
- [MANDATORY] <localClientNum> client on which to spawn effect.
- [MANDATORY] <effect id> The effect id returned by spawnfx
- [OPTIONAL] [deleteImmediate] whether effect will be deleted immediately. Default is 1.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Delete a spawned effect.
EXAMPLE: deletefx (0, fxRef)
void <entity> DisableDuplicateRendering()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Disables duplicate rendering for the entity
EXAMPLE: entity DisableDuplicateRendering()
void EnableFrontendLockedWeaponOverlay(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <enable> 0-disable 1-enable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the draw of the locked gun postfx in script.
EXAMPLE: entity EnableFrontendLockedWeaponOverlay( 0, 0 )
void EnableFrontendStreamingOverlay(<localClientNum>,<enable>,<extracam>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <enable> 0-disable 1-enable
- [OPTIONAL] <extracam> 0-disable 1-enable - when enabled the overlay is drawn on extracam
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the draw of an alternate draw mode for high detail entities marked to use alt draw
EXAMPLE: entity EnableFrontendStreamingOverlay( 0, 0 )
void EnableFrontendTokenLockedWeaponOverlay(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <enable> 0-disable 1-enable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the draw of the purchaseable gun postfx in script.
EXAMPLE: entity EnableFrontendTokenLockedWeaponOverlay( 0, 0 )
void EnableThermalDraw(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <enable> true/false
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enables or disables the drawing entities into the thermal buffer
EXAMPLE: EnableThermalDraw( player.localClientNum, true )
void <entity> EVEnable(1 to enable, 0 to disable)
- [MANDATORY] 1 to enable, 0 to disable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable ev mode
EXAMPLE: entity EVEnable( 1 )
void EvStatus(<localClientNum>)
- [MANDATORY] <localClientNum> Local client to find the status of
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: returns the status of EV
EXAMPLE: status = EVStatus( 1 )
void FindStaticModelIndex(<vector pos>)
- [MANDATORY] <vector pos> The position to match to the static model origin or <string targetname> for the targetname of the static model
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns an index of a static model whose origin matches the passed in position
EXAMPLE: smodelIndex = FindStaticModelIndex()
void FindStaticModelIndexArray(<string targetname>)
- [MANDATORY] <string targetname> The targetname of the static model's
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns an array indices of a static model whose name matches the passed in string
EXAMPLE: smodelIndexArray = FindStaticModelIndex()
NOTES: This function is potentially very expensive to call. And, since it can directly impact frame rate due to it running on the client side, you should pre-cache the results during level init and use the results when needed rather than calling at that moment.
void FindVolumeDecalIndexArray(<string targetname>)
- [MANDATORY] <string targetname> The targetname of the volume decal
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns an array indices of a volume decal whose targetname matches the passed in string
EXAMPLE: vdIndexArray = FindVolumeDecalIndexArray( "foo" )
NOTES: This function is potentially very expensive to call. And, since it can directly impact frame rate due to it running on the client side, you should pre-cache the results during level init and use the results when needed rather than calling at that moment.
void FreeCodeImage(<localClientNum>,<name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <name> A unique name
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Frees a code image
EXAMPLE: FreeCodeImage( self.localClientNum, "freezeFrame" )
void GetCameraSpikeCamStatic(<localClientNum>)
- [MANDATORY] <localClientNum> Client number of the camera-spike cam owner
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns 1 if a client sees static on the camera-spike cam, 0 otherwise
EXAMPLE: GetCameraSpikeCamStatic( localClientNum )
void GetFXFromSurfaceTable(<surfacefxtable>,<surface type>)
- [MANDATORY] <surfacefxtable> Surface fx table.
- [MANDATORY] <surface type> Surface type
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns the fx for a given surface type from the surfacefxtable.
EXAMPLE: fx = GetFXFromSurfaceTable( fx_surface_table, surface_type )
void GetServerVolumetricFogDensity(<localClientNum>)
- [MANDATORY] <localClientNum> The local client number
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Get the density of server volumetric fog
void GetSurfaceStrings()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns an array containing all the surface names
EXAMPLE: surfaceStringArray = GetSurfaceStrings()
void GetVisionSetNaked(<localClientNum>)
- [MANDATORY] <localClientNum> The local client which will have his vampire vision set changed
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Gets players' naked vision.
EXAMPLE: GetVisionSetNaked( 0 )
void GetWorldFogScriptID(<localClientNum>)
- [MANDATORY] <localClientNum> the local client
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: current active .fsi fog volumes script identity value -1 = global volume.
void HideStaticModel(<smodelIndex>)
- [MANDATORY] <smodelIndex> The index of the static model to toggle
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Hide a static model
EXAMPLE: HideStaticModel( model )
void HideVolumeDecal(<volume decal Index>)
- [MANDATORY] <volume decal Index> The index of the volume decal to toggle
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Hide a static model
EXAMPLE: HideStaticModel( model )
void IGCActive(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum> Local client on which the igc is running
- [MANDATORY] <enable> 1-enables, 0-disables
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Flags if an IGC is on or off
EXAMPLE: IGCActive( 1, 1 )
void IsFXPlaying(<localClientNum>,<effect id>)
- [MANDATORY] <localClientNum> The local client the effect is playing on.
- [MANDATORY] <effect id> The effect id returned by playFx
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Return true if effect is still playing.
EXAMPLE: IsFXPlaying ( fxId )
void IsIGCActive(<localClientNum>)
- [MANDATORY] <localClientNum> Local client to find the status of
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: returns the status of EV
EXAMPLE: status = IsIGCActive( 1 )
void IsStereoOn()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Returns true if the stereo is on
EXAMPLE: isStereo = IsStereoOn()
void KillFX(<localClientNum>,<effect id>)
- [MANDATORY] <localClientNum> The local client the effect is playing on.
- [MANDATORY] <effect id> The effect id returned by playFx
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Force kills a given fx.
EXAMPLE: KillFX ( fxId )
void KillRadiantExploder(<localClientNum>,<exploderId>)
- [MANDATORY] <localClientNum> The local client to play the effect on
- [MANDATORY] <exploderId> The id of the exploder to be stopped.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Kill the specified Radiant exploder
EXAMPLE: KillRadiantExploder( 0, "lights_on_exploder" )
void <entity> MakeLight(<primaryLightIndex>)
- [MANDATORY] <primaryLightIndex> The Primary Light Index
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Create a light
EXAMPLE: self MakeLight(1)
void MapMaterialIndex(<localClientNum>,<materialName>)
- [MANDATORY] <localClientNum> Local client on which to map the material
- [MANDATORY] <materialName> Material to map
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Maps the material to an index
EXAMPLE: index = MapMaterial(1, "mymaterial")
void <entity> MotionPulse_Enable(<enable>)
- [MANDATORY] <enable> true to enable /false to disable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the sitrep scan
EXAMPLE: entity motionpulse_enable( false )
void <entity> MotionPulse_SetDesat(<level>)
- [MANDATORY] <level> The desat level (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse desaturation level
EXAMPLE: entity motionpulse_setdesat( level )
void <entity> MotionPulse_SetFadeOut(<fadeout>)
- [MANDATORY] <fadeout> The fadeout (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse fadeout
EXAMPLE: entity MotionPulse_SetFadeOut( fadeout )
void <entity> MotionPulse_SetFalloff(<falloff>)
- [MANDATORY] <falloff> the falloff (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse falloff
EXAMPLE: entity motionpulse_setfalloff( falloff )
void <entity> MotionPulse_SetLineWidth(<linewidth>)
- [MANDATORY] <linewidth> the line width (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse line width
EXAMPLE: entity motionpulse_setlinewidth( linewidth )
void <entity> MotionPulse_SetOutline(<outlinelevel>)
- [MANDATORY] <outlinelevel> the outline level (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse outline level
EXAMPLE: entity motionpulse_setoutline( outlinelevel )
void <entity> MotionPulse_SetRadius(<radius>)
- [MANDATORY] <radius> the radius (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse radius
EXAMPLE: entity motionpulse_setradius( radius )
void <entity> MotionPulse_SetSolid(<level>)
- [MANDATORY] <level> The solid level (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the motion pulse solid level
EXAMPLE: entity motionpulse_setsolid( level )
void <entity> OED_NightVision_Enable(<enable>)
- [MANDATORY] <enable> true/false
CATEGORY: Gfx
CLIENT/SERVER: Client
EXAMPLE: entity oed_nightvision_enable( false )
void OED_NightVision_Reset(<entity>)
- [MANDATORY] "CallOn: <entity> An entity
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Reset nightvision for entity
EXAMPLE: entity oed_nightvision_reset()
void <entity> OED_NightVision_SetTextureLevel(<level>)
- [MANDATORY] <level> The texture level (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the night vision texture level for the entity
EXAMPLE: entity oed_nightvision_settexturelevel( level )
void <entity> OED_SitRepScan_Enable(<type>,<AlphaType>)
- [MANDATORY] <type> 0-disable 1-typeA 2-typeB
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the sitrep scan
EXAMPLE: entity oed_sitpepscan_enable( 0 )
void <entity> OED_SitRepScan_SetDesat(<level>,<AlphaType>)
- [MANDATORY] <level> the desat level (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the desaturation level for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setdesat( level )
void <entity> OED_SitRepScan_SetFalloff(<falloff>,<AlphaType>)
- [MANDATORY] <falloff> The falloff (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the falloff for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setfalloff( falloff )
void <entity> OED_SitRepScan_SetLineWidth(<linewidth>,<AlphaType>)
- [MANDATORY] <linewidth> The line width (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the line width for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setlinewidth( linewidth )
void <entity> OED_SitRepScan_SetOutline(<outlinelevel>,<AlphaType>)
- [MANDATORY] <outlinelevel> The outline level (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the outline level for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setoutline( outlinelevel )
void <entity> OED_SitRepScan_SetRadius(<radius>,<AlphaType>)
- [MANDATORY] <radius> The radius (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the radius for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setradius( radius )
void <entity> OED_SitRepScan_SetSolid(<level>,<AlphaType>)
- [MANDATORY] <level> the solid level (float)
- [OPTIONAL] <AlphaType> 0-default 1-Alpha ( 0 by default )
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the solid level for the sitrep scan
EXAMPLE: entity oed_sitrepscan_setsolid( level )
void PlayExtraCamXCam(<xcam name>,[lerp_duration],[camera_name],[animation_name],[origin],[angles],[target])
- [MANDATORY] <xcam name> The name of the xcam asset to play
- [OPTIONAL] [lerp_duration] The duration to lerp the start of the xcam over
- [OPTIONAL] [camera_name] The name of the sub camera from the XCam to play
- [OPTIONAL] [animation_name] The name of the frame (notetrack) to play
- [OPTIONAL] [origin] Base origin for the camera
- [OPTIONAL] [angles] Base angles for the camera
- [OPTIONAL] [target] If this xcam has model translation and rotation data, apply it to this entity.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Plays an XCam on the extra cam associated with the entity starting at the current client time
EXAMPLE: cameraEnt PlayExtraCamXCam( "ui_cam_ar_standard" )
void PlayFXOnDynEnt(<effect id>,<dynent>)
- [MANDATORY] <effect id> The effect id returned by loadfx
- [MANDATORY] <dynent> The dyn entity to play the effect on
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Play this effect and return the internal handle.
EXAMPLE: handle = PlayFXOnDynEnt( spark, lamp )
void PlayMainCamXCam(<localClientNum>,<xcam name>,[lerp_duration],[camera_name],[animation_name],[origin],[angles],[target])
- [MANDATORY] <localClientNum> The local client
- [MANDATORY] <xcam name> The name of the xcam asset to play
- [OPTIONAL] [lerp_duration] The duration to lerp the start of the xcam over
- [OPTIONAL] [camera_name] The name of the sub camera from the XCam to play
- [OPTIONAL] [animation_name] The name of the frame (notetrack) to play
- [OPTIONAL] [origin] Base origin for the camera
- [OPTIONAL] [angles] Base angles for the camera
- [OPTIONAL] [target] If this xcam has model translation and rotation data, apply it to this entity.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Plays an XCam on the main camera associated with the player starting at the current client time
EXAMPLE: PlayMainCamXCam( localClientNum, "ui_cam_ar_standard" )
void PlayRadiantExploder(<localClientNum>,<exploderId>)
- [MANDATORY] <localClientNum> The local client to play the effect on
- [MANDATORY] <exploderId> The id of the exploder to be triggered.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Play the specified Radiant exploder
EXAMPLE: PlayRadiantExploder( 0, "lights_on_exploder" )
void <entity> PlayRenderOverrideBundle()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Applys a render override bundle to an entitys model
EXAMPLE: entity PlayRenderOverrideBundle( "myBundle" )
void PlayTagFXSet(<localClientNum>,<tagfxset>,<entity>)
- [MANDATORY] <localClientNum> Local client on which to play the fx
- [MANDATORY] <tagfxset> The string name of the tag fx set
- [MANDATORY] <entity> The entity to play the effect on
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Play a tagfx set on ajn entity. Do not specify loop fx
EXAMPLE: PlayTagFXSet ( 0, self, smoke )
void PlayViewmodelFX(<local_client_num>,<name>,<tag>)
- [MANDATORY] <local_client_num> The client number
- [MANDATORY] <name> The name of the fx
- [MANDATORY] <tag> The tag to play on
CATEGORY: Gfx
CLIENT/SERVER: Client
void <entity> RandomFade(<level>)
- [MANDATORY] <level> 0 to disable, any other value to enable (float)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Fade the level randomly
EXAMPLE: entity randomfade( level )
void RegisterRewindFX(<local_client_num>,<name>)
- [MANDATORY] <local_client_num> The client number
- [MANDATORY] <name> The name of the fx
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Registers an fx with the killcam rewind system
EXAMPLE: RegisterRewindFX(local_client_num, "fxName")
void RemoveFXExclusionVolume(<localClientNum>,<volumeID>)
- [MANDATORY] <localClientNum> The local client to remove the volume from.
- [MANDATORY] <volumeID> The volume to remove.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Removes the given exclusion volume.
EXAMPLE: RemoveFXExclusionVolume( 0, volumeID )
void SetAllowXCamRightStickRotation(<localClientNum>,<newValue>)
- [MANDATORY] <localClientNum> The local client
- [MANDATORY] <newValue> True to allow, False, to disable right stick rotation
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Prevent or stop preventing right stick rotation on this xcam (the next playmaincamxcam resets this)
EXAMPLE: SetAllowXCamRightStickRotation( 0, false )
void <entity> SetArmPulse()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets arm pulse override values
EXAMPLE: entity SetArmPulse( 2.0, 4, 3 )
void <entity> SetArmPulsePosition()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets arm pulse override values
EXAMPLE: entity SetArmPulsePosition( 0.5 )
void SetCameraSpikeCamActive(<localClientNum>,<active>)
- [MANDATORY] <localClientNum> Client number of the extra cam owner
- [MANDATORY] <active> 0 if inactive, 1 if active
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets whether a client's camera-spike cam is active.
EXAMPLE: SetCameraSpikeCamActive( localClientNum, 1 )
void SetCameraSpikeCamAngles(<localClientNum>,<angles>)
- [MANDATORY] <localClientNum> Client number of the camera-spike cam owner
- [MANDATORY] <angles> New pitch, yaw, and roll of the camera-spike cam
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the orientation of a client's extra cam.
EXAMPLE: SetCameraSpikeCamAngles( localClientNum, angles )
void SetCameraSpikeCamEntity(<localClientNum>,<entity>)
- [MANDATORY] <localClientNum> Client number of the extra cam owner
- [MANDATORY] <entity> Camera entity, or undefined
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets an camera-spike cam entity for the client.
EXAMPLE: CScr_SetCameraSpikeCamEntity( localClientNum, cameraSpike )
void SetCameraSpikeCamOrigin(<localClientNum>,<origin>)
- [MANDATORY] <localClientNum> Client number of the camera-spike cam owner
- [MANDATORY] <origin> New origin of the camera-spike cam
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the origin of a client's camera-spike cam
EXAMPLE: SetCameraSpikeCamOrigin( localClientNum, origin )
void SetCameraSpikeCamStatic(<localClientNum>,<active>)
- [MANDATORY] <localClientNum> Client number of the camera-spike cam owner
- [MANDATORY] <active> 0 if inactive, 1 if active
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets whether a client sees static on the camera-spike cam
EXAMPLE: SetCameraSpikeCamStatic( localClientNum, 1 )
void SetClientVolumetricFog(<startDist>,<halfwayDist>,<halfwayHeight>,<baseHeight>,<red>,<green>,<blue>,<fogColorScale>,[sunFogColorR],[sunFogColorG],[sunFogColorB],[sunFogDirX],[sunFogDirY],[sunFogDirZ],[sunFogStartAng],[sunFogEndAng],[],[fogMaxOpacity])
- [MANDATORY] <startDist> The start distance of the volume
- [MANDATORY] <halfwayDist> The halfway distance of the volume
- [MANDATORY] <halfwayHeight> The halfway height of the volume
- [MANDATORY] <baseHeight> The base height of the volume
- [MANDATORY] <red> The red value
- [MANDATORY] <green> The green value
- [MANDATORY] <blue> The blue value
- [MANDATORY] <fogColorScale> The color scale of the fog
- [OPTIONAL] [sunFogColorR] The sun fog red value
- [OPTIONAL] [sunFogColorG] The sun fog green value
- [OPTIONAL] [sunFogColorB] The sun fog blue value
- [OPTIONAL] [sunFogDirX] The sun direction X value
- [OPTIONAL] [sunFogDirY] The sun direction Y value
- [OPTIONAL] [sunFogDirZ] The sun direction Z value
- [OPTIONAL] [sunFogStartAng] Angle from the sun position where the sun fades in
- [OPTIONAL] [sunFogEndAng] Angle from the sun position where the sun has faded out
- [OPTIONAL] []
- [OPTIONAL] [fogMaxOpacity] The maximum opacity of the fog as a value between 0 and 1
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the client volumetric fog properties
void SetExposureActiveBank(<localClientNum>,<bank mask>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <bank mask> The new bank mask
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set exposure volumes active bank bit mask.
EXAMPLE: SetExposureActiveBank( localClientNum, 2 )
void SetExposureIgnoreTeleport(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <enable> Enable or disable the exposure always adapt flag
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Always do fully adaptive exposure and ignore teleports
EXAMPLE: SetExposureIgnoreTeleport( localClientNum, newVal )
void SetExposureInstantSnap(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <enable> Enable or disable the exposure snap
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: snap exposure to base calculated probe value, ignore iris adaption and damping
EXAMPLE: SetExposureInstantSnap( localClientNum, newVal )
void SetExtraCam(<camera index>,<rendered width>,<rendered height>)
- [MANDATORY] <camera index> which extra cam references this entity. Valid values are 0 - 3
- [OPTIONAL] <rendered width> Width of the extra cam rendered target. The width will be calculated from the height if width is negative (keeping the aspect ration at 16:9)
- [OPTIONAL] <rendered height> Height of the extra cam rendered target. The height will be calculated from the width if height is negative (keeping the aspect ration at 16:9)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Activates the extra cam and sets the given entity as cam reference.
EXAMPLE: cameraEnt SetExtraCam( 1, 640, 480 )
void SetExtraCamFocalLength(<camera index>,<fov>)
- [MANDATORY] <camera index> which extra cam references this entity. Valid values are 0 - 3
- [MANDATORY] <fov> camera fov
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the extra cam fov
EXAMPLE: cameraEnt SetExtraCamFOV( 1, 65 )
void SetFilterBitFlag(<localClientNum>,<filterIndex>,<bitIndex>,<setOrClear>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <bitIndex> Must be between 0 - 31
- [MANDATORY] <setOrClear> Must be between 0 - 1
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set or clear the filter bit flag
EXAMPLE: SetFilterBitFlag( self.localClientNum, 1, 10 )
void SetFilterPassCodeTexture(<localClientNum>,<filterIndex>,<passIndex>,<texture Index>,<texture name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <passIndex> Must be between 0 - 15
- [MANDATORY] <texture Index> Must be between 0 - 1
- [MANDATORY] <texture name> has to have been created by captureFrame() before - if empty string sets to null.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets a code texture for a filter pass - the tetxure has be to created beforehand
EXAMPLE: SetFilterPassMaterial( self.localClientNum, 1, 12, 0, "myBundle")
void SetFilterPassConstant(<filterIndex>,<passIndex>,<constantIndex>,<value>)
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <passIndex> Must be between 0 - 16
- [MANDATORY] <constantIndex> Must be between 0 - 16
- [MANDATORY] <value> The value for the constant
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the filter pass constant
EXAMPLE: SetFilterPassConstant( self.localClientNum, 1, 12, 12, 2.5 )
void SetFilterPassEnabled(<localClientNum>,<filterIndex>,<passIndex>,<passEnable>,[hdrFilter>],[firstPersonOnly>])
- [MANDATORY] <localClientNum>
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <passIndex> Must be between 0 - 16
- [MANDATORY] <passEnable> true/false
- [OPTIONAL] [hdrFilter>] true/false - if true the filter is applied to the scene (HDR) otherwise will be applied after the LDT and dof (default false)
- [OPTIONAL] [firstPersonOnly>] true/false - if true the filter is applied to the scene only if you are in or spectating a player in first person
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the filter pass enabled or disabled
EXAMPLE: SetFilterPassEnabled( self.localClientNum, 1, 12, false)
void SetFilterPassMaterial(<localClientNum>,<filterIndex>,<passIndex>,<materialIndex>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <passIndex> Must be between 0 - 15
- [MANDATORY] <materialIndex> Must be between 0 - 63
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the filter pass material
EXAMPLE: SetFilterPassMaterial( self.localClientNum, 1, 12, 20 )
void SetFilterPassQuads(<localClientNum>,<filterIndex>,<passIndex>,<passQuads>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <filterIndex> Must be between 0 - 3
- [MANDATORY] <passIndex> Must be between 0 - 16
- [MANDATORY] <passQuads> Must be between 0 - 2048
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets the filter pass quads
EXAMPLE: SetFilterPassQuads( self.localClientNum, 1, 12, 200)
void SetFXIgnorePause(<localClientNum>,<effect id>,<ignore pause>)
- [MANDATORY] <localClientNum> The local client the effect is playing on.
- [MANDATORY] <effect id> The effect id returned by playFx
- [MANDATORY] <ignore pause> Whether or not to respect a paused world state.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Tells an effect whether or not to respect a paused world state.
EXAMPLE: SetFXIgnorePause( localClientNum, fxId, 1 )
void SetFXOutdoor(<localClientNum>,<effect id>)
- [MANDATORY] <localClientNum> The local client the effect is playing on.
- [MANDATORY] <effect id> The effect id returned by playFx
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Flag the FX as one that only plays outdoors.
EXAMPLE: SetFXOutdoor( fxId )
void SetFXTeam(<localClientNum>,<effect handle >,<entity or team>,<invert team>)
- [MANDATORY] <localClientNum> Local client on which to play the fx
- [MANDATORY] <effect handle > The handle from the created fx
- [MANDATORY] <entity or team> The team
- [OPTIONAL] <invert team> Treat the team as the one to show the enemy fx for.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the team of the fx either by team or by entity which has a team set.
EXAMPLE: handle = SetFXTeam(localClientNum, fxHandle, owner)
void SetGenericSceneValue(<localClientNum>,<index>,<value>)
- [MANDATORY] <localClientNum> Local client number.
- [MANDATORY] <index> The scene vector index ( 0 - 15 )
- [MANDATORY] <value> Some generic float used by SW shaders.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets one of the 16 generic scene vectors used by SW shaders.
EXAMPLE: SetGenericSceneValue(0, 20)
void <entity> SetHotZone()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets HotZone control values
EXAMPLE: entity SetHotZone( 100, 1000, 5.0, 3.0, 0.5, 50 )
void SetLitFogBank(<localClientNum>,<scriptid>,<bank>,<time>)
- [MANDATORY] <localClientNum> The local client
- [MANDATORY] <scriptid> Volume identifier set in Radiant. (0-255). -1 = all.
- [MANDATORY] <bank> Bank selection (0-3).
- [MANDATORY] <time> Time in seconds to make the transition over. -1 to use the 'fogtime' parameter set in the volume.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets which bank to use for all lit fog volumes with matching script id
EXAMPLE: SetLitFogBank( 0, 1, 5.0 )
void SetLutScriptIndex(<localClientNum>,<lut index>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <lut index> The lut index
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set lut index from script.
EXAMPLE: SetLutScriptIndex( lcn, 2 )
void SetLutVolumeActiveBank(<localClientNum>,<bank mask>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <bank mask> The new bank mask
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set lut volumes active bank bit mask.
EXAMPLE: SetLutVolumeActiveBank( localClientNum, 2 )
void SetOverlayConstant(<localClientNum>,<overlayIndex>,<constantIndex>,<value>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <overlayIndex> Must be between 0 - 3
- [MANDATORY] <constantIndex> Must be between 0 - 16
- [MANDATORY] <value> The value to set
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the overlay constant
EXAMPLE: SetOverlayConstant( self.lcoalClientNum, 2, 5, 1.4 )
void SetOverlayEnabled(<overlayIndex>,<enable>)
- [MANDATORY] <overlayIndex> Must be between 0 - 3
- [MANDATORY] <enable> true/false
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enables or disables the overlay
EXAMPLE: SetOverlayEnabled( self.localClientNum, 2, false )
void SetOverlayMaterial(<localClientNum>,<overlayIndex>,<materialIndex>,<sortIndex>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <overlayIndex> Must be between 0 - 3
- [MANDATORY] <materialIndex> Must be between 0 - 63
- [MANDATORY] <sortIndex> Must be between 0 - 2
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the overlay material
EXAMPLE: SetOverlayMaterial( self.localClientNum, 2, 20, 1 )
void SetPBGActiveBank(<localClientNum>,<bank mask>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <bank mask> The bank bit mask
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set PBG bank mask from script.
EXAMPLE: SetPBGActiveBank( lcn, 1 )
void SetRimIntensity(<localClientNum>,<rimIntensity>)
- [MANDATORY] <localClientNum> Local client number.
- [MANDATORY] <rimIntensity> Character skin/cloth rim intensity.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Global character skin/cloth rim lighting intensity.
EXAMPLE: SetRimIntensity(0, 20)
void SetRippleWave(<client>,<center xpos>,<center ypos>,<width>,<speed scale>,<amplitude width ratio>,<fade in start>,<fade in end>,<fade out start>,<fade out end>)
- [MANDATORY] <client> The local client
- [MANDATORY] <center xpos> The x coord
- [MANDATORY] <center ypos> The y coord
- [MANDATORY] <width> The width of the wave
- [MANDATORY] <speed scale> The speed modifier
- [MANDATORY] <amplitude width ratio> The amplitude
- [MANDATORY] <fade in start> The fade in at start
- [MANDATORY] <fade in end> The fade in at the end
- [MANDATORY] <fade out start> The fade out at start
- [MANDATORY] <fade out end> The fade out at the end
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Trigger vertex ripple wave for material set to use it.
EXAMPLE: setripplewave( 0, 100.0, 100.0, 200.0, 1.0, 1.0, 0.0, 250.0, 1000.0, 1500.0 )
void SetServerVolumetricFogDensity(<localClientNum>,<density>,<time>)
- [MANDATORY] <localClientNum> The local client number
- [MANDATORY] <density> The density to set
- [MANDATORY] <time> The time to lerp to the new value
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the density of server volumetric fog
void SetUkkoScriptIndex(<localClientNum>,<ukko index>,<ukko blend>)
- [MANDATORY] <localClientNum> the local client
- [MANDATORY] <ukko index> The ukko index
- [MANDATORY] <ukko blend> The ukko index blend amount
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set ukko index from script.
EXAMPLE: SetUkkoScriptIndex( lcn, 2, 1.0 )
void StartWaterSheetingFX(<localClientNum>,[duration],[magnitude])
- [MANDATORY] <localClientNum> Local client on which to play the fx
- [OPTIONAL] [duration] The number of seconds to play the fx before it stops automatically. Use 0 for infinite time. Defaults to 0.
- [OPTIONAL] [magnitude] default is from a dvar (r_waterSheetingFX_magnitude)
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Play a fullscreen water effect.
EXAMPLE: StartWaterSheetingFX(localClientNum, 8)
void StopExtraCamXCam()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Stops an XCam on the extra cam associated with the entity
EXAMPLE: cameraEnt StopExtraCamXCam()
void StopFX(<localClientNum>,<effect id>)
- [MANDATORY] <localClientNum> The local client the effect is playing on.
- [MANDATORY] <effect id> The effect id returned by playFx
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Stops a given fx.
EXAMPLE: StopFX ( fxId )
void StopMainCamXCam(<localClientNum>)
- [MANDATORY] <localClientNum> The local client
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Stops an XCam on the main cam associated with the entity
EXAMPLE: StopMainCamXCam( 0 )
void StopRadiantExploder(<localClientNum>,<exploderId>)
- [MANDATORY] <localClientNum> The local client to play the effect on
- [MANDATORY] <exploderId> The id of the exploder to be stopped.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Stop the specified Radiant exploder
EXAMPLE: StopRadiantExploder( 0, "lights_on_exploder" )
void <entity> StopRenderOverrideBundle()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Ends a Render Override Bundle
EXAMPLE: entity StopRenderOverrideBundle()
void StopWaterSheetingFX(<localClientNum>,[duration])
- [MANDATORY] <localClientNum> Local client on which to play the fx
- [OPTIONAL] [duration] The number of seconds it takes the effect to fade. Use 0 for immediate turn off. Defaults to 0.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Stop the fullscreen water effect
EXAMPLE: StopWaterSheetingFX( localClientNum, 1 )
void SwitchToClientVolumetricFog(<localClientNum>)
- [MANDATORY] <localClientNum> The local client
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Switch to the client volumetric fog
void SwitchToServerVolumetricFog(<localClientNum>)
- [MANDATORY] <localClientNum> The local client
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Switch to the server volumetric fog
void <entity> TmodeClearFlag()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Clears flag bit for tmode.
EXAMPLE: entity TmodeClearFlag( 2 )
void <entity> TmodeEnable(1 to enable, 0 to disable)
- [MANDATORY] 1 to enable, 0 to disable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable tactical mode
EXAMPLE: entity TmodeEnable( 1 )
void <entity> TmodeSetFlag()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets flag bit for tmode.
EXAMPLE: entity TmodeSetFlag( 1 )
void TmodeStatus(<localClientNum>)
- [MANDATORY] <localClientNum> Local client to find the status of
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: returns the status of tmode
EXAMPLE: status = TmodeStatus( 1 )
void umbra_clearpersistenttometrigger(<localClientNum>)
- [MANDATORY] <localClientNum>
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: clears the current tome trigger that persisted due to touching a prior tome trigger
EXAMPLE: umbra_clearpersistenttometrigger( localClientNum )
void Umbra_SetAccurateOcclusionThreshold()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set Umbra Accurate Occlusion Threshold parameter
EXAMPLE: Umbra_SetAccurateOcclusionThreshold( localClientNum, 2048 )
void Umbra_SetDistanceScale()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set Umbra Distance Scale parameter
EXAMPLE: Umbra_SetDistanceScale( localClientNum, 2.0 )
void Umbra_SetMinimumContributionThreshold()
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set Umbra Accurate Occlusion Threshold parameter
EXAMPLE: Umbra_SetAccurateOcclusionThreshold( localClientNum, 8 )
void umbra_settometrigger(<localClientNum>,<tometrigger name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <tometrigger name> name of a tome trigger. Use empty string "" to deactivate tome triggers
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets current active tome trigger
EXAMPLE: Umbra_SetTomeTrigger( localClientNum, "my_really_cool_tome_trigger" )
void umbra_settometriggeronce(<localClientNum>,<tometrigger name>)
- [MANDATORY] <localClientNum>
- [MANDATORY] <tometrigger name> name of a tome trigger. Use empty string "" to deactivate tome triggers
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Set the active tome trigger without interferring with any other tome logic.
EXAMPLE: Umbra_SetTomeTriggerOnce( localClientNum, "my_really_cool_tome_trigger" )
void UnhideStaticModel(<smodelIndex>)
- [MANDATORY] <smodelIndex> The index of the static model to toggle
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Unhide a static model
EXAMPLE: UnhideStaticModel( model )
void UnhideVolumeDecal(<volume decal Index>)
- [MANDATORY] <volume decal Index> The index of the volume decal to toggle
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Unhide a static model
EXAMPLE: UnhideStaticModel( model )
void VisionSetLastStandLerp(<localClientNum>,<vision name to>,<vision name from>,<lerp fraction>)
- [MANDATORY] <localClientNum> The local client which will have his vampire vision set changed
- [MANDATORY] <vision name to> Vision to transition to.
- [MANDATORY] <vision name from> Vision to transition from.
- [MANDATORY] <lerp fraction> The lerp fraction to use when transitioning to the new vision set if a transition is possible. Default is one second.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets players' last stand vision. Optionally give a transition time from the current vision.
EXAMPLE: VisionSetLastStandLerp( localClientNum, curr_info.visionset_to, curr_info.visionset_from, state.curr_lerp )
void VisionSetNakedLerp(<localClientNum>,<vision name to>,<vision name from>,<lerp fraction>)
- [MANDATORY] <localClientNum> The local client which will have his vampire vision set changed
- [MANDATORY] <vision name to> Vision to transition to.
- [MANDATORY] <vision name from> Vision to transition from.
- [MANDATORY] <lerp fraction> The lerp fraction to use when transitioning to the new vision set if a transition is possible. Default is one second.
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Sets players' naked vision. Optionally give a transition time from the current vision.
EXAMPLE: VisionSetNakedLerp( localClientNum, curr_info.visionset_to, curr_info.visionset_from, state.curr_lerp )
void <entity> WeakPoint_Enable(<enable>)
- [MANDATORY] 1,2 <enable> 0 to disable
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enable or disable the weakpoint fx
EXAMPLE: entity weakpoint_enable( 2 )
void ZombieShooterSpotted(<localClientNum>,<enable>)
- [MANDATORY] <localClientNum> Local client on which to map the material
- [MANDATORY] <enable> 1-enables, 0-disables
CATEGORY: Gfx
CLIENT/SERVER: Client
SUMMARY: Enables the Zombie Shooter Spotted HUD display
EXAMPLE: ZombieShooterSpotted(1, 1)
void Abs(<value>)
- [MANDATORY] <value> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the absolute value of a float
EXAMPLE: x = Abs( x )
void AbsAngleClamp180(<angles>)
- [MANDATORY] <angles> Angle to be clamped
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns abs angle value clamped between [0,180].
EXAMPLE: deltaAngle = AbsAngleClamp180( currentAngle )
void AbsAngleClamp360(<angle>)
- [MANDATORY] <angle> An angle.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns <angle> as a value in the range of 0 and 360 degrees.
EXAMPLE: new_angle = AbsAngleClamp360( boatAngles[2] )
void ACos(<cos value>)
- [MANDATORY] <cos value> A cosine value
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns an angle corresponding to a particular cosine value
EXAMPLE: upAngle = ACos( distanceratio )
void AngleClamp180(<angles>)
- [MANDATORY] <angles> Angle to be clamped
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns angle value clamped between [-180,180].
EXAMPLE: deltaAngle = AngleClamp180( currentAngle )
void AngleLerp(<from>,<to>,<fraction>)
- [MANDATORY] <from> An angle.
- [MANDATORY] <to> An angle.
- [MANDATORY] <fraction> A float from 0-1.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns <angle> lerped angle value.
EXAMPLE: 180 = AngleLerp( 0, 360, 0.5 )
void AnglesToForward(<angles>)
- [MANDATORY] <angles> A set of angles
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the forward vector corresponding to a set of angles.
EXAMPLE: forward = AnglesToForward( forward )
void AnglesToRight(<angles>)
- [MANDATORY] <angles> A set of angles
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the right vector corresponding to a set of angles.
EXAMPLE: right = AnglesToRight(angles)
void AnglesToUp(<angles>)
- [MANDATORY] <angles> A set of angles
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the up vector corresponding to a set of angles.
EXAMPLE: up = AnglesToUp(angles)
void ASin(<sin value>)
- [MANDATORY] <sin value> A sin value
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns an angle corresponding to a particular sin value
EXAMPLE: upAngle = ASin( upAmount )
void ATan(<tan value>)
- [MANDATORY] <tan value> A tangential value
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns an angle corresponding to a particular tangential value
EXAMPLE: upAngle = ATan( height/distance )
void Ceil(<a>)
- [MANDATORY] <a> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the ceiling of floating point value <a>. This effectively rounds up Ceil(2.7) == 3, Ceil(3.9) == 4.
EXAMPLE: rounded_down = Floor( val )
void Closer(<reference>,<point a>,<point b>)
- [MANDATORY] <reference> The base position
- [MANDATORY] <point a> The first point
- [MANDATORY] <point b> The second point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Tests which of two points is the closest. Returns true if point a is closer to the reference than point b
EXAMPLE: if( Closer( center, models[j].origin , models[i].origin ))...
void CombineAngles(<angles a>,<angles b>)
- [MANDATORY] <angles a> Angles representing the orientation in which to place <angles b>
- [MANDATORY] <angles b> Angles which will be reoriented
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns angles b reoriented by angles a.
EXAMPLE: crateAnglesInWorld = CombineAngles( boatAngles, crateAnglesInBoat )
void Cos(<angle>)
- [MANDATORY] <angle> An angle in degrees
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the cos of an angle
EXAMPLE: frac = Cos( degrees )
void DiffTrack(<to>,<from>,<rate>,<deltaTime>)
- [MANDATORY] <to> Float, start of the range
- [MANDATORY] <from> Float, end of the range
- [MANDATORY] <rate> Floating point
- [MANDATORY] <deltaTime> Time elapsed
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a lagged value between <from> and <to> based on <rate> and <deltaTime>
void DiffTrackAngle(<to>,<from>,<rate>,<deltaTime>)
- [MANDATORY] <to> Float, start of the range
- [MANDATORY] <from> Float, end of the range
- [MANDATORY] <rate> Floating point
- [MANDATORY] <deltaTime> Time elapsed
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a lagged angle between <from> and <to> based on <rate> and <deltaTime>. Properly accounts for wrapping 2pi
void Distance(<point1>,<point2>)
- [MANDATORY] <point1> The first point
- [MANDATORY] <point2> The second point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the distance between two points
EXAMPLE: dist = Distance( org, ai[i].origin )
void Distance2D(<point1>,<point2>)
- [MANDATORY] <point1> The first point
- [MANDATORY] <point2> The second point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the distance between two points, ignores height difference.
EXAMPLE: dist = Distance2D( org, ai[i].origin )
void Distance2DSquared(<point1>,<point2>)
- [MANDATORY] <point1> The first point
- [MANDATORY] <point2> The second point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the squared distance between two points, ignores height difference.
EXAMPLE: distsq = Distance2DSquared( org, ai[i].origin )
void DistanceSquared(<point1>,<point2>)
- [MANDATORY] <point1> The first point
- [MANDATORY] <point2> The second point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the squared distance between two points - this is cheaper than the actual distance as it doesn't involve a square root
EXAMPLE: dist2 = DistanceSquared(models[j].origin, center)
void Float(<value>)
- [MANDATORY] <value> A string or integer number to cast to a float
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Casts a string or an integer to a float
EXAMPLE: x = Float( floatValString )
void Floor(<a>)
- [MANDATORY] <a> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the floor of floating point value <a>. This effectively rounds down Floor(2.7) == 2, Floor(3.9) == 3.
EXAMPLE: rounded_down = Floor( val )
void ForwardRotateAroundUpByAngle(<angles1>,<degrees>)
- [MANDATORY] <angles1>
- [MANDATORY] <degrees>
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: returns a vector that is the result of angles1 forward vector rotated around its up by degrees
EXAMPLE: v=ForwardRotateByAngles( player_angles, frustum_edge_angle )
void GetMinBitCountForNum(<uint>)
- [MANDATORY] <uint> The integer a minimum bit count is needed for
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the minimum number of bits needed to express the provided integer
EXAMPLE: GetMinBitCountForNum( 15 ) returns 4
void Int(<value>)
- [MANDATORY] <value> A string or floating point number to cast to an integer
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Casts a floating point number or a string to an integer
EXAMPLE: x = Int( self.HUDHealthHeight )
void Length(<vector>)
- [MANDATORY] <vector> A vector
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the length of the given vector
EXAMPLE: dist = Length(models[j].origin - center)
void LengthSquared(<vector>)
- [MANDATORY] <vector> A vector
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the squared vector length for the given vector - this is cheaper than the actual vector length as it doesn't involve a square root
EXAMPLE: dist2 = LengthSquared(models[j].origin - center)
void LerpFloat(<from>,<to>,<time>)
- [MANDATORY] <from> Floating point value, start of the range
- [MANDATORY] <to> Floating point value, end of the range
- [MANDATORY] <time> Floating point value in the range of 0 - 1
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a lerped value between <from> and <to> based on <time>
EXAMPLE: val = LerpFloat( 0, 10, 0.5); // would return 5.0
void LerpVector(<from>,<to>,<time>)
- [MANDATORY] <from> Vector, start of the range
- [MANDATORY] <to> Vector, end of the range
- [MANDATORY] <time> Floating point value in the range of 0 - 1
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a lerped vector value between <from> and <to> based on <time>
EXAMPLE: val = LerpVector( (0,0,0), (5,5,5), 0.5); // would return (2.5, 2.5, 2.5)
void Log(<number>)
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the logarithm of a number to base 10
EXAMPLE: y = Log( x )
void MapFloat(<timeMin>,<timeMax>,<from>,<to>,<time>)
- [MANDATORY] <timeMin> Floating point value, min time value
- [MANDATORY] <timeMax> Floating point value, max time value
- [MANDATORY] <from> Floating point value, start of the result range
- [MANDATORY] <to> Floating point value, end of the result range
- [MANDATORY] <time> Floating point value in the range from <timeMin> to <timeMax>
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a lerped value between <from> and <to> based on <time>. <time> is a value between <timeMin> and <timeMax>.
EXAMPLE: val = MapFloat( 1, 2, 0, 10, 1.5); // would return 5.0
void Max(<a>,<b>)
- [MANDATORY] <a> A float or integer value.
- [MANDATORY] <b> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns whichever of <a> or <b> is larger.
EXAMPLE: largest = Max( val1, val2 )
void Min(<a>,<b>)
- [MANDATORY] <a> A float or integer value.
- [MANDATORY] <b> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns whichever of <a> or <b> is smallest.
EXAMPLE: smallest = Min( val1, val2 )
void PackRgba(<red>,<green>,<blue>,<alpha>)
- [MANDATORY] <red> as a float 0.0-1.0
- [MANDATORY] <green> as a float 0.0-1.0
- [MANDATORY] <blue> as a float 0.0-1.0
- [MANDATORY] <alpha> as a float 0.0-1.0
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Packs rgba into a single int.
EXAMPLE: Byte4PackRgba( 1.0, 1.0, 1.0, 1.0 )
void PointOnSegmentNearestToPoint(<SegmentA>,<SegmentB>,<P>)
- [MANDATORY] <SegmentA> One endpoint of the line segment
- [MANDATORY] <SegmentB> Other endpoint of the line segment
- [MANDATORY] <P> The point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Given a line segment and a point P, this returns the point on the segment that is closest to P.
EXAMPLE: nearestPoint = PointOnSegmentNearestToPoint( A, B, P )
NOTES: This function will return A or B if P is beyond these two points.
void Pow(<exp>)
- [MANDATORY] <exp> A float or integer value, <b>."
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Return the value of base raised to exp power.
EXAMPLE: c = pow( 2, 4 )
void Project2Dto3D(<clientnum>,<x>,<y>,<depth>)
- [MANDATORY] <clientnum> clientnumber - needed for viewport selection.
- [MANDATORY] <x> screen space x coord (-1,1)
- [MANDATORY] <y> screen space y coord (-1,1)
- [MANDATORY] <depth> depth to assume near clip is at (at this depth the screen will be edge to edge)
CATEGORY: Math
CLIENT/SERVER: Client
SUMMARY: returns a world coordinate that projects to the given 2d coordinate ((-1,1),(-1,1))
EXAMPLE: v=Project2DTo3D( 0, -1, -1, 5)
void Project3Dto2D(<clientnum>,<world_coordinate>)
- [MANDATORY] <clientnum> client number - needed for viewport selection.
- [MANDATORY] <world_coordinate> world space vector
CATEGORY: Math
CLIENT/SERVER: Client
SUMMARY: returns a screen coordinate vector (virtual UI coord) of a 3d coordinate
EXAMPLE: hudPosition = Project3DTo2D( 0, target_pos )
void RandomFloat(<max>)
- [MANDATORY] <max> The maximum floating point size
CATEGORY: Math
CLIENT/SERVER: Server
SUMMARY: Returns a random floating point number r, where 0 <= r < max
EXAMPLE: if ( RandomFloat( 100 ) > 50 ) ...
void RandomFloatRange(<min>,<max>)
- [MANDATORY] <min> The minimum result
- [MANDATORY] <max> The maximum result
CATEGORY: Math
CLIENT/SERVER: Server
SUMMARY: Returns a random floating point number r, where min <= r < max
EXAMPLE: rand = RandomFloatRange( 3.0, 5.0 )
void RandomInt(<max>)
- [MANDATORY] <max> The maximum integer size
CATEGORY: Math
CLIENT/SERVER: Server
SUMMARY: Returns a random integer between 0 and max-1 inclusive
EXAMPLE: if ( RandomInt( 100 ) > 50 ) ...
void RandomIntRange(<min>,<max>)
- [MANDATORY] <min> The minimum result
- [MANDATORY] <max> The maximum result + 1
CATEGORY: Math
CLIENT/SERVER: Server
SUMMARY: Returns a random integer r, where min <= r < max
EXAMPLE: rand = RandomIntRange( 3, 5 )
void RotatePoint(<point>,<angles>)
- [MANDATORY] <point> A point.
- [MANDATORY] <angles> An angle.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns <angle> lerped angle value.
EXAMPLE: rotatedPoint = RotatePoint(point, angle )
void RotatePointAroundAxis(<point>,<axis direction>,<degrees>)
- [MANDATORY] <point>
- [MANDATORY] <axis direction>
- [MANDATORY] <degrees>
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: returns a vector that is the result of point rotated around the axis vector by num degrees
EXAMPLE: v = RotatePointAroundAxis( point, up, degrees )
void Sin(<angle>)
- [MANDATORY] <angle> An angle in degrees
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the sin of an angle
EXAMPLE: frac = Sin( degrees )
void Sqrt(<a>)
- [MANDATORY] <a> A float or integer value.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the square-root of floating point value <a>.
EXAMPLE: c = sqrt( (a*a) + (b*b) )
void Tan(<angle>)
- [MANDATORY] <angle> An angle in degrees
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the tan of an angle
EXAMPLE: frac = Tan( degrees )
void VectorCross(<vector a>,<vector b>)
- [MANDATORY] <vector a> The first vector
- [MANDATORY] <vector b> The second vector
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the cross product of two vectors
void VectorDot(<vector a>,<vector b>)
- [MANDATORY] <vector a> The first vector
- [MANDATORY] <vector b> The second vector
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the dot product of two vectors
void VectorFromLineToPoint(<SegmentA>,<SegmentB>,<P>)
- [MANDATORY] <SegmentA> One point on the line
- [MANDATORY] <SegmentB> Another point on the line
- [MANDATORY] <P> The point
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Given a line and a point P, this returns a vector perpendicular to the line and pointing from the line to P.
EXAMPLE: myvector = VectorFromLineToPoint( A, B, P )
void VectorLerp(<from>,<to>,<fraction>)
- [MANDATORY] <from> The vector whose value is used when fraction is 0
- [MANDATORY] <to> The vector whose value is used when fraction is 1
- [MANDATORY] <fraction> The fraction of the way between vectors. Values less than 0 or greater than 1 do linear extrapolation.
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Linear interpolates between two vectors.
EXAMPLE: color = VectorLerp(oldColor, newColor, timeElapsed / timeTotal)
void VectorNormalize(<vector>)
- [MANDATORY] <vector> The vector to normalize
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a normalized copy of this vector
EXAMPLE: difference = VectorNormalize(end - start)
void VectorProjection(<vector a>,<vector b>)
- [MANDATORY] <vector a> The first vector
- [MANDATORY] <vector b> The second vector
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns the vector projection of vector a onto vector b
void VectortoAngles(<vector>)
- [MANDATORY] <vector> The vector to convert to angles
CATEGORY: Math
CLIENT/SERVER: Both
SUMMARY: Returns a set of angles corresponding to the given vector.
EXAMPLE: angles = VectortoAngles(end - start)
void ViewAspect(<clientnum>)
- [MANDATORY] <clientnum> client number - needed for viewport selection.
CATEGORY: Math
CLIENT/SERVER: Client
SUMMARY: returns the horizontal screen aspect
EXAMPLE: viewAspect = ViewAspect( localClientNum )
void <player> ActionButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'action' button. Use this for when the player might be in a scripted sequence but might still press the jump button.
EXAMPLE: while( self ActionButtonPressed() )...
void <player> ActionSlotFourButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the action slot 4 button
EXAMPLE: if ( self ActionSlotFourButtonPressed() ) ...
void <player> ActionSlotOneButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the action slot 1 button
EXAMPLE: if ( self ActionSlotOneButtonPressed() ) ...
void <player> ActionSlotThreeButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the action slot 3 button
EXAMPLE: if ( self ActionSlotThreeButtonPressed() ) ...
void <player> ActionSlotTwoButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the action slot 2 button
EXAMPLE: if ( self ActionSlotTwoButtonPressed() ) ...
void <client> AddToDamageIndicator(<dmg>,[direction])
- [MANDATORY] <dmg> The damage
- [OPTIONAL] [direction] The direction of hit
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Add damage to damage indicator
EXAMPLE: self AddToDamageIndicator( int( armor_damage ), vDir)
void <player> AdsButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'ads' button.
EXAMPLE: while( self AdsButtonPressed() )...
void <player> AllowAds(<player ads>)
- [MANDATORY] <player ads>: A boolean. true if the player can switch to ADS, and false otherwise.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can switch to ADS
EXAMPLE: player AllowAds( false )
void <player> AllowCrouch(<player crouch>)
- [MANDATORY] <player crouch>: A boolean. true if the player can crouch, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can crouch
EXAMPLE: player AllowCrouch( false )
void <player> AllowDoubleJump(<on off>)
- [MANDATORY] <on off>: A boolean. true if the player can double jump, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can double jump
EXAMPLE: player AllowDoubleJump( false )
void <player> AllowJump(<player jump>)
- [MANDATORY] <player jump>: A boolean. True if the player can jump, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can jump
EXAMPLE: player AllowJump(false)
void <player> AllowLean(<player lean>)
- [MANDATORY] <player lean>: A boolean. true if the player can lean, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can lean
EXAMPLE: player AllowLean( false )
void <player> AllowMelee(<melee>)
- [MANDATORY] <melee>: A boolean. True if the player can melee, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can melee
EXAMPLE: player AllowMelee(false)
void <player> AllowMeleePowerLeft(<melee>)
- [MANDATORY] <melee>: A boolean. True if the player can melee power left, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can melee power left
EXAMPLE: player AllowMeleePowerLeft(false)
void <player> AllowProne(<player prone>)
- [MANDATORY] <player prone>: A boolean. true if the player can go prone, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can go prone
EXAMPLE: player AllowProne( false )
void <player> AllowSlide(<on off>)
- [MANDATORY] <on off>: A boolean. true if the player can slide, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can slide
EXAMPLE: player AllowSlide( false )
void <player> AllowSpectateTeam(<team>,<spectate>)
- [MANDATORY] <team> A string description of the team. Valid teams are 'axis', 'allies', 'none' or 'freelook'
- [MANDATORY] <spectate> A boolean value describing whether this player can spectate on this team.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set whether the player can spectate the given team.
EXAMPLE: self AllowSpectateTeam( "axis", true )
void <player> AllowSprint(<player sprint>)
- [MANDATORY] <player sprint>: A boolean. True if the player can sprint, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can sprint
EXAMPLE: player AllowSprint(false)
void <player> AllowStand(<player stand>)
- [MANDATORY] <player stand>: A boolean. true if the player can stand, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can stand up
EXAMPLE: player AllowStand( false )
void <player> AllowWallRun(<on off>)
- [MANDATORY] <on off>: A boolean. true if the player can wallrun, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player can wall run
EXAMPLE: player AllowWallRun( false )
void <player> AnyAmmoForWeaponModes(<weapon>)
- [MANDATORY] <weapon> The weapon to check
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the weapon has any ammo left
EXAMPLE: if ( !(self AnyAmmoForWeaponModes( weapon )) )
void <player> ApplyKnockBack(<amount>,[dir])
- [MANDATORY] <amount> the amount of knockback to apply
- [OPTIONAL] [dir] the direction of knockback to apply
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Applies a knockback on a player.
EXAMPLE: player ApplyKnockBack( 10, dir )
void <player> AreControlsFrozen()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the controls are frozen
EXAMPLE: if( player AreControlsFrozen() )
void <player> AttackButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the fire button
EXAMPLE: if ( self AttackButtonPressed() ) ...
void <player> BeginLocationAirstrikeSelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location air strike selection
EXAMPLE: self BeginLocationAirstrikeSelection( LOCATION_SELECTOR )
void <player> BeginLocationArtillerySelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location artillery selection
EXAMPLE: self BeginLocationArtillerySelection( LOCATION_SELECTOR )
void <player> BeginLocationComlinkSelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location com link selection
EXAMPLE: self BeginLocationComlinkSelection( LOCATION_SELECTOR, 1000 )
void <player> BeginLocationMortarSelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location mortar selection
EXAMPLE: self BeginLocationMortarSelection( LOCATION_SELECTOR, 1500 )
void <player> BeginLocationNapalmSelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location napalm selection
EXAMPLE: self BeginLocationNapalmSelection( LOCATION_SELECTOR )
void <player> BeginLocationSelection(<selection name>,[radius])
- [MANDATORY] <selection name> The selection name
- [OPTIONAL] [radius] The radius of the selection
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begin a location selection
EXAMPLE: self BeginLocationSelection( LOCATION_SELECTOR )
void <player> BoostButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the change seat (Y) button
EXAMPLE: if ( self BoostButtonPressed() ) ...
void <bot> BotSetRandomCharacterCustomization()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Equips this class number with the default class
EXAMPLE: self BotSetRandomCharacterCustomization()
void <player> ButtonBitState(<button>)
- [MANDATORY] <button>: name of button to check "BUTTON_BIT_ATTACK" for example, optionally can include as many button names as desired. Returns true if all buttons indicated are true.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Return true if the button_bit(s) indicated are pressed (note: there is no way to know exactly which buttons are pressed on the client, since everything is remapped into these bit values)
EXAMPLE: if ( self ButtonBitState( "BUTTON_BIT_ATTACK") ) ...
NOTES: You really shouldn't be using this, unless you KNOW that you should. See buttonbits.h for button bit names.
void <player> ButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K", etc...
EXAMPLE: while( self ButtonPressed( "BUTTON_A" ) ) ...
NOTES: (it will only check the host player's buttons though)
void <player> CalcPlayerOptions(<custom class slot>)
- [MANDATORY] <custom class slot> The custom class slot
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Calculate player options
EXAMPLE: playerRenderOptions = self CalcPlayerOptions( class_num )
void <player> CalcWeaponOptions(<custom class slot>,<weapon slot>)
- [MANDATORY] <custom class slot> The custom class slot
- [MANDATORY] <weapon slot> primary weapon=0 or secondary weapon=1 or knife weapon=2
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Calculates weapon options
EXAMPLE: primaryWeaponOptions = self CalcWeaponOptions( class_num, 0 )
void <player> CameraActivate(<active>)
- [MANDATORY] <active> True to activate the camera, false to turn it off and return to 1st person view
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Turns the script camera on or off.
EXAMPLE: get_players()[0] CameraActivate( true )
void <player> CameraSetAngles([position])
- [OPTIONAL] [position] Either an entity to focus the camera on or a vector defining the camera's focus point
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the focus point of the script camera.
EXAMPLE: get_players()[0] CameraSetAngles( ( 1100, -23, 644 ) )get_players()[0] CameraSetAngles( my_entity )
void <player> CameraSetLookAt([position])
- [OPTIONAL] [position] Either an entity to focus the camera on or a vector defining the camera's focus point
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the focus point of the script camera.
EXAMPLE: get_players()[0] CameraSetLookAt( ( 1100, -23, 644 ) )get_players()[0] CameraSetLookAt( my_entity )
void <player> CameraSetPosition(<position>,[angles])
- [MANDATORY] <position> Either an entity to link the camera to or a vector defining the world position
- [OPTIONAL] [angles] The angles to set for the camera
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the position of the script camera.
EXAMPLE: get_players()[0] CameraSetPosition( ( 1100, -23, 644 ) )get_players()[0] CameraSetPosition( my_entity )
void <player> CanPlaceRiotshield()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Try to place riotshield where the player is standing. return an array containing placement "result", "origin", and "angles
EXAMPLE: placement = level.player CanPlaceRiotshield()
void <player> CanPlayerPlaceTurret()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Try to place a Turret where the player is looking. It'll return an array containing the placement "result", "origin", and "angles".
EXAMPLE: placement = level.player CanPlayerPlaceTurret()
void <player> CanPlayerPlaceVehicle(<radius>,<height>,<forward Distance>,<up Distance>,<sweep Distance>,<min normal>)
- [MANDATORY] <radius> Radius of the bounds check
- [MANDATORY] <height> Height of the bounds check
- [MANDATORY] <forward Distance> Distance away from player origin.
- [MANDATORY] <up Distance> Distance up from player origin.
- [MANDATORY] <sweep Distance> Distance to sweep downwards.
- [MANDATORY] <min normal> Minimum hit normal needed to be pass.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Try to place a vehicle in front of the player. It'll return an array containing the placement "result", "origin", and "angles".
EXAMPLE: placement = level.player CanPlayerPlaceVehicle( 25, 45, 50, 40, 80, 0.7 )
entity <player> CantSeeEntities(<entArray>,<dotRange>,<trace>)
- [MANDATORY] <entArray> The entities to check against
- [MANDATORY] <dotRange> The cosine of the angle representing your fov
- [MANDATORY] <trace> Perform a trace for entities
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the set of entities that a player cannot see within a given angle, given a set of entities
EXAMPLE: if( isplayer( self.enemy ) && self.enemy CantSeeEntities( entArray, 67 ) )
void <player> CarryTurret(<turret>,<offset>,<angleOffset>)
- [MANDATORY] <turret> The turret entity
- [MANDATORY] <offset> the offset from the player to place the turret
- [MANDATORY] <angleOffset> the angle offset of the turret
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Links the auto turret to the player to carry around.
EXAMPLE: player CarryTurret( turret, offset, angleOffset )
void <player> ChangeSeatButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the change seat (Y) button
EXAMPLE: if ( self ChangeSeatButtonPressed() ) ...
void <client> ClearDamageIndicator()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Clear damage indicator
EXAMPLE: self ClearDamageIndicator()
void <player> ClearPerks()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: removes all perks for a player
EXAMPLE: player ClearPerks()
entity <client> ClonePlayer(<deathAnimationDuration>,<killing weapon>,<attacker>)
- [MANDATORY] <deathAnimationDuration> the duration of the death animation
- [MANDATORY] <killing weapon> weapon that killed the player
- [OPTIONAL] <attacker> attacker that killed the player
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: clone the player's model for death animations.
EXAMPLE: body = self ClonePlayer(deathAnimDuration)
void <client> CloseInGameMenu()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: close the in game menu for this client.
EXAMPLE: player CloseInGameMenu()
void <player> CloseLUIMenu(<lui menu handle>)
- [MANDATORY] <lui menu handle> handle to the lui menu.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Closes the given lui menu and returns true if it finds the menu and succeeds in closing it, false otherwise.
EXAMPLE: player CloseLUIMenu( menu )
void <client> CloseMenu(<menu index>)
- [MANDATORY] <menu index> The precached menu index of type "menu"
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: close the specified menu for this client.
EXAMPLE: player CloseMenu( game[ "menu_changeclass" ] )
entity <client> CreateFlashbackClone()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: clone the player's model for temporary flashback model
EXAMPLE: body = self CreateFlashbackClone()
void <player> DamageRiotShield()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Apply damage to a player riot shield or other weapon that supports damage states.
EXAMPLE: newhealth = player DamageRiotShield( 100 ) )
void <player> DeathStreakActive()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if player's death streak is active
EXAMPLE: if( player DeathStreakActive() )
void <player> DisableDeathStreak()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable player's death streak
EXAMPLE: player DisableDeathStreak()
void <player> DisableInvulnerability()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Makes player vulnerable to damage. This is default behavior
EXAMPLE: player DisableInvulnerability()
void <player> DisableOffhandWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable the player's offhand weapons
EXAMPLE: player DisableOffhandWeapons()
void <player> DisableRoundStartDelay()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable players weapon after round start delay
EXAMPLE: player DisableRoundStartDelay()
void <player> DisableUsability()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disables usability for the player
EXAMPLE: player DisableUsability()
void <player> DisableWeaponCycling()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable the player's weapon cycling
EXAMPLE: player DisableWeaponCycling()
void <player> DisableWeaponFire()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable the player's weapon fire
EXAMPLE: player DisableWeaponFire(()
void <player> DisableWeapons([quick])
- [OPTIONAL] [quick] Set the Disable weapons quick flag
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable the weapons of the player
EXAMPLE: self DisableWeapons()
entity <player> DropItem(<item name>,[dropTag])
- [MANDATORY] <item name> the name of the item to drop
- [OPTIONAL] [dropTag] If specified drop and snap the weapon to this tag
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Drop an item with the given item name
EXAMPLE: self DropItem( current )
entity <player> DropScavengerItem(<item name>)
- [MANDATORY] <item name> the name of the item to drop
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Drop an item with the given item name. This item will be only available to those with the scavenger perk
EXAMPLE: self DropScavengerItem( "scavenger_item_mp" )
void <player> EnableDeathStreak()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable player's death streak
EXAMPLE: player EnableDeathStreak()
void <player> EnableInvulnerability()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Makes player invulnerable to damage
EXAMPLE: player EnableInvulnerability()
void <player> EnableOffhandWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable the player's offhand weapons
EXAMPLE: player EnableOffhandWeapons()
void <player> EnableRoundStartDelay()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Disable the players weapon during round start
EXAMPLE: player EnableRoundStartDelay()
void <player> EnableUsability()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enables usability for the player
EXAMPLE: player EnableUsability()
void <player> EnableWeaponCycling()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable the player's weapon cycling
EXAMPLE: player EnableWeaponCycling()
void <player> EnableWeaponFire()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable the player's weapon fire
EXAMPLE: player EnableWeaponFire()
void <player> EnableWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enables the weapons of the player
EXAMPLE: self EnableWeapons()
void <player> EndLocationSelection()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Ends location selection
EXAMPLE: self endLocationSelection()
void <player> FakeDamageFrom(<dir>)
- [MANDATORY] <dir> The direction to take damage from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Make the player take damage from the given direction
EXAMPLE: self FakeDamageFrom(vDir)
void <client> finishMeleeHit(<Attacker>,<Weapon>,<Origin>,<Direction>,<bone index>,<shieldHit>,<hit>,<fromBehind>)
- [MANDATORY] <Attacker> The entity that is attacking.
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
- [MANDATORY] <Origin> (vector) The origin of the damage
- [MANDATORY] <Direction> (vector) The direction of the damage
- [MANDATORY] <bone index> Which bone was the closest to the hit
- [MANDATORY] <shieldHit> Was the hit delivered against a shield
- [MANDATORY] <hit> Was the hit successful or a swipe
- [MANDATORY] <fromBehind> Was the hit from behind the victim
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Notifies the clients of the melee hit or miss
EXAMPLE: self finishMeleeHit( eAttacker, sWeapon, vPoint, vDir, iBoneIndex, bHit )
void <client> FinishPlayerDamage(<Inflictor>,<Attacker>,<Damage>,<Damage Flags>,<Means Of Death>,<Weapon>,<Point>,<Direction>,<Hit Loc>,<Damage Origin>,<Offset Time>,<bone index>,<Surface Normal>)
- [MANDATORY] <Inflictor> The entity that causes the damage.(e.g. a turret)
- [MANDATORY] <Attacker> The entity that is attacking.
- [MANDATORY] <Damage> Integer specifying the amount of damage done
- [MANDATORY] <Damage Flags> Integer specifying flags that are to be applied to the damage
- [MANDATORY] <Means Of Death> Integer specifying the method of death
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
- [MANDATORY] <Point> Damage point
- [MANDATORY] <Direction> (vector) The direction of the damage
- [MANDATORY] <Hit Loc> The location of the hit
- [MANDATORY] <Damage Origin> Where the damage originated from.
- [MANDATORY] <Offset Time> The time offset for the damage
- [MANDATORY] <bone index> Which bone was the closest to the hit
- [MANDATORY] <Surface Normal> The normal of the surface impacted.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Does damage to a player - usually as part of the damage callback
EXAMPLE: self FinishPlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, iBone, vDamageOrigin, psOffsetTime, vSurfaceNormal )
void <player> ForceGrenadeThrow()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Forces the player to throw a held grenade
EXAMPLE: player ForceGrenadeThrow()
void <player> ForceOffHandEnd()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Force the player to not use offhand weapon
EXAMPLE: self forceoffhandend()
void <player> ForceSlick(<slick>)
- [MANDATORY] <slick>: A boolean. True if the player is on a slick surface, and false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether the player is forced to be on a slick surface
EXAMPLE: player ForceSlick(true)
void <player> FragButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the frag button
EXAMPLE: if ( self FragButtonPressed() ) ...
void <player> FreezeControls(<freeze state>)
- [MANDATORY] <freeze state>: true if the player's controls are frozen, false otherwise.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Blocks or unblocks control input from this player
EXAMPLE: player FreezeControls( true )
void <player> FreezeControlsAllowLook(<freeze state>)
- [MANDATORY] <freeze state>: true if the player's controls are frozen, false otherwise.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Blocks or unblocks control input from this player, but allows the player to look around
EXAMPLE: level.player FreezeControlsAllowLook( true )
void <player> GamepadUsedLast()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is playing with a gamepad.
EXAMPLE: if( player GamepadUsedLast() )
void <player> GetCharacterBodyModel(<modelType>)
- [OPTIONAL] <modelType> The index of the model type, defaults to CCBODY_MODEL_THIRDPERSON
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the body model for this player as selected in character customization
EXAMPLE: self GetCharacterBodyModel()
void <player> GetCharacterBodyRenderOptions()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the body render options for this player
EXAMPLE: self GetCharacterBodyRenderOptions()
void <player> GetCharacterBodyType()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the character body type for the player.
EXAMPLE: bodyIndex = self GetCharacterBodyType( )
void <player> GetCharacterHeadModel()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the head model for this player
EXAMPLE: self GetCharacterHelmetModel()
void <player> GetCharacterHelmetModel(<modelType>)
- [OPTIONAL] <modelType> The index of the model type, defaults to CCBODY_MODEL_THIRDPERSON
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the helmet model for this player as selected in character customization
EXAMPLE: self GetCharacterHelmetModel()
void <player> GetControllerUIModelValue(<ui model data path from controller>)
- [MANDATORY] <ui model data path from controller> precached name string for the data which we're trying to get.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
EXAMPLE: player GetControllerUIModelValue( "hudItems.regenDelayProgress")
void <player> GetCurrentOffHand()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the current offhand weapon
EXAMPLE: weapon = self GetCurrentOffhand()
void <player> GetCurrentWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current player weapon
EXAMPLE: currentweapon = player GetCurrentWeapon()
void <player> GetCurrentWeaponAltWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the alt weapon for the players current weapon. Returns "none
EXAMPLE: currentweapon = player GetCurrentWeaponAltWeapon()
void <player> GetCurrentWeaponSpinLerp()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current weapon spin
EXAMPLE: weapon_spin_lerp = self GetCurrentWeaponSpinLerp()
void <entity> GetEnemyDogTagModel()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the enemy of the dog tag model currently associated character body
EXAMPLE: friendly_model = player GetEnemyDogTagModel( )
void <player> GetFractionMaxAmmo(<weapon>)
- [MANDATORY] <weapon> The weapon to give max ammo to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get fraction of the max ammo
EXAMPLE: frac = players[i] GetFractionMaxAmmo( lethal_grenade )
void <player> GetFractionStartAmmo(<weapon>)
- [MANDATORY] <weapon> The weapon to give ammo to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give fraction of start ammo to the player for the weapon
EXAMPLE: start = player GetFractionStartAmmo( weapon )
entity <player> GetFriendlies([bool])
- [OPTIONAL] [bool] true, return only players that are alive, false return all players
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns an array of friendly players. The player called on is not included in the array.
EXAMPLE: friends = self GetFriendlies()
void <entity> GetFriendlyDogTagModel()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the friendly of the dog tag model currently associated character body
EXAMPLE: friendly_model = player GetFriendlyDogTagModel( )
void <player> GetGunAngles()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's gun angles
EXAMPLE: angles = player GetGunAngles()
void <player> GetHeroAbilityName()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the name of the weapon assigned to the currently selected body
EXAMPLE: weaponName = self GetHeroAbilityName()
void <player> GetHeroWeaponName()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the name of the weapon assigned to the currently selected body
EXAMPLE: weaponName = self GetHeroWeaponName()
void <player> GetInventoryHeldWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the player's inventory held weapon
EXAMPLE: inventoryWeapon = player GetInventoryHeldWeapon()
void <player> GetInventoryWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the inventory weapon
EXAMPLE: inventoryWeapon = self GetInventoryWeapon()
void <player> GetIpAddress()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the ip address of the player
EXAMPLE: ipAddress = self GetIpAddress()
void <player> GetLeagueTeamID()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the league team ID
EXAMPLE: id = player GetLeagueTeamID()
void <player> GetLightingState()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current lighting state for the player
EXAMPLE: ls = player GetLightingState()
void <player> GetLockOnLossRadius()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the lock on loss radius for the currently equipped heatseeking launcher.
EXAMPLE: radius = player GetLockOnRadius()
void <player> GetLockOnOrigin(<bool>)
- [MANDATORY] <bool>: true or false.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: gets the origin to use for the replay gun lockon on the entity
EXAMPLE: player GetLockOnOrigin( entity )
void <player> GetLockOnRadius()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the lock on radius for the currently equipped heatseeking launcher.
EXAMPLE: radius = player GetLockOnRadius()
void <player> GetLockOnSpeed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the lock on speed in miliseconds for the currently equipped heatseeking launcher.
EXAMPLE: speed = player GetLockOnSpeed()
void <player> GetLUIMenu(<lui menu name>)
- [MANDATORY] <lui menu name> name of the menu.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns a handle to a lui menu.
EXAMPLE: player GetLUIMenu( "myMenu" )
void <player> GetLUIMenuData(<lui menu handle>,<lui menu data name>)
- [MANDATORY] <lui menu handle> handle for the lui menu.
- [MANDATORY] <lui menu data name> name of the data which had been set on the menu.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current value for the given data name.
EXAMPLE: player GetLUIMenuData( menu, "title" )
void <entity> GetMpDialogName()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the name of the mpdialog bundle of the currently associated character body
EXAMPLE: mpDialogBundleName = player GetMpDialogName( )
void <player> GetNormalizedCameraMovement()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's camera movement normalized
EXAMPLE: v_stick = player GetNormalizedCameraMovement()
void <player> GetNormalizedMovement()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's movement normalized
EXAMPLE: norm_move = self GetNormalizedMovement()
void <player> GetOffHandSecondaryClass()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get whether the player is using a flash or smoke
EXAMPLE: offhand_secondary = self GetOffHandSecondaryClass()
void <player> GetPerks()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns an array of all player perks. The array is size 0 if the player has no perks.
EXAMPLE: perks = player GetPerks()
void <player> GetPlayerAngles()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player view angles
EXAMPLE: angles = player GetPlayerAngles()
void <player> GetPlayerAttachmentCosmeticVariantIndexes(<weapon>)
- [MANDATORY] <weapon> The weapon to get acvi from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's held weapon acvi
EXAMPLE: acvi = self GetPlayerAttachmentCosmeticVariantIndexes( weapon )
void <player> GetPlayerCameraPos()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's camera position
EXAMPLE: vieworg = player GetPlayerCameraPos()
void <player> GetPlayerGenderType(<mode>)
- [MANDATORY] <mode> SessionMode
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the gender string of the player
EXAMPLE: if ( self GetPlayerGenderType() == "male" )
void GetPlayerMovementState()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the player movement state for the match record.
void <player> GetPlayerSelectedGesture(<gestureType>)
- [MANDATORY] <gestureType> The type of gesture to get
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the equipped gesture
EXAMPLE: gesture = player GetPlayerSelectedGesture( 0 )
void <player> GetPlayerSelectedTaunt(<tauntType>)
- [MANDATORY] <tauntType> The type of taunt to get
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the equipped taunt
EXAMPLE: taunt = player GetPlayerSelectedTaunt( 0 )
void <player> GetPlayerShowcaseWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the showcase weapon of the given player
EXAMPLE: showcaseWeapon = player GetPlayerShowcaseWeapon()
void <player> GetPlayerViewHeight()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the player's view height
EXAMPLE: height = player GetPlayerViewHeight()
void <player> getreplaygunlockonorigin(<bool>)
- [MANDATORY] <bool>: true or false.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: gets the origin to use for the replay gun lockon on the entity
EXAMPLE: player GetLockOnOrigin( entity )
void <player> GetSnapshotAckIndex()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the snapshot acknowledgment index
EXAMPLE: num = self getsnapshotackindex()
void <player> GetSunShadowSplitDistance()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current sun shadow split difference for the player
EXAMPLE: distance = player GetSunShadowSplitDistance()
void <player> GetTargetScreenAngles(<targetpos>)
- [MANDATORY] <targetpos> The position to get angles for.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get target screen view angles
EXAMPLE: angles = self GetTargetScreenAngles( targetpos )
void <player> GetVehicleBoostTime()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the vehicle's max boost time
EXAMPLE: boostTime = player GetVehicleBoostTime()
void <player> GetVehicleBoostTimeLeft()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the vehicle's remaining boost time
EXAMPLE: boostTimeLeft = player GetVehicleBoostTimeLeft()
entity <player> GetVehicleFocusEntity()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the current vehicle focus entity for the player
EXAMPLE: focusEnt = player GetVehicleFocusEntity()
void <player> GetVehicleMinBoostTime()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the vehicle's min boost time needed in order to boost
EXAMPLE: minBoostTime = player GetVehicleMinBoostTime()
entity <player> GetVehicleOccupied()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns the vehicle entity that the player occupies. If player isn't in a vehicle then this causes an error.
EXAMPLE: self GetVehicleOccupied()
void <player> GetWeaponAcvi(<weapon>)
- [MANDATORY] <weapon> The weapon
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets weapon options from held weapon
EXAMPLE: primaryWeaponAcvi = self GetWeaponAcvi( weapon )
void <player> GetWeaponAmmoClip(<weapon>)
- [MANDATORY] <weapon> The weapon to get ammo count from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the weapon's ammo count in clip
EXAMPLE: ammo = self GetWeaponAmmoClip( weapon )
void <player> GetWeaponAmmoFuel(<weapon>)
- [MANDATORY] <weapon> The weapon to get fuel count from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the weapon's fuel count
EXAMPLE: fuel = self GetWeaponAmmoFuel( weapon )
void <player> GetWeaponAmmoStock(<weapon>)
- [MANDATORY] <weapon> The weapon to get ammo count from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the weapon's total ammo count
EXAMPLE: ammo = self GetWeaponAmmoStock( weapon )
void <player> GetWeaponForWeaponRoot(<weapon>)
- [MANDATORY] <weapon> The weapon to check
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns a weapon that the player is holding that has the same weapon root. Returns undefined if the player is not holding the weapon.
EXAMPLE: weapon_with_attachments = player GetWeaponForWeaponRoot( <weapon> )
void <player> GetWeaponOptions(<weapon>)
- [MANDATORY] <weapon> The weapon to get options from
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get the weapon's render options
EXAMPLE: weaponOptions = self GetWeaponOptions( weapon )
void <player> GetWeaponsList([include_alt_modes])
- [OPTIONAL] [include_alt_modes] 1/True to include alt-mode weapons
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets an array of all weapons that the player has. Alt-mode weapons by default are not included
EXAMPLE: weapList = player GetWeaponsList()
void <player> GetWeaponsListPrimaries()
CATEGORY: Player
CLIENT/SERVER: Server
void <entity> GiveDedicatedShadow(<entity>)
- [MANDATORY] <entity> The entity to enable the dedicated shadow on
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the model lod bias
EXAMPLE: player GiveDedicatedShadow( 8 )
void <player> GiveMaxAmmo(<weapon>)
- [MANDATORY] <weapon> The weapon to give ammo to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give the weapon max ammo
EXAMPLE: self GiveMaxAmmo( primary )
void <player> GiveNextBaseWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give the player the next base weapon
EXAMPLE: self GiveNextBaseWeapon()
void <player> GiveStartAmmo(<weapon>)
- [MANDATORY] <weapon> The weapon to give ammo to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give the weapon initial ammo
EXAMPLE: self GiveStartAmmo( primary )
void <player> GiveWeapon(<weapon>,[options],[acvi])
- [MANDATORY] <weapon> The weapon to give
- [OPTIONAL] [options] The weapon options
- [OPTIONAL] [acvi] The attachment cosmetic variant index
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give a weapon to the player
EXAMPLE: e_player GiveWeapon( w_spike_launcher )
void <player> GiveWeaponNextAttachment(<attachment point>)
- [MANDATORY] <attachment point> The attachment point name
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Give the weapon the next attachment
EXAMPLE: self giveweaponnextattachment( "muzzle" )
void <player> HasAGrenadePulledBack()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: check is a client has a grenade (any type including special) currently pulled back
EXAMPLE: self HasAGrenadePulledBack( )
void <player> HasMaxPrimaryWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player has maximum primary weapons
EXAMPLE: if( self HasMaxPrimaryWeapons() )
void <player> HasPerk(<perk name>)
- [MANDATORY] <perk name> the perk to check
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: test if player has a perk
EXAMPLE: player HasPerk( "specialty_gpsjammer" )
void <player> HasRiotShield()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Return true if player has a riot shield in their inventory.
EXAMPLE: if ( player HasRiotShield() )
void <player> HasWeapon(<weapon>,<ignore_attachments>)
- [MANDATORY] <weapon> The weapon to check
- [OPTIONAL] <ignore_attachments> Only check the root weapon, ignore all the attachments.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player has the given weapon
EXAMPLE: if( e_player HasWeapon( w_spike_launcher, true ) )
void <player> HideViewModel()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Hide the player's current view model.
EXAMPLE: player HideViewModel()
void <player> InitialWeaponRaise(<weapon name>)
- [MANDATORY] <weapon name> The weapon to try first raise anim with
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Setup weaponstate to force first raise animation
EXAMPLE: self InitialWeaponRaise( "ak47" )
void <player> InventoryButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the inventory button
EXAMPLE: if ( self InventoryButtonPressed() ) ...
void <player> IsCarryingTurret()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if player is carrying turret or not.
EXAMPLE: player IsCarryingTurret()
void <player> IsChargeShotPending()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if player has a charge shot pending with a charge shot weapon
EXAMPLE: if( self IsChargeShotPending() )
void <player> IsDroppingWeapon()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently dropping their weapon
EXAMPLE: player IsDroppingWeapon()
void <player> IsFiring()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently meleeing
EXAMPLE: player IsFiring()
void <player> IsGrappling()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently grappling
EXAMPLE: player IsGrappling()
void <player> IsHost()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is the host
EXAMPLE: player IsHost()
void <player> IsHostForBots()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the passed in entity is the host for bots
EXAMPLE: player IsHostForBots()
void <player> IsInMoveMode(<move_mode_1>,[move_mode_2])
- [MANDATORY] <move_mode_1> The move mode to check
- [OPTIONAL] [move_mode_2] The move mode to check
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is in either of the given move modes
EXAMPLE: if ( player IsInMoveMode( "ufo", "noclip" ) )
void <player> IsInVehicle()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this player is currently occupying a vehicle.
EXAMPLE: self IsInVehicle()
void <player> IsLocalToHost()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is on the same physical machine as the host
EXAMPLE: player IsLocalToHost()
void <player> IsLookingAt(<entity>)
- [MANDATORY] <entity> The entity to check
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is looking at entity
EXAMPLE: if( isplayer( self.enemy ) && self.enemy islookingat( self ) )
void <player> IsMeleeing()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently meleeing
EXAMPLE: player IsMeleeing()
void <player> IsPlayerOnSameMachine(<player>)
- [MANDATORY] <player> The player to test against
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this player is on the same machine as the other player.
EXAMPLE: if ( self IsPlayerOnSameMachine( player ) )
void <player> IsReloading()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently reloading
EXAMPLE: player IsReloading()
void <player> IsRemoteControlling()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this player is currently occupying a remote controlled entity.
EXAMPLE: self IsRemoteControlling()
void <player> IsSwitchingWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently switching weapons
EXAMPLE: player IsSwitchingWeapons()
void <player> IsTalking()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is talking via voice chat
EXAMPLE: if( player IsTalking() )
void <player> IsThrowingGrenade()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if the player is currently throwing a grenade
EXAMPLE: player IsThrowingGrenade()
void <player> IsUsingOffHand()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns true if player is using offhand weapon
EXAMPLE: if( self IsUsingOffHand() )
void <player> IsWeaponOverheating([get heatval],[weapon])
- [OPTIONAL] [get heatval] If positive pass back the heatval of the weapon (0 to 100).
- [OPTIONAL] [weapon] If present check this specific weapon otherwise check the player's current weapon.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Is the players Weapon Overheating?
EXAMPLE: self IsWeaponOverheating()
void <player> IsWeaponViewOnlyLinked()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Returns whether or not this player is linked to an enity with weapon view only linking.
EXAMPLE: self IsWeaponViewOnlyLinked()
void <player> JumpButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'jump' button.
EXAMPLE: while( self JumpButtonPressed() )...
void <player> LinkGuidedMissileCamera()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: set player eflags for the guided missile
EXAMPLE: player LinkGuidedMissileCamera()
void <player> LinkToMissile(missile entity to link the player to,[boost_enabled],[brake_enabled])
- [MANDATORY] missile entity to link the player to
- [OPTIONAL] [boost_enabled]: If true, the player can trigger missile boost
- [OPTIONAL] [brake_enabled]: If true, the player can trigger missile brake
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Links a player camera and controls to a missile
EXAMPLE: player LinkToMissile( rocket, true )
void <player> MeleeButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the melee button
EXAMPLE: if ( self MeleeButtonPressed() ) ...
void <player> MurderLine(<from>,<to>,<weapon>)
- [MANDATORY] <from> The from position
- [MANDATORY] <to> The to position
- [MANDATORY] <weapon> The weapon used
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Get all the enemy players on the line between given points and murder them to death
EXAMPLE: player MurderLine( origin, endpos, "kniferang_mp" )
void <player> NextPlayerRenderOption(<optionName>,<forward>)
- [MANDATORY] <optionName> The tag of the next option
- [MANDATORY] <forward> The delta
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the next player render option
EXAMPLE: level.dev_cac_player NextPlayerRenderOption( tag, forward )
void <player> OffhandSpecialButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the gadget button
EXAMPLE: if ( self OffhandSpecialButtonPressed() ) ...
void <player> OpenLUIMenu(<lui menu name>,[persistent])
- [MANDATORY] <lui menu name> name of the menu.
- [OPTIONAL] [persistent] the menu will remain open even if the player dies.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Opens a lui menu( has to be precahced ) and returns a handle to it.
EXAMPLE: player OpenLUIMenu( "myMenu", true )
void <player> OpenMenu(<menu index>)
- [MANDATORY] <menu index> The menu index
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Open the menu with the given menu index
EXAMPLE: self openMenu( game[ "menu_changeclass" ] )
void <player> OpenMenuNoMouse(<menu index>)
- [MANDATORY] <menu index> The menu index
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Open the menu with the given menu index
EXAMPLE: self OpenMenuNoMouse( game[ "menu_changeclass" ] )
void <player> PickupAmmoEvent([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Lets the client know a weapon was picked up
EXAMPLE: self PickupAmmoEvent( weapon )
void <player> PickupWeaponEvent([weapon])
- [MANDATORY] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Lets the client know a weapon was picked up
EXAMPLE: self PickupWeaponEvent( weapon )
void <player> PingPlayer()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Flashes a player on their teammate's compasses
EXAMPLE: self PingPlayer()
void <player> PlayBombDefuse()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Play the players bomb defuse animation
EXAMPLE: self PlayBombDefuse()
void <player> PlayBombPlant()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Play the players bomb plant animation
EXAMPLE: self PlayBombPlant()
void PlayClientAirstrike(<position>,<yaw>,<teamFaction>,<team>,<owner>,<exittype>,<height>)
- [MANDATORY] <position> The position of airstrike
- [MANDATORY] <yaw> The yaw
- [MANDATORY] <teamFaction> The team faction
- [MANDATORY] <team> The team
- [MANDATORY] <owner> The owner of airstike
- [MANDATORY] <exittype> The exit type
- [MANDATORY] <height> The height
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Plays the client sided part of the airstrike/bombrun
EXAMPLE: PlayClientAirstrike( pos, yaw, "marines", "axis", owner, "left", height )
void PlayClientNapalm(<position>,<yaw>,<teamFaction>,<team>,<owner>,<exittype>,<height>)
- [MANDATORY] <position> The position of Napalm
- [MANDATORY] <yaw> The yaw
- [MANDATORY] <teamFaction> The team faction
- [MANDATORY] <team> The team
- [MANDATORY] <owner> The owner of Napalm
- [MANDATORY] <exittype> The exit type
- [MANDATORY] <height> The height
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Plays the client sided part of the Napalm
EXAMPLE: PlayClientNapalm( startPos, plane.yaw, "vietcong", "axis", plane.owner, "left", height )
void <player> PlayerADS()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Gets the player weapon position fraction
EXAMPLE: if ( self PlayerADS() > 0.3 )
void <actor> PlayerKnockback(<true/false>)
- [MANDATORY] <true/false> if true, client affected by knockback
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Turn knockback on and off for a player
EXAMPLE: self PlayerKnockback( true )
void <player> PlayHitMarker(<sound name>,<damage state>,<perk feedback>,<is dead>)
- [MANDATORY] <sound name> The name of the sound or hash
- [OPTIONAL] <damage state> How damaged the victim is
- [OPTIONAL] <perk feedback> If the victim had any perks active that modified the hit marker
- [OPTIONAL] <is dead> If the victim has died from this hit marker and needs a red flash
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Plays a hit marker event
EXAMPLE: self PlayHitMarker( "evt_squad_activate", 3, "flakjacket" )
void <player> PlayLocalSound(<sound name>)
- [MANDATORY] <sound name> The name of the sound or hash
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Plays a sound locally
EXAMPLE: self playlocalsound( "evt_squad_activate" )
void <player> PrimaryButtonPressedLocal()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the local player is pressing the primary button (BUTTON_A)
EXAMPLE: if ( self PrimaryButtonPressedLocal() ) ...
void <player> PrimeMovie(<moviename>)
- [MANDATORY] <moviename> movie name
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Starts priming the cinematic movie to be played.
EXAMPLE: self PrimeMovie( "mymovie" )
void <player> ReloadButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'usereload' button.
EXAMPLE: while( self reloadButtonPressed() )...
void <player> ReloadWeaponAmmo(<weapon>)
- [MANDATORY] <weapon> The weapon to be reloaded
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon's ammoclip from the ammo
EXAMPLE: self ReloadWeaponAmmo( <weapon> )
void <player> RemoteControlTurret(<turret>)
- [MANDATORY] <turret> the remote controlled turret.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Remote control into a turret
EXAMPLE: player RemoteControlTurret( turret )
void <player> RemoteControlTurretOff(<turret>)
- [MANDATORY] <turret> the remote controlled turret.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Stops remote controlling a turret
EXAMPLE: player RemoteControlTurretOff( turret )
void <player> ResetAnimations()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Reset player animations after a body type change
EXAMPLE: self ResetAnimations())
void <player> ResetCharacterCustomization()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Resets all of the character customization to what is in the player stats
EXAMPLE: self ResetCharacterCustomization()
void <player> ResetFlashBack()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Resets the players flashback history
EXAMPLE: self resetflashback()
void <player> ResetSpreadOverride()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Reset the player's aim spread to 255
EXAMPLE: self ResetSpreadOverride()
void <player> Revive()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Revive the player
EXAMPLE: self Revive())
void <client> RevivePlayer()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Callback from script to get player out of last stand, increases health, removes damage timer, should clear screen of damageFX
EXAMPLE: self RevivePlayer()
void <player> SayAll(<message>)
- [MANDATORY] <message> A localizable message to send to all players
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Write a client chat message from this client to everybody
EXAMPLE: self SayAll( saytext )
void <player> SayTeam(<message>)
- [MANDATORY] <message> A localizable message to send to all players on the player's team.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Write a client chat message from this client to everybody on their team
EXAMPLE: self SayTeam( sayText )
void <player> SecondaryButtonPressedLocal()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the local player is pressing the secondary button (BUTTON_B)
EXAMPLE: if ( self SecondaryButtonPressedLocal() ) ...
void <player> SecondaryOffhandButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the secondary offhand button
EXAMPLE: if ( self SecondaryOffhandButtonPressed() ) ...
void <player> SetActionSlot(<slot>,<action slot type>,[weapon])
- [MANDATORY] <slot> The action slot
- [MANDATORY] <action slot type> The type of slot. can be "weapon"/"altMode"/""
- [OPTIONAL] [weapon] The weapon to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets action slot for the player
EXAMPLE: self SetActionSlot( 4, "weapon", level.DEAD_CONTROL_WEAPON )
void <player> SetArenaPoints(<point>)
- [MANDATORY] <point> points
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's arena points
EXAMPLE: player SetArenaPoints( 19 )
void <player> SetBlockWeaponPickup(<weapon>,<enabled>)
- [MANDATORY] <weapon> The weapon to set block for
- [MANDATORY] <enabled> True if weapon pickup should be blocked
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Blocks the player from picking up other weapons while using this weapon
EXAMPLE: self setBlockWeaponPickup( killstreakWeapon, true )
void <player> SetCarryingObject(<onoff>)
- [MANDATORY] <onoff> True to enable, false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable or disable the player carrying object flag. Disables doublejump and juke
EXAMPLE: self SetCarryingObject( true ); // disables doublejump and juke
void <player> SetCharacterBodyStyle(<character body type index>)
- [MANDATORY] <character body type index> The index of the character body type
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the character body style for the current body type. Resets all colors for the body style to default.
EXAMPLE: self SetCharacterBodyStyle( 0 )
void <player> SetCharacterBodyType(<character body type index>,<character head type index>)
- [MANDATORY] <character body type index> The index of the character body type
- [OPTIONAL] <character head type index> The index of the character head type
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the character body type for the player. Resets all other customization to default for the new body type.
EXAMPLE: self SetCharacterBodyType( 1 )
void <player> SetCharacterHelmetStyle(<character body type index>)
- [MANDATORY] <character body type index> The index of the character body type
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the character body style for the current helmet type. Resets all colors for the helmet style to default.
EXAMPLE: self SetCharacterHelmetStyle( 0 )
void <player> SetClientCGObjectiveText(<text>)
- [MANDATORY] <text> The text to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the objective text only on this client
EXAMPLE: self SetClientCGObjectiveText( util::getObjectiveScoreText( self.pers["team"] ) )
void <player> SetClientCompass(<value>)
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets compass dvar only on this client
EXAMPLE: self SetClientCompass( 0 )
void <player> SetClientDrawTalk(<value>)
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets cg_drawTalk dvar only on this client
EXAMPLE: self SetClientDrawTalk( 3 )
void <player> SetClientFocalLength(<value>)
- [MANDATORY] <value> The focal length value to set (float)
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets cg_focalLength dvar only on this client
EXAMPLE: self SetClientFocalLength( 23.3622 )
void <player> SetClientHUDHardcore(<value>)
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets ui_hud_hardcore dvar only on this client
EXAMPLE: self SetClientHUDHardcore( 0 )
void <player> SetClientMiniScoreboardHide(<enable>)
- [MANDATORY] <enable> True/1 to hide, false/0 otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets miniscoreboardhide dvar only on this client
EXAMPLE: players[i] SetClientMiniScoreboardHide( true )
void <player> SetClientNumLives(<numLives>)
- [MANDATORY] <numLives> The numlives to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets scr_numLives dvar only on this client
EXAMPLE: self SetClientNumLives( level.numLives )
void <player> SetClientPlayerPushAmount(<amount>)
- [MANDATORY] <amount> The push amount
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets playerPushAmount dvar only on this client
EXAMPLE: self SetClientPlayerPushAmount( 1 )
void <player> SetClientPlayerSprintTime(<time>)
- [MANDATORY] <time> The spring time
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets player_sprintTime dvar only on this client
EXAMPLE: self SetClientPlayerSprintTime( level.playerSprintTime )
void <player> SetClientScriptMainMenu(<value>)
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets g_scriptMainMenu dvar only on this client
EXAMPLE: self SetClientScriptMainMenu( game["menu_class"] )
void <player> SetClientThirdPerson(<onoff>)
- [MANDATORY] <onoff> 1 to set, 0 otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the client to be third person
EXAMPLE: self SetClientThirdPerson( 1 )
void <player> SetClientThirdPersonAngle(<angle>)
- [MANDATORY] <angle> The angle to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets cg_thirdPerson dvar only on this client
EXAMPLE: self SetClientThirdPersonAngle( 354 )
void <player> SetClientUIVisibilityFlag(<flagName>,<value>)
- [MANDATORY] <flagName> The name of the flag
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets a HUD visibility flag only on this client
EXAMPLE: e_player SetClientUIVisibilityFlag( "hud_visible", 1 )
void <player> SetControllerUIModelValue(<ui model data path from controller>,<ui model value>)
- [MANDATORY] <ui model data path from controller> precached name string for the data which we're trying to set.
- [MANDATORY] <ui model value> value for the data which we're trying to set on the controller.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
EXAMPLE: player SetControllerUIModelValue( "hudItems.regenDelayProgress", 0.2 )
void <player> SetCurrentSpectatorClient(<client>)
- [MANDATORY] <client> The client to set spectator
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the given client as a spectator
EXAMPLE: self SetCurrentSpectatorClient( player )
void <player> SetCurrentWeaponSpinLerp(<spin>)
- [MANDATORY] <spin> The spin value
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the current weapon's spin
EXAMPLE: self SetCurrentWeaponSpinLerp( 0.0 )
void <player> SetDisabledTargetHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target not selected hint
EXAMPLE: self SetDisabledTargetHint()
void <player> SetElectrifiedState(<electrified>)
- [MANDATORY] <electrified>: bool whether the player should be in this state.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player into the electrified state for 3rd person anim purposes. Different from SetElectrified() which plays the postfx
void <player> SetEnterTime(<time>)
- [MANDATORY] <time> The time to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's session enter time
EXAMPLE: self setEnterTime( getTime() )
void <player> SetEverHadWeaponAll(<flag>)
- [MANDATORY] <flag> True to set the flag
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the EverHadAllPlayerHeldWeapons flag of the player
EXAMPLE: self SetEverHadWeaponAll( true )
void <player> SetHighlighted(<onoff>)
- [MANDATORY] <onoff> True to highlight, false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Highlight the player
EXAMPLE: self SetHighlighted( true )
void <player> SetInventoryHeldWeapon(<weapon>)
- [MANDATORY] <weapon> The held weapon to be set as inventoryHeldWeapon. Use undefined to clear the inventoryHeldWeapon.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's inventoryHeldWeapon.
EXAMPLE: player SetInventoryHeldWeapon( weapon )
void <player> SetInventoryWeapon(<weapon>)
- [MANDATORY] <weapon> The weapon to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the inventory weapon
EXAMPLE: self SetInventoryWeapon( weapon )
void SetLowReady(<enable>)
- [MANDATORY] <enable> true to set this state
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: set the player into low ready weapon state.
EXAMPLE: self SetLowReady(true)
void <player> SetLUIMenuData(<lui menu handle>,<lui menu data name>,<lui menu data value>)
- [MANDATORY] <lui menu handle> handle to the lui menu opened.
- [MANDATORY] <lui menu data name> precached name string for the data which we're trying to set.
- [MANDATORY] <lui menu data value> value for the data which we're trying to set on the menu.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
EXAMPLE: player SetLUIMenuData( menu, "title", "Some Title" )
void <player> SetModelLodBias(<bias>)
- [MANDATORY] <bias> bias. Setting of 0 reverts to the model lod bias.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the model lod bias
EXAMPLE: player SetModelLodBias( 8 )
void <player> SetNoLOSOnTargetsHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target not selected hint
EXAMPLE: self SetNoLOSOnTargetsHint()
void <player> SetNoTargetsHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target not selected hint
EXAMPLE: self SetNoTargetsHint()
void <player> setOffhandPrimaryClass(<name>)
- [MANDATORY] <name> the weapon name
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set whether the player is using a grenade or gear.
EXAMPLE: player setOffhandPrimaryClass( "claymore_mp" )
void <player> SetOffhandSecondaryClass(<name>)
- [MANDATORY] <name> the weapon name
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set whether the player is using a flash or smoke grenade.
EXAMPLE: player SetOffhandSecondaryClass( "concussion_grenade_mp" )
void <player> SetOffhandVisible(<onoff>)
- [MANDATORY] <onoff> True/1 to enable, false otherwise
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Enable or disable visibility of the offhand weapon
EXAMPLE: self SetOffhandVisible( true )
void <player> SetOrigin(<origin>)
- [MANDATORY] <origin> The origin to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the player's origin
EXAMPLE: player SetOrigin( v_origin )
void <player> SetParagonIconId(<paragon icon id>)
- [MANDATORY] <paragon icon id> the paragon rank id
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's paragon icon id
EXAMPLE: player SetParagonIconId( 1, 1 )
void <player> SetParagonRank(<paragon rank id>)
- [MANDATORY] <paragon rank id> the paragon rank id
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's paragon rank
EXAMPLE: player SetParagonRank( 1, 1 )
void <player> SetPerk(<perk name>)
- [MANDATORY] <perk name> the perk to give
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: give the specified perk
EXAMPLE: player SetPerk( "specialty_gpsjammer" )
void <player> SetPlacementHint(<onoff>)
- [MANDATORY] <onoff> true if the hint should say that the weapon can be placed, false if not
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the placement hint string that will be displayed for this player.
EXAMPLE: player SetPlacementHint( turret.canBePlaced )
void <player> SetPlayerAngles(<angles>)
- [MANDATORY] <angles> The view angles to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the player's view angles
EXAMPLE: player SetPlayerAngles( v_angles )
void <player> SetPlayerRenderOptions(<options>)
- [MANDATORY] <options> The player render options
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player render options
EXAMPLE: self SetPlayerRenderOptions( playerRenderOptions );
void <player> SetRank(<rank id>,[prestige level])
- [MANDATORY] <rank id> the rank id
- [OPTIONAL] [prestige level] The prestige level
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the player's rank and prestige level
EXAMPLE: player SetRank( 1, 2 )
void <player> SetRiotshieldFailHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set riot shield fail hint
EXAMPLE: self SetRiotshieldFailHint()
void <player> SetSpawnWeapon(<weapon name>)
- [MANDATORY] <weapon name> The name of the weapon to spawn with
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon that this player will spawn with
EXAMPLE: self SetSpawnWeapon( "ak47" )during prematch period or grace period in mp)
void <player> SetSpreadOverride(<value>)
- [MANDATORY] <value> The value to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the player's aim spread
EXAMPLE: self SetSpreadOverride( 0 )
void <player> SetSprintCooldown(<duration>)
- [MANDATORY] <duration> The duration to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the player's sprint cooldown duration
EXAMPLE: self SetSprintCooldown( 4 )
void <player> SetSprintDuration(<duration>)
- [MANDATORY] <duration> The duration to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the player's sprint duration
EXAMPLE: self SetSprintDuration( 4 )
void <player> SetSunShadowSplitDistance(<distance>)
- [MANDATORY] <distance> split distance. Setting of 0 reverts to the default split distance.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the sun shadow split distance for the player
EXAMPLE: player SetSunShadowSplitDistance( 200 )
void <player> SetTacticalWheel(<enabled>)
- [MANDATORY] <enabled> turn on or off
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets whether this player will be able to use the cybercom tactical wheel or not
EXAMPLE: player SetTacticalWheel( true )
void <player> SetTargetAlreadyInUseHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target already in use failure hint
EXAMPLE: self SetTargetAlreadyInUseHint()
void <player> SetTargetAlreadyTargetedHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target already being targeted hint
EXAMPLE: self SetTargetAlreadyTargetedHint()
void <player> SetTargetedEntityEndTime(<weapon>,<endtime>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <endtime> The end time of the targeted entity
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set targeted entity end time, for use on the client side in the UI.
EXAMPLE: self SetTargetedEntityEndTime( weapon, 0.0 )
void <player> SetTargetedMissilesRemaining(<weapon>,<missilesRemaining>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <missilesRemaining> The amount of missiles remaining to destroy the target
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set targeted entity missiles remaining, for use on the client side in the UI.
EXAMPLE: self SetTargetedMissilesRemaining( weapon, 0.0 )
void <player> SetTargetingAbortedHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set targeting aborted hint
EXAMPLE: self SetDisabledTargetHint()
void <player> SetTargetOORHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set out of range failure hint
EXAMPLE: self SetTargetOORHint()
void <player> SetTargetWrongTypeHint([weapon])
- [OPTIONAL] [weapon]: Weapon to use for the event
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set target validity failure hint
EXAMPLE: self SetTargetWrongTypeHint()
void <player> SetVehicleDamageMeter(<damage>)
- [MANDATORY] <damage> the amount of damage normalized 0..1
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle damage meter
EXAMPLE: player SetRefEndTime( killstreaEndTime )
void <player> SetVehicleDrivableDuration(<duration>)
- [MANDATORY] <duration> the drivable duration in milliseconds
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the drivable duration for the players vehicle (intended for use with client side display purposes)
EXAMPLE: player SetVehicleDrivableDuration( killstreakDuration )
void <player> SetVehicleDrivableEndTime(<end time>)
- [MANDATORY] <end time> the drivable end time in milliseconds
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle drivable end time.
EXAMPLE: player SetVehicleDrivableEndTime( killstreakEndTime )
void <player> SetVehicleFocusEntity(<focus entity>)
- [MANDATORY] <focus entity> The entity to focus on
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the focus entity for a player driven vehicle (currently only supported by helicopters). This will attempt to make the vehicle orient towards the focus target.
EXAMPLE: player SetVehicleFocusEntity( focusEntity )
void <player> SetVehicleLockedOnByEnt(<entity>)
- [MANDATORY] <entity> an entity that acquired a missile lock on the player's vehicle
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle locked on by entity
EXAMPLE: player SetVehicleLockedOnByEnt( mostDangerousEnemyWithLockOn )
void <player> SetVehicleWeaponWaitDuration(<duration>)
- [MANDATORY] <duration> the weapon reload (or recharge) duration in milliseconds
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the weapon wait duration for the players vehicle (intended for use with client side display purposes)
EXAMPLE: player SetVehicleWeaponWaitDuration( reloadDuration )
void <player> SetVehicleWeaponWaitEndTime(<end time>)
- [MANDATORY] <end time> the weapon wait end time in milliseconds
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle weapon wait end time.
EXAMPLE: player SetVehicleWeaponWaitEndTime( weaponReloadEndTime )
void <player> SetVelocity(<velocity>)
- [MANDATORY] <velocity> The velocity to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the velocity of the player
EXAMPLE: self setvelocity(force)
void <player> SetViewClamp()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the view clamp for the player, only works during animscripted for now. Ranges are relative to tag_camera. Left, Right, Top, Bottom
EXAMPLE: player SetViewClamp( 50, 50, 30, 30 )
void <player> SetWeaponAmmoClip(<weapon>,<ammo>)
- [MANDATORY] <weapon> The weapon
- [MANDATORY] <ammo> The ammo count
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon's ammo
EXAMPLE: self SetWeaponAmmoClip( weapon, weapon.clipSize )
void <player> SetWeaponAmmoFuel(<weapon>,<fuel>)
- [MANDATORY] <weapon> The weapon
- [MANDATORY] <fuel> The ammo fuel amount
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon ammo fuel
EXAMPLE: self SetWeaponAmmoFuel( weapon, weapondata["fuel"] )
void <player> SetWeaponAmmoStock(<weapon>,<ammo>)
- [MANDATORY] <weapon> The weapon
- [MANDATORY] <ammo> The new ammo count
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon's ammo
EXAMPLE: reviver SetWeaponAmmoStock( level.weaponReviveTool, 1 )
void <player> SetWeaponFriendlyHacking(<weapon>,<isFriendlyHacking>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <isFriendlyHacking> Set to true if a friendly is hacking the target
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon lockon completion percentage
EXAMPLE: self SetWeaponFriendlyTargetLocked( weapon, 0.0 )
void <player> SetWeaponFriendlyTargeting(<weapon>,<isFriendlyTargeting>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <isFriendlyTargeting> Set to true if a friendly is targetting
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon lockon completion percentage
EXAMPLE: self SetWeaponFriendlyTargeting( weapon, 0.0 )
void <player> SetWeaponFriendlyTargetLocked(<weapon>,<isFriendlyTargetLocked>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <isFriendlyTargetLocked> Set to true if a friendly is target locked
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon lockon completion percentage
EXAMPLE: self SetWeaponFriendlyTargetLocked( weapon, 0.0 )
void <player> SetWeaponHackPercent(<weapon>,<heat>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <heat> The heat percent to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon hack completion percentage
EXAMPLE: self SetWeaponHackPercent( weapon, 0.0 )
void <player> SetWeaponHeatPercent(<weapon>,<heat>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <heat> The heat percent to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon heat percentage
EXAMPLE: self SetWeaponHeatPercent( weapon, 0.0 )
void <player> SetWeaponLockOnPercent(<weapon>,<heat>)
- [MANDATORY] <weapon> The weapon (player should have this weapon)
- [MANDATORY] <heat> The heat percent to set
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the weapon lockon completion percentage
EXAMPLE: self SetWeaponLockOnPercent( weapon, 0.0 )
void <player> SetWeaponOverheating(<overheat>,<heatval>,[weapon])
- [MANDATORY] <overheat> Whether the weapon is overheating.
- [MANDATORY] <heatval> The new heatval of the weapon (0 to 100).
- [OPTIONAL] [weapon] If present set this specific weapon otherwise set the player's current weapon.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Set the players Weapon Overheating value
EXAMPLE: self SetWeaponOverheating( weapondata["overheat"], weapondata["heat"], weapon )
void <player> ShowViewModel()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Show the player's current view model.
EXAMPLE: player ShowViewModel()
void <player> SortHeldWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sort the playerState heldWeapons to remove empty spaces
EXAMPLE: e_player SortHeldWeapon()
void <player> SpawnSpectator(<origin>,<angles>)
- [MANDATORY] <origin> origin to spawn
- [MANDATORY] <angles> angles to spawn
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Spawns the player, does not send any notifies
void <player> SprintButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'sprint' button.
EXAMPLE: while( self SprintButtonPressed() )...
void <player> SprintUpRequired()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Force the player to release the sprint button before sprinting.
EXAMPLE: self SprintUpRequired()
void <player> StanceButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'stance' button.
EXAMPLE: while( self StanceButtonPressed() )...
void StartCameraTween(<time>)
- [MANDATORY] <time> How long to do the blend."
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Start a camera tween, call this right before a camera pop to do a blend.
EXAMPLE: player StartCameraTween( 0.5 );
void <player> StartRevive(<reviver>)
- [MANDATORY] <reviver> the player reviving the player this is called on
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Starts the revive sequence on a player. <reviver> is the one administering aid to the player this is called on.
EXAMPLE: playerInLastStand StartRevive( rescuer )
void <player> StopCarryTurret(<turret>,[origin],[angles])
- [MANDATORY] <turret> turret entity
- [OPTIONAL] [origin] The new origin of turret
- [OPTIONAL] [angles] The new angles of turret
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: UnLinks the auto turret from the player and sets it on the ground.
EXAMPLE: player StopCarryTurret( turret, origin, angles )
void <player> StopLocalSound(<sound name>)
- [MANDATORY] <sound name> The name of the sound
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Stops the local sound
EXAMPLE: targetent StopLocalSound( level.missileDroneSoundStart )
void <player> StopRevive(<reviver>)
- [MANDATORY] <reviver> the player reviving the player this is called on
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Stops the revive behavior on a player when the revive did not complete. <reviver> is the one administering aid to the player this is called on.
EXAMPLE: playerInLastStand StopRevive( rescuer )
void <player> Suicide()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Kills the player immediately as a suicide
EXAMPLE: self suicide()
void <player> SwitchToOffHand(<weapon>)
- [MANDATORY] <weapon> Weapon to switch to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Switch to the offhand weapon
EXAMPLE: self SwitchToOffhand( primaryOffhand )
void <player> SwitchToWeapon([weapon object])
- [OPTIONAL] [weapon object] The weapon to switch to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Switch to a different weapon or cycle weapons if no weapon is given
EXAMPLE: level.player SwitchToWeapon( weapon )
void <player> SwitchToWeaponImmediate([weapon object])
- [OPTIONAL] [weapon object] The weapon to switch to
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Switch to a different weapon or cycle weapons if no weapon is given without playing the dropping animation for current weapon
EXAMPLE: level.player SwitchToWeaponImmediate( weapon )
void <player> TakeAllWeapons()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Makes the player take all weapons
EXAMPLE: player TakeAllWeapons()
void <player> TakeWeapon(<weapon>,<ignore_attachments>)
- [MANDATORY] <weapon> The weapon to take
- [OPTIONAL] <ignore_attachments> Only check the root weapon, ignore all the attachments.
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Take the weapon
EXAMPLE: e_player TakeWeapon( w_spike_launcher )
void <player> ThrowButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'throw' button.
EXAMPLE: while( self ThrowButtonPressed() )...
void <client> TurnedHuman()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Called when client is turned back to human
EXAMPLE: self TurnedHuman()
void <client> UndoLastStand()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Undo the last stand for the client
EXAMPLE: self UndoLastStand()
void <player> UnlinkFromMissile()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Unlinks a player camera from a missile
EXAMPLE: player UnlinkFromMissile()
void <player> UnlinkGuidedMissileCamera()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: clear player eflags for the guided missile
EXAMPLE: player UnlinkGuidedMissileCamera()
void <player> UnSetPerk(<perk name>)
- [MANDATORY] <perk name> the perk to unset
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: takes the specified perk from the player
EXAMPLE: player UnSetPerk( "specialty_gpsjammer" )
void <player> UpdateWeaponOptions(<weapon name>,[weapon options])
- [MANDATORY] <weapon name> The weapon name to give to the player
- [OPTIONAL] [weapon options] options value computed using calcweaponoptions call
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Update weapon options for a weapon that the player has
EXAMPLE: player UpdateWeaponOptions( "m1garand", player calcWeaponOptions() )
void <player> UseButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the use button
EXAMPLE: if ( self UseButtonPressed() ) ...
void <player> VehicleMoveUpButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the 'stance' button.
EXAMPLE: while( self StanceButtonPressed() )...
void <player> WeaponLockCount()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: returns the number of active lock objects (i.e. those with at least lock started or lock set active)
EXAMPLE: player WeaponLockCount()
void <player> WeaponLockDetect(<entity>,[slot])
- [MANDATORY] <entity>: An entity.
- [OPTIONAL] [slot]: The slot to operate on (up to MAX_SIMULTANEOUS_LOCKONS)
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Sets the tartget as detected. Will clear any existing hard lock. Use WeaponLockStart() to start lock.
EXAMPLE: player WeaponLockDetect( enemyGuy )
void <player> WeaponLockFinalize(<entity>,[slot])
- [MANDATORY] <entity>: An entity.
- [OPTIONAL] [slot]: The slot to operate on (up to MAX_SIMULTANEOUS_LOCKONS)
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Locks player's weapon onto an entity. Implies WeaponLockStart(), so this may be called to jump to a hard lock.
EXAMPLE: player WeaponLockFinalize( enemyGuy )
void <player> WeaponLockFree([slot])
- [OPTIONAL] [slot] The weapon slot. Default is 0
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Clears player's weapon lock.
EXAMPLE: player WeaponLockClear()
void <player> WeaponLockNoClearance(<bool>,[slot])
- [MANDATORY] <bool>: true or false.
- [OPTIONAL] [slot] The weapon slot. Default is 0
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that there is an obstruction.
EXAMPLE: player WeaponLockNoClearance( true )
void <player> WeaponLockRemoveSlot(<slot>)
- [MANDATORY] <slot> The weapon slot. Default is 0
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: removes the given slot values and compresses the remaining slots (i.e. 1,2,3 with 2 removed becomes 1,3,blank)
EXAMPLE: player WeaponLockGetFlags()
void <player> WeaponLockStart(<entity>,[slot])
- [MANDATORY] <entity>: An entity.
- [OPTIONAL] [slot]: The slot to operate on (up to MAX_SIMULTANEOUS_LOCKONS)
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Begins player's weapon lockon sequence (hud effects, etc). Will clear any existing hard lock. Use WeaponLockFinalize() to complete lock.
EXAMPLE: player WeaponLockStart( enemyGuy )
void <player> WeaponLockTargetTooClose(<bool>,[slot])
- [MANDATORY] <bool>: true or false.
- [OPTIONAL] [slot] The weapon slot. Default is 0
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that they are too close.
EXAMPLE: player WeaponLockTargetTooClose( true )
void <player> WeaponPlayEjectBrass()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Play the eject brass FX for a weapon.
EXAMPLE: player WeaponPlayEjectBrass()
void <player> WeaponSwitchButtonPressed()
CATEGORY: Player
CLIENT/SERVER: Server
SUMMARY: Check if the player is pressing the weapon switch button
EXAMPLE: if ( self WeaponSwitchButtonPressed() ) ...
void <hud_element> ChangeFontScaleOverTime(<time>)
- [MANDATORY] <time> The time to scale the element font in seconds
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a hud element to transition in fontScale over time. Normally setting the fontScale of an element causes an immediate visual change. However, if the fontScale gets set within <time> after calling ChangeFontScaleOverTime, then the hud element will transition to the new fontScale over the remaining <time>.
EXAMPLE: level.introstring1 ChangeFontScaleOverTime( 1.2 ); level.introstring1.fontScale = 0.3; // This will transition the fontScale from whatever it was before to the new value of 0.3 over 1.2 seconds.
void <hud_element> ClearTargetEnt()
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Clear this waypoint from targetting an entity.
EXAMPLE: waypoint ClearTargetEnt()
void CloseLUIMenu(<localClientNum>,<menuIndex>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <menuIndex> Menu ID received from CreateLUIMenu.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Close the LUI menu specified.
EXAMPLE: CloseLUIMenu( localClientNum, menuIndex )
void CreateLUIMenu(<localClientNum>,<name>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <name> Name of the menu to create.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Creates a LUI menu to be opened later with OpenLUIMenu.
EXAMPLE: CreateLUIMenu( localClientNum, "ScriptDebugMenu")
void CreateUIModel(<parentModel>,<newPathName>)
- [MANDATORY] <parentModel> The parent model of the model to retrieve.
- [MANDATORY] <newPathName> The name/path of the new model to create.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Creates and returns a UIModel from a parent model.
EXAMPLE: CreateUIModel( gameScoreModel, "enZemeyScore" )
void <hud_element> Destroy()
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Remove this Hud element altogether.
EXAMPLE: self.bombstopwatch Destroy()
void <hud_element> FadeOverTime(<time>)
- [MANDATORY] <time> The time to fade the element in seconds
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a hud element to transition in color (or alpha) over time. Normally setting the color (or alpha) of an element causes an immediate visual change. However, if the color (or alpha) gets set within <time> after calling fadeOverTime, then the hud element will transition to the new color over the remaining <time>.
EXAMPLE: level.introstring1 FadeOverTime( 1.2 ); level.introstring1.alpha = 0.3; // This will transition the alpha from whatever it was before to the new value of 0.3 over 1.2 seconds.
void FreeUIModel(<modelToFree>)
- [MANDATORY] <modelToFree> The model to free.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Frees a UIModel.
EXAMPLE: FreeUIModel( gameScoreModel )
void GetGlobalUIModel()
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Returns the gloabl UIModel.
EXAMPLE: GetGlobalModel()
void GetLUIMenu(<localClientNum>,<menuName>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <menuName> Menu name
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Gets the first instance found of a given menu name active for the given client (undefined if not found)
EXAMPLE: menuIndex = GetLUIMenu( localClientNum, "HudElementImage" )
void GetLUIMenuData(<localClientNum>,<menuIndex>,<menuDataName>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <menuIndex> Menu ID received from CreateLUIMenu.
- [MANDATORY] <menuDataName> Menu Data Name linked to the UIModel.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Gets data from a LUI menu.
EXAMPLE: modelValue = GetLUIMenuData( localClientNum, menuIndex, "title" )
void <hud_element> GetTextWidth()
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Returned the width of the text in the hudelem.
EXAMPLE: width = elem GetTextWidth()
void GetUIModel(<parentModel>,<lookupModelName>)
- [MANDATORY] <parentModel> The parent model of the model to retrieve.
- [MANDATORY] <lookupModelName> The name of the model to retrieve.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Returns a UIModel from the parent model passed in and the name of the model to retrieve.
EXAMPLE: GetUIModel( gameScoreModel, "enemeyScore" )
void GetUIModelForController(<localClientNum>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Returns the UIModel from the controller root.
EXAMPLE: GetUIModelForController( localClientNum )
void GetUIModelValue(<model>)
- [MANDATORY] <model> Model of the value to retrieve.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Returns the value of the UIModel passed in.
EXAMPLE: GetUIModelValue( gameScoreModel )
void IsLuiEnabled()
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: true if lui system has the input focus
EXAMPLE: if( IsLuiEnabled() )
void LuiDisable(<localclientnum>)
- [MANDATORY] <localclientnum> The local client
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: user input is removed from lui system
EXAMPLE: LuiDisable( 0 )
void LuiEnable(<localclientnum>,<menuname>)
- [MANDATORY] <localclientnum> The local client
- [MANDATORY] <menuname> The name of the menu to enable
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: user input is handed to lui system until returned
EXAMPLE: LuiEnable("overlay")
void LuiLoad()
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Loads a lui file, making the menus available for addition
EXAMPLE: LuiLoad("overlay")
void <hud_element> MoveOverTime(<time>)
- [MANDATORY] <time> The time to move the element in seconds
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a hud element to move over time.
EXAMPLE: newStr MoveOverTime( timer )
hudelem NewClientHudElem(<client>)
- [MANDATORY] <client> The client for whom the hud element is created.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Create a new hud element for a particular client
EXAMPLE: self.kc_topbar = NewClientHudElem(self)
hudelem NewDamageIndicatorHudElem(<client>)
- [MANDATORY] <client> The client for whom the hud element is created.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Create a new hud element for a particular client
EXAMPLE: self.kc_topbar = NewClientHudElem(self)
hudelem NewDebugHudElem()
CATEGORY: UI
CLIENT/SERVER: Server
hudelem NewHudElem()
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Create a new hud element
EXAMPLE: overlay = NewHudElem()
hudelem NewScoreHudElem(<client>)
- [MANDATORY] <client> The client for whom the hud element is created.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Create a new score hud element for a particular client
EXAMPLE: self.hud_rankscroreupdate = NewScoreHudElem(self)
hudelem NewTeamHudElem(<team>)
- [MANDATORY] <team> The team for whom the hud element is created. Must be 'axis', 'allies' or 'spectator'
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Create a new hud element for a particular team
EXAMPLE: level.progressbar_allies_neutralize = NewTeamHudElem( "axis" )
void OpenLUIMenu(<localClientNum>,<menuIndex>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <menuIndex> Menu ID received from CreateLUIMenu.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Opens a loaded LUI menu.
EXAMPLE: OpenLUIMenu( localClientNum, menuIndex )
void OpenLUIPopup(<localClientNum>,<name>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <name> Name of the popup menu to open.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Opens a loaded LUI menu.
EXAMPLE: OpenLUIPopup( localClientNum, "SomePopup")
void PopulateScriptDebugMenu(<localClientNum>,<array>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <array> Array of menu item names for the debug menu.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Sets a UIModel from the model being passed in.
EXAMPLE: PopulateScriptDebugMenu( localClientNum, menu_items_array )
void <hud_element> Reset()
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Reset a HUD element to its default state.
EXAMPLE: element Reset()
void <hud_element> ScaleOverTime(<time>,<width>,<height>)
- [MANDATORY] <time> The time to scale the element in seconds
- [MANDATORY] <width> The new width of the material.
- [MANDATORY] <height> The new height of the material.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a hud element to scale over time.
EXAMPLE: other.progressbar ScaleOverTime( level.planttime, level.barsize, 8 )
void <hud_clock_element> SetClock(<time>,<time>,<material>,[width],[height])
- [MANDATORY] <time> The new timer time in seconds to count down
- [MANDATORY] <time> The time in seconds represented by a full cycle of the hand, for instance a stopwatch would be 60s.
- [MANDATORY] <material> The material for the hud clock
- [OPTIONAL] [width] The width of the material.
- [OPTIONAL] [height] The height of the material.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a clock HUD element to count down over a time period.
EXAMPLE: level.bombstopwatch SetClock( 5, 60, "hudStopwatch", 64, 64 )
void <hud_clock_element> SetClockUp(<time>,<full time>,<material>,[width],[height])
- [MANDATORY] <time> The new timer time in seconds to count up
- [MANDATORY] <full time> The time in seconds represented by a full cycle of the hand, for instance a stopwatch would be 60s.
- [MANDATORY] <material> The material for the hud clock
- [OPTIONAL] [width] The width of the material.
- [OPTIONAL] [height] The height of the material.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a clock HUD element to count up over a time period.
EXAMPLE: level.bombstopwatch SetClockUp( 5, 60, "hudStopwatch", 64, 64 )
void <hud_element> SetCOD7DecodeFX(<decodeTime>,<decayStart>,<decayDuration>)
- [MANDATORY] <decodeTime> Time for each letter to decode.
- [MANDATORY] <decayStart> Time to wait before starting the text decay effect.
- [MANDATORY] <decayDuration> How long to spend decaying.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the hudelem string to display with a decode effect.
EXAMPLE: elem SetCOD7DecodeFX( 2000, 600 )
void SetExtraCamRenderReady(<jobIdx>)
- [MANDATORY] <jobIdx> Extra Cam Render job index.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Sets an extra cam render job to start processing
EXAMPLE: StartExtraCamRender( 2 )
void <hud_element> SetGameTypeString(<game type>)
- [MANDATORY] <game type> A string containing the game type
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the game type string for the game
void SetLUIMenuData(<localClientNum>,<menuIndex>,<menuDataName>,<menuDataValue>)
- [MANDATORY] <localClientNum> Number of the local client on the machine.
- [MANDATORY] <menuIndex> Menu ID received from CreateLUIMenu.
- [MANDATORY] <menuDataName> Menu Data Name linked to the UIModel.
- [MANDATORY] <menuDataValue> Value for that piece of menu data.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Set data for LUI menu.
EXAMPLE: SetLUIMenuData( localClientNum, menuIndex, "title", "Some Title" )
void <hud_element> SetMapNameString(<map name>)
- [MANDATORY] <map name> A string containing the map name
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the map name string
void <hud_element> SetPerks(<client>)
- [MANDATORY] <client> client we should be showing the perks of
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Sets a hud element to be a perks element.
EXAMPLE: hudelement SetPerks( true )
void <hud_element> SetPlayerNameString(<player>)
- [MANDATORY] <player> A player entity
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the player name string for a HUD element
void <hud_element> SetPulseFX(<speed>,<decayStart>,<decayDuration>)
- [MANDATORY] <speed> Time (in milliseconds) each letter takes to type out.
- [MANDATORY] <decayStart> Time to wait before starting the string's decay effect.
- [MANDATORY] <decayDuration> How long to spend decaying.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the hudelem string to display with a "Pulse" effect.
EXAMPLE: elem SetPulseFX( 40, 2000, 600 )
void <hud_element> SetRedactFX(<decayStart>,<decayDuration>,<redactDecayStart>,<redactDecayDuration>)
- [MANDATORY] <decayStart> Time to wait before starting the text decay effect.
- [MANDATORY] <decayDuration> How long to spend decaying.
- [MANDATORY] <redactDecayStart> Time to wait before starting the redact decay effect.
- [MANDATORY] <redactDecayDuration> How long to spend decaying.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the hudelem string to display with a redact effect.
EXAMPLE: elem SetRedactFX( 2000, 600, 3000, 400 )
void <hud_element> SetShader(<materialname>,[width],[height])
- [MANDATORY] <materialname> A the name of the material to set
- [OPTIONAL] [width] The width of the material.
- [OPTIONAL] [height] The height of the material.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the material for this Hud Element
EXAMPLE: waypoint SetShader( "playbook_objective_stop", 15, 15 )
void <hud_element> SetTargetEnt(<entity>)
- [MANDATORY] <entity> Entity to Target
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the entity that this waypoint should target. In MP, entity should already be a broadcasting entity, as with Objective_OnEntity().
EXAMPLE: waypoint SetTargetEnt( level.axis.bombcarrier )
void <hud_timer_element> SetTenthsTimer(<time>)
- [MANDATORY] <time> The new timer time
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a timer HUD element to count down in tenths of a second
EXAMPLE: self.kc_timer SetTenthsTimer( self.archivetime - delay )
void <hud_timer_element> SetTenthsTimerUp(<time>)
- [MANDATORY] <time> The new timer time
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a timer HUD element to count up in tenths of a second
EXAMPLE: self.kc_timer SetTenthsTimerUp( self.archivetime - delay )
void <hud_element> SetText(<text>)
- [MANDATORY] <text> A localized text reference
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set HUD text for this element.
EXAMPLE: level.introstring1 SetText(string1)
void <hud_timer_element> SetTimer(<time>)
- [MANDATORY] <time> The new timer time
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a timer HUD element to count down
EXAMPLE: level.reinforcement_hud SetTimer( level.counter )
void <hud_timer_element> SetTimerUp(<time>)
- [MANDATORY] <time> The new timer time
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a timer HUD element to count up
EXAMPLE: level.reinforcement_hud SetTimerUp( level.counter )
void <hud_element> SetTypewriterFX(<letterTime>,<decayStart>,<decayDuration>)
- [MANDATORY] <letterTime> Time it take for each letter to type in.
- [MANDATORY] <decayStart> Time to wait before starting the text decay effect.
- [MANDATORY] <decayDuration> How long to spend decaying.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set the hudelem string to display with a redact effect.
EXAMPLE: elem SetTypewriterFX( 100, 600, 3000 )
void SetUIModelValue(<model>,<value>)
- [MANDATORY] <model> Model of the value to set.
- [MANDATORY] <value> Value to set.
CATEGORY: UI
CLIENT/SERVER: Client
SUMMARY: Sets a UIModel from the model being passed in.
EXAMPLE: SetUIModelValue( gameScoreModel )
void <hud_value_element> SetValue(<value>)
- [MANDATORY] <value> The value to set the element to
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Set a value HUD element to a given value.
EXAMPLE: level.reinforcement_hud SetValue( 0 )
void <hud_element> SetWarGameData(<momentumProgress>)
- [MANDATORY] <momentumProgress>, <momentumMultiplier>, <momentumBlitzkriegTime>
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Creates a WAR specific HUD progress element
EXAMPLE: hudelement SetWarGameData( 0, 1, 30 )
void <hud_element> SetWayPoint(<constantSize>,[offscreenMaterialName],[isDistanceShown],[no offscreen])
- [MANDATORY] <constantSize> boolean describing whether the hud element remains the same size
- [OPTIONAL] [offscreenMaterialName] Material to draw when waypoint is offscreen.
- [OPTIONAL] [isDistanceShown] boolean turning on/off player distance to waypoint display above the waypoint.
- [OPTIONAL] [no offscreen] boolean turning on/off arrow indicators when element is offscreen.
CATEGORY: UI
CLIENT/SERVER: Server
SUMMARY: Sets a hud element to be a waypoint.
EXAMPLE: newdeathicon SetWayPoint( true )
void array(<args>)
- [MANDATORY] <args> one or more args to add to the array
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: create an array
void ArrayCombine(<array1>,<array2>,<allowdupes>,<preserve_keys>)
- [MANDATORY] <array1> array to operate on
- [MANDATORY] <array2> array to operate on
- [MANDATORY] <allowdupes> if true then allow duplicate entries, otherwise prune them out when combining
- [MANDATORY] <preserve_keys> if true then preserve the keys (only for string keys) otherwise renumber when combining
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: combine two arrays into and returns one new array
void ArrayCopy(<array1>)
- [MANDATORY] <array1> array to operate on
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: returns a copy of an array
void ArrayGetClosest(<origin>,<array>,[dist])
- [MANDATORY] <origin> The origin to get closest from
- [MANDATORY] <array> The array to search in
- [OPTIONAL] [dist] The minimum distance to check when finding closest (has to be positive)
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the entity/vector that is closest to the <origin> from the <array>.
EXAMPLE: ent = ArrayGetClosest( player.origin, a_enemies )
void ArrayGetFarthest(<origin>,<array>,[dist])
- [MANDATORY] <origin> The origin to get farthest from
- [MANDATORY] <array> The array to search in
- [OPTIONAL] [dist] The maximum distance when finding farthest (has to be positive)
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the entity/vector that is farthest to the <origin> from the <array>.
EXAMPLE: ent = ArrayGetFarthest( player.origin, a_enemies )
void ArrayInsert(<array>,<value>,<index>)
- [MANDATORY] <array> array to operate on
- [MANDATORY] <value> value to insert
- [MANDATORY] <index> index at which to insert the value (must be an integer) - moves existing entries as required
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: insert a value into an array at a given index
void ArrayIntersect(<array1>,<array2>,[matchKeys])
- [MANDATORY] <array1> An Array
- [MANDATORY] <array2> An Array
- [OPTIONAL] [matchKeys] Optionally returns an array of matching key/value pairs from the two input arrays (preserving the keys).
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns an array of values that are present in both arrays.
EXAMPLE: newArray = ArrayIntersect( array1, array2 )
void ArrayRemoveIndex(<array>,<index>,[preserve_keys])
- [MANDATORY] <array> array to operate on
- [MANDATORY] <index> index of value to remove
- [OPTIONAL] [preserve_keys] defaults to false, if true then it preserves the keys - otherwise creates integer keys
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Remove a value from an array at a given index
void ArrayRemoveValue(<array>,<value>,[preserve_keys])
- [MANDATORY] <array> array to operate on
- [MANDATORY] <value> value to remove (may be undefined)
- [OPTIONAL] [preserve_keys] defaults to false, if true then it preserves the keys - otherwise creates integer keys
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Remove a value from an array (may affect multiple indexes)
void Assert(<value>,[desc])
- [MANDATORY] <value> statement that is asserted to be correct
- [OPTIONAL] [desc] string describing the nature of the assert
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Assert that the given statement is correct. The function will throw a script error if this is false.
EXAMPLE: Assert( enemyInSight == true )
void AssertMsg(<message>)
- [MANDATORY] <message> error message
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Throws a script error with the given message.
EXAMPLE: AssertMsg( "Unhandled enemy type." )
void associativeArray(<key_i>,<value_i>)
- [OPTIONAL] <key_i> the string key for the next value
- [OPTIONAL] <value_i> the value for the previous key
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: creates an associativeArray
void ClientHasSnapshot(<local client>)
- [MANDATORY] <local client> the desired Local Client number.
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns true if client has recieved a snapshot from the server
void ErrorMsg(<message>)
- [MANDATORY] <message> error message
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Throws a non-fatal script error with the given message.
EXAMPLE: ErrorMsg( "Unhandled enemy type." )
void GetArrayKeys(<array>)
- [MANDATORY] <array> Input array
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns an array consisting of the keys of the input array.
EXAMPLE: result = GetArrayKeys( array )
void GetAttachmentTableIndex(<attachmentRef>)
- [MANDATORY] <attachmentRef> Attachment Reference
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the attachment table index for the attachment name
EXAMPLE: attachmentIndex = GetAttachmentTableIndex( "reflex" )
void GetDvarFloat(<dvar>,[default_value])
- [MANDATORY] <dvar> The dvar name as a string or hash.
- [OPTIONAL] [default_value] The value to be returned if the dvar doesn't exist, must be an float.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Gets the value of a dvar.
EXAMPLE: GetDvarFloat( "r_eyesAdjust", 1.0 )
void GetDvarInt(<dvar>,[default_value])
- [MANDATORY] <dvar> The dvar name as a string or hash.
- [OPTIONAL] [default_value] The value to be returned if the dvar doesn't exist, must be an integer.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Gets the value of a dvar.
EXAMPLE: GetDvarInt( "r_eyesAdjust", 1 )
void GetDvarString(<dvar>,[default_value])
- [MANDATORY] <dvar> The dvar name as a string or hash.
- [OPTIONAL] [default_value] The value to be returned if the dvar doesn't exist, must be a string.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Gets the value of a dvar.
EXAMPLE: GetDvarString( "r_eyesAdjust", "yes" )
void GetDvarVector(<dvar>,[default_value])
- [MANDATORY] <dvar> The dvar name as a string or hash.
- [OPTIONAL] [default_value] The value to be returned if the dvar doesn't exist, must be an vector.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Gets the value of a dvar.
EXAMPLE: GetDvarVector( "r_eyesAdjust", (1,0,0) )
void GetFirstArrayKey(<array>)
- [MANDATORY] <array> Input array
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the first key of the input array.
EXAMPLE: key = GetFirstArrayKey( array )
void GetItemIndexFromRef(<itemRef>)
- [MANDATORY] <itemRef> Item Reference
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the item index for the specified item reference
EXAMPLE: itemIndex = GetItemIndexFromRef( <itemRef> )
void GetLastArrayKey(<array>)
- [MANDATORY] <array> Input array
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the last key of the input array.
EXAMPLE: key = GetLastArrayKey( array )
void GetMapCenter()
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns the map center
EXAMPLE: center = GetMapCenter()
void GetNextArrayKey(<array>,<key>)
- [MANDATORY] <array> Input array
- [MANDATORY] <key> The given key
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the next key of the input array, after the specified key.
EXAMPLE: key = GetNextArrayKey( array, key )
void GetPrevArrayKey(<array>,<key>)
- [MANDATORY] <array> Input array
- [MANDATORY] <key> The given key
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the prev key of the input array, before the specified key.
EXAMPLE: key = GetPrevArrayKey( array, key )
void GetServerTime(<localClientNum>)
- [MANDATORY] <localClientNum> The local client
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns the time according to the server
EXAMPLE: GetServerTime(localClientNum)
void GetSubStr(<string>,<start index>,[end index])
- [MANDATORY] <string> The input string
- [MANDATORY] <start index> The start index of the substring
- [OPTIONAL] [end index] The end index of the substring
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns the substring of characters >= <start index> and < <end index>. <end index> is optional.
EXAMPLE: name = getSubStr( playerwarp_string, 8 )
void GetSystemTime([ignore timezone])
- [OPTIONAL] [ignore timezone] Set to non-zero to ignore the timezone information
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns the time of the system in a vector where the 0 index is hours (in 24hr time), 1 is minutes, and 2 is seconds
EXAMPLE: GetSystemTime(1)
void IsArray(<variable>)
- [MANDATORY] <variable> variable that may or may not be a array
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is an array
EXAMPLE: if ( isarray ( gun_owner )) ...
void IsClass(<variable>)
- [MANDATORY] <variable> variable that may or may not be a class
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is a class object
EXAMPLE: if ( isclass(self)) ...
void IsFloat(<variable>)
- [MANDATORY] <variable> variable that may or may not be a float
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is a float
EXAMPLE: if ( IsFloat( gun_owner ) ) ...
void IsFunctionPtr(<variable>)
- [MANDATORY] <variable> variable to test
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether given variable is of type Function Pointer in script, useful to differentiate between Var and FuncPtr in Script.
EXAMPLE: if ( IsFunctionPtr( myFuncPtr ) ) ...
void IsInArray(<array>,<value>)
- [MANDATORY] <array> array to search
- [MANDATORY] <value> value to search for
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: searches an array to determine if a given value is present in that array
void IsInt(<variable>)
- [MANDATORY] <variable> variable that may or may not be an int
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is an int
EXAMPLE: if ( IsInt( gun_owner ) ) ...
void IsMatureContentEnabled()
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns true if mature content is enabled
EXAMPLE: if( IsMatureContentEnabled() )
void IsShowBloodEnabled()
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns true if blood is enabled
EXAMPLE: if( IsShowBloodEnabled() )
void IsShowGibsEnabled()
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Returns true if gibs is enabled
EXAMPLE: if( IsShowGibsEnabled() )
void IsString(<variable>)
- [MANDATORY] <variable> variable that may or may not be a string
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is a string
EXAMPLE: if ( isstring ( gun_owner )) ...
void IsStruct(<variable>)
- [MANDATORY] <variable> variable that may or may not be a struct
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this variable is a struct object
EXAMPLE: if ( isstruct(self)) ...
void IsSubStr()
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns true/false if <substring> is a substring of <string>. Case sensitive.
EXAMPLE: has_str = IsSubStr( "my_string", "str" )
void istring(<value>)
- [MANDATORY] <value> A string to cast to an istring
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Casts a string to an istring
EXAMPLE: x = istring( String )
void IsVec(<variable>)
- [MANDATORY] <variable> variable that may or may not be a vector
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this entity/variable is a vector
EXAMPLE: if ( IsVec( gun_owner ) ) ...
void IsWeapon(<weapon_object>)
- [MANDATORY] <weapon_object> An parameter that may be a weapon object
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Checks whether this is a weapon object
EXAMPLE: if ( IsWeapon( current_weapon ) ) ...
void MakeLocalizedString(<string>)
- [MANDATORY] <string> The string to translate
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Make a localized string of the given string
void SplitArgs(<arg string>)
- [MANDATORY] <arg string> space seperated string.
CATEGORY: Utility
CLIENT/SERVER: Client
SUMMARY: Splits a space seperated string, returning an array of each word in the string.
EXAMPLE: args = SplitArgs("First second third fourth")
void sprintf(<string>,[args])
- [MANDATORY] <string> The string to translate
- [OPTIONAL] [args] zero or more arguments
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Replaces field specifiers in a string with values passed in, returns result string format specifiers take the form of {[n]} in the source string where [n] indicates which value to print, e.g. 0 is the first user arg
EXAMPLE: sprintf("{0} is the first string","first")
void StrEndsWith(<string>,<substring>)
- [MANDATORY] <string> String to search
- [MANDATORY] <substring> Substring to search with.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns true/false if <string> ends with <substring>. Case sensitive.
EXAMPLE: ends_with = StrEndsWith( "my_string", "_string" )
void StrIsFloat(<string>)
- [MANDATORY] <string> : The string to check.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Check if a string is a float.
EXAMPLE: StrIsFloat( "1.2" ); // true
void StrIsInt(<string>)
- [MANDATORY] <string> : The string to check.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Check if a string is an int.
EXAMPLE: StrIsInt( "1" ); // true
void StrIsNumber(<string>)
- [MANDATORY] <string> : The string to check.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Check if a string is a number.
EXAMPLE: StrIsNumber( "1.2" ); // true
void StrStartsWith(<string>,<substring>)
- [MANDATORY] <string> String to search
- [MANDATORY] <substring> Substring to search with.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Returns true/false if <string> starts with <substring>. Case sensitive.
EXAMPLE: starts_with = StrStartsWith( "my_string", "my_" )
void StrStrip(<string>)
- [MANDATORY] <string> : The string to strip.
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Strip whitespace from right and left side of string.
EXAMPLE: StrStrip( " hq_cleared " ); // 'hq_cleared'
void StrTok(<string>,<delim>)
- [MANDATORY] <string> The input string
- [MANDATORY] <delim> The delimiter to tokenize by
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Tokenizes <string> by the delimiters <delim>. Returns the array of string tokens.
EXAMPLE: my_string_array = StrTok( "my_string; my_string_2", "; " )
void StrTok2(<string>,<delim>,<case_sensitive>)
- [MANDATORY] <string> The input string
- [MANDATORY] <delim> The delimiter to tokenize by
- [OPTIONAL] <case_sensitive> true if test is case sensitive
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Tokenizes <string> by a single delimiter string. doesn't treat the delimiter string as a series of characters, but as a string
EXAMPLE: my_string_array = StrTok2( "my_string foo; my_string_2", "foo; " )
void TableLookup(<filename>,<search column num>,<search value>,<return value column num>)
- [MANDATORY] <filename> The table to look up
- [MANDATORY] <search column num> The column number of the stats table to search through
- [MANDATORY] <search value> The value to use when searching the <search column num>
- [MANDATORY] <return value column num> The column number value to return after we find the correct row
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up a row in a table and pull out a particular column from that row
EXAMPLE: TableLookup( "mp/statstable.csv", 0, "INDEX_KILLS", 1 )
void TableLookupColumnCount(<filename>)
- [MANDATORY] <filename> The table to look up
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up the number of columns in a table
EXAMPLE: TableLookup( "mp/statstable.csv" )
void TableLookupColumnForRow(<filename>,<search row num>,<search column num>)
- [MANDATORY] <filename> The table to look up
- [MANDATORY] <search row num> The row number of the string table to search through
- [MANDATORY] <search column num> The column number of the string table to search through
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up a particular row and column in a table
EXAMPLE: TableLookupColumnForRow( "gamedata/tables/mp/exampleStringTable.csv", 101, 7 )
void TableLookupFindCoreAsset(<filename>)
- [MANDATORY] <filename> The table to look up
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Find core asset index for a stringtable
EXAMPLE: TableLookupRowNum( "mp/statstable.csv" )
void TableLookupIString(<filename>,<search column num>,<search value>,<return value column num>)
- [MANDATORY] <filename> The table to look up
- [MANDATORY] <search column num> The column number of the stats table to search through
- [MANDATORY] <search value> The value to use when searching the <search column num>
- [MANDATORY] <return value column num> The column number value to return after we find the correct row
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up a row in a table and pull out a particular column from that row
EXAMPLE: TableLookupIString( "mp/statstable.csv", 0, "INDEX_KILLS", 1 )
void TableLookupRow(<filename>,<row num>)
- [MANDATORY] <filename> The table to look up
- [MANDATORY] <row num> The row num of the row in table to return
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Return an array of strings for the columns in that row
void TableLookupRowCount(<filename>)
- [MANDATORY] <filename> The table to look up
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up the number of rows in a table
EXAMPLE: TableLookup( "mp/statstable.csv" )
void TableLookupRowNum(<filename>,<search column num>,<search value>)
- [MANDATORY] <filename> The table to look up
- [MANDATORY] <search column num> The column number of the stats table to search through
- [MANDATORY] <search value> The value to use when searching the <search column num>
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: look up a row number in a table
EXAMPLE: TableLookupRowNum( "mp/statstable.csv", 0, "INDEX_KILLS" )
void Throw()
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: force a script exception (from a builtin call)
EXAMPLE: throw( )
void ToLower(<string>)
- [MANDATORY] <string> (string) Base string
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Converts <string> to a lower case string which is returned.
EXAMPLE: my_string = ToLower( "MY_STRING" )
void ToUpper(<string>)
- [MANDATORY] <string> (string) Base string
CATEGORY: Utility
CLIENT/SERVER: Both
SUMMARY: Converts <string> to a upper case string which is returned.
EXAMPLE: my_string = ToUpper( "lower" )
void <vehicle> AttachPath(<node>)
- [MANDATORY] <node> A node on the path to attach.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Attaches this vehicle to the given path.
EXAMPLE: bomber AttachPath( aBomberPaths[i] )
void <vehicle> CancelAIMove()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Tell the vehicle to stop moving towards its current goal position.
EXAMPLE: eTank CancelAIMove()
void <vehicle> ClearDefaultPitch()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clears the desired default pitch for a vehicle.
EXAMPLE: level.heli cleardefaultpitch()
void <vehicle> ClearGoalYaw()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clear the goal yaw direction for this vehicle.
EXAMPLE: level.flak1 ClearGoalYaw()
void <vehicle> ClearGunnerTarget([gunner index])
- [OPTIONAL] [gunner index] Which gun, 0-3.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clear the target for the vehicle turret.
EXAMPLE: eTank ClearGunnerTarget(0)
void <vehicle> ClearLookAtEnt()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clear the entity or origin the vehicle is orienting towards.
EXAMPLE: heli clearLookAtEnt()
void <vehicle> ClearTargetYaw()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clear the target yaw direction for this vehicle.
EXAMPLE: level.flak1 cleartargetyaw()
void <vehicle> ClearTurretTarget([turret index])
- [OPTIONAL] [turret index] 0 for turret, 1-4 for gunners
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clear the target for the vehicle turret.
EXAMPLE: eTank ClearTurretTarget()
void <vehicle> ClearVehGoalPos()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clears the target position for this vehicle.
EXAMPLE: tank ClearVehGoalPos()
void CreateTrack(<node>)
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the node enabled or disabled for vehicle pathfinding. SetVehGoalPos will now return true or false if it can find a path.
EXAMPLE: CreateTrack( track_node )
void <vehicle> DisableDriverFiring()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Enables or disables the driver's vehicle turret
EXAMPLE: tank DisableDriverFiring( true )
void <vehicle> DisableGunnerFiring(<gunner index>,<onoff>)
- [MANDATORY] <gunner index> The gunner to disable/enable
- [MANDATORY] <onoff> true to disable, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Enable or disable gunner firing
EXAMPLE: tank DisableGunnerFiring( 1, true )
void <vehicle> DrawTrajectory(<show>)
- [MANDATORY] <show> Whether to draw trajectory or not
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Draws the vehicles trajectory.
EXAMPLE: plane DrawTrajectory( true )
void <vehicle> DrivePath([node index],[allow free drive])
- [OPTIONAL] [node index] A node on the path to attach.
- [OPTIONAL] [allow free drive] This give the player free driving but script notifies when passing nodes on a vehcile spline
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Starts the vehicle driving this path and uses the vehicle physics, not locked to the spline, can only achieve turns that the physics can handle.
EXAMPLE: huey DrivePath( start_node )
entity <vehicle> FinishVehicleDamage(<Inflictor>,<Attacker>,<Damage>,<Damage Flags>,<Means Of Death>,<Weapon>,<Point>,<Direction>,<Hit Loc>,<Offset Time>,<DamageFromUnderneath>,<modelIndex>,<partIndex>,<damageteammates>)
- [MANDATORY] <Inflictor> The entity that causes the damage.(e.g. a turret)
- [MANDATORY] <Attacker> The entity that is attacking.
- [MANDATORY] <Damage> Integer specifying the amount of damage done
- [MANDATORY] <Damage Flags> Integer specifying flags that are to be applied to the damage
- [MANDATORY] <Means Of Death> Integer specifying the method of death
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
- [MANDATORY] <Point> Point of damage
- [MANDATORY] <Direction> (vector) The direction of the damage
- [MANDATORY] <Hit Loc> The location of the hit
- [MANDATORY] <Offset Time> The time offset for the damage
- [MANDATORY] <DamageFromUnderneath> If the hit is underneath the vehicle
- [MANDATORY] <modelIndex> which model in the dobj was hit
- [MANDATORY] <partIndex> which bone was hit
- [MANDATORY] <damageteammates> Whether to damage teammates or not
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Does damage to an vehicle - usually as part of the damage callback
EXAMPLE: self FinishVehicleDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime, damageUnderneathVehicle, modelindex, partname, damageteammates )
void <vehicle> FinishVehicleRadiusDamage(<Inflictor>,<Attacker>,<Damage>,<Inner Damage>,<Outer Damage>,<Damage Flags>,<Means Of Death>,<Weapon>,<Point>,<Radius>,<ConeRadius>,<ConeDirection>,<Offset Time>)
- [MANDATORY] <Inflictor> The entity that causes the damage.(e.g. a turret)
- [MANDATORY] <Attacker> The entity that is attacking.
- [MANDATORY] <Damage> Integer specifying the amount of damage done
- [MANDATORY] <Inner Damage> Integer specifying the amount of inner damage done
- [MANDATORY] <Outer Damage> Integer specifying the amount of outer damage done
- [MANDATORY] <Damage Flags> Integer specifying flags that are to be applied to the damage
- [MANDATORY] <Means Of Death> Integer specifying the method of death
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
- [MANDATORY] <Point> (vector) The Point of the damage
- [MANDATORY] <Radius> (float) The radius of the damage
- [MANDATORY] <ConeRadius> (float) The radius of the cone damage
- [MANDATORY] <ConeDirection> (vector) The direction of the cone damage
- [MANDATORY] <Offset Time> The time offset for the damage
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Does damage to an vehicle - usually as part of the damage callback
EXAMPLE: self FinishVehicleRadiusDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, fRadius, fConeRadius, fConeDir, psOffsetTime )
entity <vehicle> FireWeapon([turret_index],[target ent],[target offset],[attacker])
- [OPTIONAL] [turret_index] turret index, 0 being main turret, 1~4 being gunners
- [OPTIONAL] [target ent] A target entity for guided missiles
- [OPTIONAL] [target offset] Only used for projectile and bomb weapons
- [OPTIONAL] [attacker] real attacker who should take credit of this shot
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Fire the vehicle's weapon
EXAMPLE: m_vehicle FireWeapon( 0, m_e_target, v_target_offset )
void <vehicle> Flip180()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Flips this vehicle 180 (for going forwards / backwards along a path)
EXAMPLE: huey Flip180()
void <vehicle> FreeVehicle()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Frees this vehicle instance. It will unlink any players occupying the vehicle. It will change the vehicle into a vehicle corpse. It will send a death notify on the vehicle. Once called the vehicle cannot move anymore.
EXAMPLE: self FreeVehicle()
void GetAllVehicleNodes()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets all of the vehicle nodes in a level
EXAMPLE: nodes = GetAllVehicleNodes()
void <vehicle> GetAngularVelocity()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the current angular velocity.
EXAMPLE: self GetAngularVelocity()
void <vehicle> GetAttachPos(<node index>)
- [MANDATORY] <node index> A node on the path to attach.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the origin and angles if the vehicle were to be attached to the path. The origin and angles are returned as a vector array of size 2. Origin is 1st and angles is 2nd.
EXAMPLE: pos = self GetAttachPos( node )origin = pos[0]angles = pos[1]
void <vehicle> GetBrake()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the brake value of a nitrous physics vehicle.
EXAMPLE: jeep getbrake()
void <vehicle> GetDefaultAcceleration()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the acceleration value set in GDT.
EXAMPLE: accel = self GetDefaultAcceleration()
void <vehicle> getgoalspeedMPH()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the goal speed in miles per hour.
EXAMPLE: self GetGoalSpeedMPH()
void <vehicle> GetGoalYaw()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw
EXAMPLE: level.flak1 GetGoalYaw()
entity <vehicle> GetGunnerTargetEnt(<gunner index>)
- [MANDATORY] <gunner index> Which gun, 0-3.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the target entity for this gunner position.
EXAMPLE: target = huey GetGunnerTurretEnt( 0 )
void <vehicle> GetGunnerTargetVec(<gunner index>)
- [MANDATORY] <gunner index> which gun 0-3
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the target position for this vehicle turret gunner.
EXAMPLE: endpt = GetGunnerTargetVec( 1 )
void <vehicle> GetHandBrake()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the hand brake value of a nitrous physics vehicle.
EXAMPLE: jeep gethandbrake()
void <vehicle> GetHeliHeightLock()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Locks the heli to the height mesh
EXAMPLE: if ( vehicle GetHeliHeightLock( ) )
void <vehicle> GetHeliHeightLockHeight(<point>)
- [MANDATORY] <point> The point to check at
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the mesh height at a given point.
EXAMPLE: maxheight = GetHeliHeightLockHeight( point )
void <vehicle> GetMaxSpeed([get gdt])
- [OPTIONAL] [get gdt] true to get the gdt setting and not the script set.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the max speed of a vehicle. By default gets the script setting
EXAMPLE: heli GetMaxSpeed( true )
void GetNumVehicles()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the number of vehicles entities in the level
EXAMPLE: vehicleCount = GetNumVehicles()
void <vehicle> GetOccupantSeat(<player>)
- [MANDATORY] <player> The player to get the seat index for
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the seat index occupied by the given player. -1 if player isn't in vehicle.
EXAMPLE: isDriver = 0 == vehicle GetOccupantSeat( player )
void <vehicle> GetPathFixedOffset()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets a fixed offset from the path for a specific vehicle.
EXAMPLE: offset = huey GetPathFixedOffset()
void <vehicle> GetPathVariableOffset()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets a variable offset from the path for a specific vehicle.
EXAMPLE: offset = huey GetPathVariableOffset()
void <vehicle> GetPhysAcceleration()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the vehicles acceleration vector.
EXAMPLE: accel = plane GetPhysAccel()
void <vehicle> GetScriptBrake()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the script brake value of a nitrous physics vehicle.
EXAMPLE: jeep getscriptbrake()
void <vehicle> GetSeatFiringAngles(<seat index>)
- [MANDATORY] <seat index> The seat to firing angles for
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Retrieve the angles specifying the direction in which bullets, projectiles, etc. will be emitted from the weapon when it is fired.
EXAMPLE: turretBarrelAngles = tank GetSeatFiringAngles( 0 )
void <vehicle> GetSeatFiringOrigin(<seat index>)
- [MANDATORY] <seat index> The seat to firing origin for
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Retrieve the location at the end of the barrel where bullets, projectiles, etc. are emitted when the gun is fired.
EXAMPLE: turretBarrelOrigin = tank GetSeatFiringOrigin( 0 )
entity <vehicle> GetSeatOccupant(<seat>)
- [MANDATORY] <seat> 0 driver, 1-4 gunners, 5-10 passengers
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the entity occupying the given seat index. Undefined if the seat is empty.
EXAMPLE: driver = vehicle GetSeatOccupant( 0 )
void <vehicle> GetSpeed()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the current speed in inches per second.
EXAMPLE: self GetSpeed()
void <vehicle> GetSpeedMPH()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the current speed in miles per hour.
EXAMPLE: self GetSpeedMPH()
void <vehicle> GetSteering()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the steer factor of the vehicle.
EXAMPLE: self GetSteering()
void <vehicle> GetThrottle()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the throttle factor of the vehicle.
EXAMPLE: self GetThrottle()
void GetTimeFromVehicleNodeToNode(<start_node>,<end_node>)
- [MANDATORY] <start_node> The start node of the path
- [MANDATORY] <end_node> The end node of the path
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: The time it would take to go from start node to end node if traveling the spline speed.
EXAMPLE: time = GetTimeFromVehicleNodeToNode( start_node, end_node )
void <vehicle> GetTurretHeatValue(<gunner index>)
- [MANDATORY] <gunner index> which gun 0-3
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the current heat value for a vehicle weapon.
EXAMPLE: heat = self GetTurretHeatValue( 1 )
void <vehicle> GetTurretLimitsYaw([turret index])
- [OPTIONAL] [turret index] 0 for turret, 1-4 for gunners
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the furthest relative yaw angles the turret can aim, all numbers are positive
EXAMPLE: limit = veh GetTurretLimits( 1 ); limitMin = -limit[0]; limitMax = limit[1]
void <vehicle> GetTurretTargetVec([turret index])
- [OPTIONAL] [turret index] 0 for turret, 1-4 for gunners
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the target position for this vehicle turret or gunner.
EXAMPLE: endpt = GetTurretTargetVec( 1 )
void <vehicle> GetVehDamageMultiplier(<damageType>)
- [MANDATORY] <damageType> The type of damage being applied to the vehicle
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets the damage multiplier that applies to the damage type.
EXAMPLE: vehicle GetVehDamageMultiplier( damgType )
void <vehicle> GetVehicleAvoidance()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Locks the heli to the height mesh
EXAMPLE: if ( vehicle GetVehicleAvoidance() )
void <vehicle> GetVehicleAvoidanceNodes(<radius>)
- [MANDATORY] <radius> A radius to filter out nodes returned.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the positions for nearby avoidance nodes.
EXAMPLE: nodes = plane GetVehicleAvoidanceNodes( radius )
void GetVehicleNode(<name>,<key>)
- [MANDATORY] <name> (string) The name to search for
- [MANDATORY] <key> (string) The key that name goes with
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets a vehicle node with the given name, key pair
EXAMPLE: node = getvehiclenode(self.target, "targetname")
void GetVehicleNodeArray(<name>,<key>)
- [MANDATORY] <name> (string) The name to search for
- [MANDATORY] <key> (string) The key that name goes with
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Gets an array of vehicle nodes that have the given name, key pair
EXAMPLE: nodes = GetVehicleNodeArray(self.target, "targetname")
entity <vehicle> GetVehicleOwner()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the owner of this particular vehicle.
EXAMPLE: eFlak88user = eFlak88 GetVehicleOwner()
entity <vehicle> GetVehOccupants()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Get the occupants of this vehicle in an entity array.
EXAMPLE: ridersarray = vehicle getvehoccupants()
void <vehicle> GetWheelSurface(<wheel>)
- [MANDATORY] <wheel> The wheel position, can be 'front_left', 'front_right', 'back_left', 'back_right', 'middle_left', 'middle_right'
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the surface type of the given wheel as a string.
EXAMPLE: surface = self GetWheelSurface( side )
void <vehicle> IsDriverFiring()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Checks if this driver is firing the vehicle turret
EXAMPLE: if( tank IsDriverFiring() )
void <vehicle> IsGunnerFiring(<gunner index>)
- [MANDATORY] <gunner index> The gunner to check
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Checks if this gun is currently firing.
EXAMPLE: if( tank IsGunnerFiring( 1 ) )
void IsInsideHeliHeightLock()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns true if Helicopter is inside height mesh
EXAMPLE: if ( IsInsideHeliHeightLock() )
void <vehicle> isremotecontrol()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Query whether this vehicle is usable by players
EXAMPLE: if ( vehicle isvehicleusable( ) )...
void <vehicle> IsTurretReady()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Query whether this vehicle's turret is ready for firing
EXAMPLE: while ( level.playertank IsTurretReady() != true ) ...
void <vehicle> IsVehicleImmuneToDamage(<Damage Flags>,<Means Of Death>,<Weapon>)
- [MANDATORY] <Damage Flags> Integer specifying flags that are to be applied to the damage
- [MANDATORY] <Means Of Death> Integer specifying the method of death
- [MANDATORY] <Weapon> The weapon number of the weapon used to inflict the damage
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: This checks the vehicle GDT settings related to bulletdamage, grenadedamage, etc.
EXAMPLE: if ( vehicle IsVehicleImmuneToDamage( flags, mod, weapon ) )
void <vehicle> IsVehicleManualControl()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: check if vehicle hkai behavior is enabled. Not to be confused with UseVehicle()
EXAMPLE: vehicle IsVehicleManualControl()
void <vehicle> IsVehicleSeatOccupied(<seat>)
- [MANDATORY] <seat> 0 driver, 1-4 gunners, 5-10 passengers
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: same as useby except you can specify a seat, 0 driver, 1-4 gunners, 5-10 passengers
EXAMPLE: lvt IsVehicleSeatOccupied( 2 )
void <vehicle> IsVehicleTurretOverheating(<gunner index>)
- [MANDATORY] <gunner index> which gun 0-3
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns true if the vehicle turret weapon is overheating, else returns false.
EXAMPLE: if( self IsVehicleTurretOverheating( 1 ) )
void <vehicle> IsVehicleUsable()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Query whether this vehicle is usable by players
EXAMPLE: if ( vehicle isvehicleusable( ) )...
void <vehicle> JoltBody(<jolt position>,<intensity>,[speedFrac],[deceleration])
- [MANDATORY] <jolt position> The position of the jolt
- [MANDATORY] <intensity> The intensity of the jolt
- [OPTIONAL] [speedFrac] A speed fraction to apply to the jolt. Most be betweeon 0 and 1.
- [OPTIONAL] [deceleration] The deceleration to apply to this vehicle in miles per hour per second.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Jolts the vehicle.
EXAMPLE: self JoltBody( (self.origin + (0,0,64)), 0.5 )
void <vehicle> MakeVehicleUnusable()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets this vehicle to be not usable by the player
EXAMPLE: car MakeVehicleUnusable()
void <vehicle> MakeVehicleUsable()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets this vehicle to be usable by the player
EXAMPLE: nFlak makeVehicleUsable()
void <vehicle> PathFixedOffset(<offset>)
- [MANDATORY] <offset> The offset to apply. A vector in the form (forward, right, up)
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets a fixed offset for this vehicle to travel on a vehicle path.
EXAMPLE: huey PathFixedOffset( (0, -200, 0) )
void <vehicle> PathFixedOffsetClear()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clears the vehicles fixed offset.
EXAMPLE: huey PathFixedOffsetClear()
void <vehicle> PathMove(<node index>,<new origin>,<new angles>)
- [MANDATORY] <node index> Which node to move to the new location (it moves the whole path not just this node).
- [MANDATORY] <new origin> The new position
- [MANDATORY] <new angles> The new angles
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Moves the entire path for this vehicle to the specific origin and angles.
EXAMPLE: huey PathMove( node, origin, angles )
void <vehicle> PathMoveClear()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clears the moved path for this vehicle. If not cleared then all paths taken will be moved.
EXAMPLE: huey PathMoveClear()
void <vehicle> PathVariableOffset(<offset>,<time>)
- [MANDATORY] <offset> The offset to apply. A vector in the form (forward, right, up)
- [MANDATORY] <time>, The interval at which to choose new offsets
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets a variable offset for this vehicle to travel on a vehicle path.
EXAMPLE: huey PathVariableOffset( (0, 50, 0), 2 )
void <vehicle> PathVariableOffsetClear()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Clears the vehicles variable offset.
EXAMPLE: huey PathVariableOffsetClear()
void <vehicle> RecalcSplinePaths()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Recalcs all the nodes int the map
EXAMPLE: tank2 RecalcSplinePaths()
void ReconnectVehicleNodes()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Reconnect vehicle nodes
EXAMPLE: ReconnectVehicleNodes()
void <vehicle> ResetVehicleFromDropDeploy()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Reset vehicle properties from drop deploy so that it may behave as normal.
EXAMPLE: raps ResetVehicleFromDropDeploy()
void <vehicle> ResumeSpeed([acceleration])
- [OPTIONAL] [acceleration] The acceleration to apply to this vehicle in miles per hour per second.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle to resume its path speed.
EXAMPLE: level.tank ResumeSpeed( 3 )
void <vehicle> ReturnPlayerControl()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: After controlling a vehicle from script using something like setvehgoalpos(), if the vehicle is being driven by a player, you call this function to return control of the vehicle to the player.
EXAMPLE: cobra returnplayercontrol()
void <vehicle> SeatGetWeapon(<seat index>)
- [MANDATORY] <seat index> The seat to get weapon for
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Returns the weapon name for the specified seat. Undefined if there isn't a weapon. Only driver and gunner seats can have weapons.
EXAMPLE: weaponname = vehicle SeatGetWeapon( 0 )
void <vehicle> SetAcceleration(<acceleration>)
- [MANDATORY] <acceleration> The acceleration of the vehicle in miles per hour per second
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the acceleration for this vehicle.
EXAMPLE: self SetAcceleration( 15 )
void <vehicle> SetAirResistance(<max air resistance speed>)
- [MANDATORY] <max air resistance speed> speed at which air resistance maxes out (MPH)
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the speed at which air resistance maxes out.
EXAMPLE: self SetAirResistance( 60 )
NOTES: Air resistance ramps up exponentially up to this speed. Set it to a high value to flatten helicopter when it is done accelerating to move at the desired speed
void <vehicle> SetAngularVelocity(<angular velocity>)
- [MANDATORY] <angular velocity> The angular velocity to set
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the angular velocity of a vehicle in degs/s.
EXAMPLE: self SetAngularVelocity( (0, 90, 0) )
void <vehicle> SetBrake(<bool>)
- [MANDATORY] <bool> True or 1 to turn on the brake, false or 0 otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Turns off/on the hand brake of a nitrous physics vehicle.
EXAMPLE: jeep setbrake(1)
void <vehicle> SetBuoyancyOffset(<offset>)
- [MANDATORY] <offset> A height offset from water surface.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: set buoyancy offset that changes the height an individual vehicle floats in water
EXAMPLE: crocodile SetBuoyancyOffset( 20 )
void SetDamageStage(<stage>)
- [MANDATORY] <stage> the damage stage to set
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the damage stage of the helicopter
EXAMPLE: self setdamagestage( 3 )
void <vehicle> SetDeceleration(<deceleration>)
- [MANDATORY] <deceleration> The deceleration of the vehicle in miles per hour per second
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the deceleration for this vehicle.
EXAMPLE: self SetDeceleration( 5 )
void <vehicle> SetDefaultPitch(<pitch>)
- [MANDATORY] <pitch> Set the default pitch
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the desired default pitch for a vehicle.
EXAMPLE: level.heli setdefaultpitch(10)
void <vehicle> SetDrivePathPhysicsScale([scale])
- [OPTIONAL] [scale] The scale to set
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: This scales all of the necessary parameters that will help a vehicle drive a path better.
EXAMPLE: boat SetDrivePathPhysicsScale( 3.0 )
void <vehicle> SetGoalYaw(<integer>)
- [MANDATORY] <integer> The yaw direction of the target: 0 to 360 integer value
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw
EXAMPLE: level.flak1 SetGoalYaw( int_value )
void <vehicle> SetGunnerTargetEnt(<target entity>,[target offset],[gunner index])
- [MANDATORY] <target entity> The target.
- [OPTIONAL] [target offset] The target offset.
- [OPTIONAL] [gunner index] Which gun, 0-3.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target entity for this vehicle gunner.
EXAMPLE: eLiberator SetGunnerTargetEnt( eFlaktarget, (0,0,0), 2 )
void <vehicle> SetGunnerTargetVec(<target position>,[gunner index])
- [MANDATORY] <target position> vecter to aim at/ the position of the target
- [OPTIONAL] [gunner index] which gun 0-3
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target position for this vehicle turret gunner.
EXAMPLE: level.flak1 SetGunnerTargetVec( vec1, 1 )
void <vehicle> SetGunnerTurretOnTargetRange(<gunner index>,[range])
- [MANDATORY] <gunner index> Which gun, 0-3.
- [OPTIONAL] [range] In degrees
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the range at which the gunner_turret_on_target notify will occur.
EXAMPLE: boat SetGunnerTurretOnTargetRange( 0, 15 )
void <vehicle> SetHeliDogfighting(<enabled>)
- [MANDATORY] <enabled> true to enable dogfighting, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the vehicle (intended for VTOLs only) to be in dogfighting mode (dogfights with the vehicle's focus entity)
EXAMPLE: vehicle SetHeliDogfighting( true )
void <vehicle> SetHeliHeightCap(<enabled>)
- [MANDATORY] <enabled> true to enable, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Pulls the heli back down below the height mesh
EXAMPLE: vehicle SetHeliHeightCap( true )
void <vehicle> SetHeliHeightLock(<enabled>)
- [MANDATORY] <enabled> true to enable lock, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Locks the heli to the height mesh
EXAMPLE: vehicle SetHeliHeightLock( true )
void SetHeliHeightPatchEnabled(<targetname>,<enabled>,[player])
- [MANDATORY] <targetname> All heli height lock patches with this target name
- [MANDATORY] <enabled> Turn it on or off
- [OPTIONAL] [player] If defined, only modify the setting for that player
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Enabled or disables the specified heli height lock path
EXAMPLE: SetHeliHeightPatchEnabled( "area51", 0 )
void <vehicle> SetHoverParams(<radius>,[speed],[accel])
- [MANDATORY] <radius> The hovering range.
- [OPTIONAL] [speed] Speed to hover at (MPH)
- [OPTIONAL] [accel] Acceleration to hover at (MPH/s)
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the hovering parameters.
EXAMPLE: self SetHoverParams( 50, 1, 0.5 )
void <vehicle> SetJitterParams(<range vector>,[min period],[max period])
- [MANDATORY] <range vector> The jitter range vector.
- [OPTIONAL] [min period] Minimum time in seconds to switch jitter direction. Default 0.5 sec
- [OPTIONAL] [max period] Maximum time in seconds to switch jitter direction. Default 1.0 sec
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the jitter parameters. Set everything to 0 to stop jittering. Vehicle ignores jitter parameters when on ground
EXAMPLE: self SetJitterParams( (0,0,20), 0.5, 1.5 ); // Jitter up or down randomly within 20 units, switching every 0.5 to 1.5 seconds
NOTES: For player helicopters, the jitter params are used for jittering the pitch and roll of the helicopter
void <vehicle> SetLookAtEnt(<entity>)
- [MANDATORY] <entity> The target.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the entity this vehicle will orient towards.
EXAMPLE: eFlak88 setLookAtEnt( eFlaktarget )
void <vehicle> SetLookAtOrigin(<entity>)
- [MANDATORY] <entity> The target.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the origin this vehicle will orient towards.
EXAMPLE: heli setLookAtOrigin( org )
void <vehicle> SetMantleEnabled(<enabled>)
- [MANDATORY] <enabled> True to set the mantle enabled, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the mantle enabled flag on the vehicle
EXAMPLE: vehicle SetMantleEnabled( true )
void <vehicle> SetMaxAccelerationScale(<scale>)
- [MANDATORY] <scale> The acceleration scale of the physics vehicle
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the max acceleration scale for this physics vehicle.
EXAMPLE: self SetMaxAccelerationScale( 2.6 )
void <vehicle> SetMaxPitchRoll(<pitch>,<roll>)
- [MANDATORY] <pitch> Max pitch angle
- [MANDATORY] <roll> Max roll angle
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets max pitch and roll angle for this vehicle.
EXAMPLE: self SetMaxPitchRoll( 30, 30 )
void <vehicle> SetMaxSpeedScale(<scale>)
- [MANDATORY] <scale> The max speed scale of the physics vehicle
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the max speed scale for this physics vehicle.
EXAMPLE: self SetMaxSpeedScale( 2.6 )
void <vehicle> SetMinDesiredTurnYaw(<yaw>)
- [MANDATORY] <yaw> The min desired turn yaw to set
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: The vehicle will not update its desired yaw until the min turn yaw is reached. Set it to 0 to clear it.
EXAMPLE: quadtank SetMinDesiredTurnYaw( 45 )
void <vehicle> SetNearGoalNotifyDist(<dist>)
- [MANDATORY] <dist> Distance to goal position
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set distance near goal at which near_goal notification should be sent once.
EXAMPLE: tank setNearGoalNotifyDist( 50 )
void <vehicle> SetPathTransitionTime(<time>)
- [MANDATORY] <time> The transition time
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the time it takes for a vehicle to lerp on to a spline.
EXAMPLE: boat SetPathTransitionTime( 1.0 )
void <vehicle> SetPhysAcceleration(<acceleration>)
- [MANDATORY] <acceleration> The vehicle acceleration
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the vehicles acceleration vector.
EXAMPLE: plane SetPhysAcceleration( ( 0, 0, -1600) )
void <vehicle> SetPhysAngles(<angles vector>)
- [MANDATORY] <angles vector> The desired angles.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the angles on the phys structure
EXAMPLE: self SetPhysAngles( VectorToAngles( desired_forward ) )
void <plane> SetPlaneBarrelRoll(<number>,[time])
- [MANDATORY] <number> The number of rolls
- [OPTIONAL] [time] The goal roll time
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the goal Roll direction for this plane. PLANE_ON_CURVE has priority over ROLL if this is not set.
EXAMPLE: level.plane SetPlaneBarrelRoll( 1, 5.0f )
void <plane> SetPlaneGoalPos(<goal position>)
- [MANDATORY] <goal position> The goal position
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target position, speed, angles for this vehicle.
EXAMPLE: plane Setplanegoalpos( ( 200, 200, 200 ), ( 30, 0, 90 ), 170.0 )
void <vehicle> SetRotorSpeed(<speed>)
- [MANDATORY] <speed> The rotor speed, 0 is stopped 1 is full speed.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the helicopters rotor speed.
EXAMPLE: heli SetRotorSpeed( 0.2 )
void <vehicle> SetSeatOccupied(<seat>,[onoff])
- [MANDATORY] <seat> 0 driver, 1-4 gunners, 5-10 passengers
- [OPTIONAL] [onoff] true to enable, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets this seat to be occupied/disabled (for players.
EXAMPLE: vehicle SetSeatOccupied( 2, true )
NOTES: For players only, the AI pay attention to vehicle.usedPositions[] = true/false
void <vehicle> SetSpeed(<speed>,[acceleration],[deceleration])
- [MANDATORY] <speed> The speed of the vehicle in miles per hour
- [OPTIONAL] [acceleration] The acceleration of the vehicle in miles per hour per second
- [OPTIONAL] [deceleration] Deceleration. If not specified, set to be equal to half of accleration
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the speed and acceleration for this vehicle.
EXAMPLE: self SetSpeed( 60, 15, 5 )
void <vehicle> SetSpeedImmediate(<speed>,[acceleration],[deceleration])
- [MANDATORY] <speed> The speed of the vehicle in miles per hour
- [OPTIONAL] [acceleration] The acceleration of the vehicle in miles per hour per second
- [OPTIONAL] [deceleration] Deceleration. If not specified, set to be equal to half of accleration
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the speed and acceleration for this vehicle instantaneously. Direction will be toward the goal direction if there is a goal, otherwise the current direction.
EXAMPLE: self setspeedimmediate(60, 15, 5)
void <vehicle> SetSwitchNode(<source node>,<dest node>)
- [MANDATORY] <source node> The switch source node
- [MANDATORY] <dest node> The switch destination node.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets a switch node for this vehicle.
EXAMPLE: tank2 SetSwitchNode( tank2snode1, tank2snode2 )
void <vehicle> SetTargetYaw(<yaw>)
- [MANDATORY] <yaw> The yaw direction of the target
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw.
EXAMPLE: level.flak1 SetTargetYaw( vec1 )
void <vehicle> SetTurningAbility(<turning ability>)
- [MANDATORY] <turning ability> Between 0.001 and 1.0. Defaults to 0.5
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: If this is higher, helicopters can make sharper turns to match goal positions better.
EXAMPLE: self SetTurningAbility( 0.9 )
void <vehicle> SetTurretTargetEnt(<target entity>,[target offset])
- [MANDATORY] <target entity> The target.
- [OPTIONAL] [target offset] The target offset.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target entity for this vehicle turret.
EXAMPLE: eFlak88 SetTurretTargetEnt( eFlaktarget, eFlaktarget.origin )
void <vehicle> SetTurretTargetRelativeAngles(<relative angles>,[turret index])
- [MANDATORY] <relative angles> The target angle
- [OPTIONAL] [turret index] 0 for turret, 1-4 for gunners
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target entity for this vehicle turret.
EXAMPLE: eFlak88 SetTurretTargetEnt( eFlaktarget, eFlaktarget.origin )
void <vehicle> SetTurretTargetVec(<target position>)
- [MANDATORY] <target position> The position of the target
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target position for this vehicle turret.
EXAMPLE: level.flak1 SetTurretTargetVec( vec1 )
void <vehicle> SetVehGoalPos(<goalpos>,[stopAtGoal],[usepath])
- [MANDATORY] <goalpos> The goal position
- [OPTIONAL] [stopAtGoal] Whether the vehicle should slow down to stop at the goal position
- [OPTIONAL] [usepath] set to 1 to use pathfinding
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the target position for this vehicle. Returns true if it can find a path. If it fails to find a path the vehicle will be stopped.
EXAMPLE: tank SetVehGoalPos( (0, 0, 0), 1 )
void <vehicle> SetVehicleAvoidance(<enabled>,[radius],[priority])
- [MANDATORY] <enabled> True to enable avoidance, false otherwise
- [OPTIONAL] [radius] The avoidance radius
- [OPTIONAL] [priority] Vehicles will avoid everything that is the same priority or higher. Default priority is 1.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Turns on and off vehicle avoidance
EXAMPLE: vehicle SetVehicleAvoidance( true, 50 )
void <vehicle> SetVehicleForDropDeploy()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set vehicle properties so that it can be dropped into a map.
EXAMPLE: raps SetVehicleForDropDeploy()
void <vehicle> SetVehicleManualControl(<enabled>)
- [MANDATORY] <enabled> True to enable vehicle hkai behavior, false otherwise
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Turns on and off vehicle hkai behavior. Not to be confused with UseVehicle()
EXAMPLE: vehicle SetVehicleManualControl( true )
void <vehicle> SetVehicleType(<type>)
- [MANDATORY] <type> The type name
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the vehicles type.
EXAMPLE: plane SetVehicleType("f35_vtol")
void <vehicle> SetVehMaxSpeed(<speed>)
- [MANDATORY] <speed> The speed to set
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: overrides the max speed for this vehicle.
EXAMPLE: self SetVehMaxSpeed( 45 )
void <vehicle> SetVehVelocity(<velocity>)
- [MANDATORY] <velocity> The vehicle velocity
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the linear velocity on a vehicle/s.
EXAMPLE: self SetVehVelocity( (45, 0, 0) )
void <vehicle> SetVehWeapon(<weapon name>)
- [MANDATORY] <weapon name> The name of the weapon
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Set the vehicle's weapon
EXAMPLE: chopper setVehWeapon( "AGM_114" )
void <vehicle> SetYawSpeed(<speed>,<acceleration>,[deceleration])
- [MANDATORY] <speed> The speed of the vehicle in angles per second
- [MANDATORY] <acceleration> The acceleration of the vehicle in angles per second^2
- [OPTIONAL] [deceleration] Deceleration. If not specified, set to be equal to acceleration
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Sets the yaw speed for this vehicle.
EXAMPLE: self SetYawSpeed( 120, 60 )
void <vehicle> StartPath()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Starts the vehicle following this path.
EXAMPLE: bomber StartPath()
void <vehicle> StopFireWeapon()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Stop firing the vehicle's main weapon
EXAMPLE: nFlak StopFireWeapon()
void <vehicle> SwitchStartNode(<source node>,<dest node>)
- [MANDATORY] <source node> The start source node
- [MANDATORY] <dest node> The start destination node.
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Swaps the start node for this vehicle.
EXAMPLE: tank2 SwitchStartNode( tank2snode1, tank2snode2 )
void <vehicle> TakePlayerControl()
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: You call this function to take control away from a player.
EXAMPLE: cobra TakePlayerControl()
void <vehicle> UseVehicle(<user entity>,<seat>)
- [MANDATORY] <user entity> The player to use the vehicle
- [MANDATORY] <seat> 0 driver, 1-4 gunners, 5-10 passengers
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: same as useby except you can specify a seat, 0 driver, 1-4 gunners
EXAMPLE: lvt usevehicle( player, 2 )
void <vehicle> VehDriverAimAtCrosshairs(<AimAtCrosshairs>)
- [MANDATORY] <AimAtCrosshairs> True to aim the turret at the crosshairs
CATEGORY: Vehicle
CLIENT/SERVER: Server
SUMMARY: Enables or disables the driver turret aiming at the crosshairs (aiming at the crosshairs overrides all other aim targets and is the default behavior)
EXAMPLE: vehicle VehDriverAimAtCrosshairs( false )
void EnumerateWeapons(<weapon type>)
- [MANDATORY] <weapon type> The type of weapon to return(weapon or weaponfull)
CATEGORY: Weapon
CLIENT/SERVER: Both
SUMMARY: Return an array of weapon names for the weapons of weapon type in fastfile
EXAMPLE: a_weapons = EnumerateWeapons( "weapon" )
void Missile_CreateAttractorEnt(<entity>,<strength>,<affectdist>,<affectAllProjectiles>,<alert range>)
- [MANDATORY] <entity> The entity that is to be an attractor
- [MANDATORY] <strength> The strength of the attractor (maximum acceleration it can apply to a missile)
- [MANDATORY] <affectdist> The effective distance at which the missile can be affected. The effect of the attractor falls off from <strength> to zero from the center to this distance away from the center.
- [OPTIONAL] <affectAllProjectiles> If set it will affect all projectiles inculding grenades and guided missiles.
- [OPTIONAL] <alert range> If set it send notify when missile breaches range(but will not repulse).
CATEGORY: Weapon
CLIENT/SERVER: Server
SUMMARY: Creates a missile attractor at the origin of an entity
EXAMPLE: attractor = Missile_CreateAttractorEnt( enemy_chopper, 10000, 6000 )
void Missile_CreateAttractorOrigin(<origin>,<strength>,<affectDist>,<affectAllProjectiles>,<alert range>)
- [MANDATORY] <origin> The center of the attractor
- [MANDATORY] <strength> The strength of the attractor (maximum acceleration it can apply to a missile)
- [MANDATORY] <affectDist> The effective distance at which the missile can be affected. The effect of the attractor falls off from <strength> to zero from the center to this distance away from the center.
- [OPTIONAL] <affectAllProjectiles> If set it will affect all projectiles inculding grenades and guided missiles.
- [OPTIONAL] <alert range> If set it send notify when missile breaches range(but will not repulse).
CATEGORY: Weapon
CLIENT/SERVER: Server
SUMMARY: Creates a missile attractor at the given location
EXAMPLE: attractor = Missile_CreateAttractorOrigin( (100, 350, 10), 10000, 6000 )
void Missile_CreateRepulsorEnt(<entity>,<strength>,<affectDist>,[affectAllProjectiles],[alert range])
- [MANDATORY] <entity> The entity that is to be a repulsor
- [MANDATORY] <strength> The strength of the repulsor (maximum acceleration it can apply to a missile)
- [MANDATORY] <affectDist> The effective distance at which the missile can be affected. The effect of the attractor falls off from <strength> to zero from the center to this distance away from the center.
- [OPTIONAL] [affectAllProjectiles] If set it will affect all projectiles inculding grenades and guided missiles.
- [OPTIONAL] [alert range] If set it send notify when missile breaches range(but will not repulse).
CATEGORY: Weapon
CLIENT/SERVER: Server
SUMMARY: Creates a missile repulsor at the origin of an entity
EXAMPLE: repulsor = Missile_CreateRepulsorEnt( enemy_chopper, 10000, 6000 )
void Missile_CreateRepulsorOrigin(<origin>,<strength>,<affectDist>,[affectAllProjectiles],[alert range])
- [MANDATORY] <origin> The center of the Repulsor
- [MANDATORY] <strength> The strength of the Repulsor (maximum acceleration it can apply to a missile)
- [MANDATORY] <affectDist> The effective distance at which the missile can be affected. The effect of the attractor falls off from <strength> to zero from the center to this distance away from the center.
- [OPTIONAL] [affectAllProjectiles] If set it will affect all projectiles inculding grenades and guided missiles.
- [OPTIONAL] [alert range] If set it send notify when missile breaches range(but will not repulse).
CATEGORY: Weapon
CLIENT/SERVER: Server
SUMMARY: Creates a missile Repulsor at the given location
EXAMPLE: repulsor = Missile_CreateRepulsorOrigin( (100, 350, 10), 10000, 6000 )
void Missile_DeleteAttractor(<attractor>)
- [MANDATORY] <attractor> The attractor or repulsor
CATEGORY: Weapon
CLIENT/SERVER: Server
SUMMARY: Deletes a missile attractor or repulsor
EXAMPLE: Missile_DeleteAttractor( attractor )