Call of Duty: Black Ops III – Mod Tools Guide

Script API Functions for Call of Duty: Black Ops III – Mod Tools

Script API Functions

Overview

Script API FunctionsThis is in your Game directory but people google for things :^)

warning

warning: can’t match cpp function (for GetCycleOriginOffset) in project; skipping

a – 1

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&gt

    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&gt

    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&gt

    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()

      a – 2

      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 )

        a – 3

        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&gt

                  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&gt

                  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 )

                  b – 1

                  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 )

                  b – 2

                  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 )

                  c – 1

                  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>)
                    • [MANDATORY] <id> int

                    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()

                                      c – 2

                                      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)

                                          c – 3

                                          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

                                                                d – 1

                                                                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()

                                                                                          d – 2

                                                                                          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 )

                                                                                                e – 1

                                                                                                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 )

                                                                                                              e – 2

                                                                                                              void <vehicle> EnableVehicleSounds()

                                                                                                                CATEGORY:
                                                                                                                CLIENT/SERVER: Client
                                                                                                                SUMMARY: Enables all sounds from a vehicle

                                                                                                                EXAMPLE:

                                                                                                                self EnableVehicleSounds()
                                                                                                                void <player> EndCamAnimScripted(<player>)
                                                                                                                • [MANDATORY] <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 )

                                                                                                                  f – 1

                                                                                                                  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” )

                                                                                                                            f – 2

                                                                                                                            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 )
                                                                                                                                  FXBlockSight( fxent, 128 )

                                                                                                                                  v – 1

                                                                                                                                  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 )
                                                                                                                                  SteamSolo.com