Game Script Methods (BO2): Difference between revisions
Aerosoul94 (talk | contribs) Hmmm.... |
No edit summary |
||
| (29 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:BO2]] | |||
== Player Methods == | == Player Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%" | Description | |||
|- | |- | ||
| giveweapon | | void giveweapon( string weapon, int altModelIndex, int weaponOptions )<br/>void giveweapon( string weapon, int altModelIndex )<br/>void giveweapon( string weapon ) | ||
| {{ScriptUsage | |||
| | |Summary=Gives a weapon to the specified client with an optional argument for camo and attachments. A full list containing all the weapon names can be found here http://pastebin.com/wEq07Yzw | ||
|Example=<pre>player giveweapon("mp7_mp", 255, 0);</pre> | |||
}} | |||
|- | |||
| void updateweaponoptions( string weapon, int weaponOptions ) | |||
| {{ScriptUsage | |||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setblockweaponpickup( string weapon, int blockWeaponPickup ) | |||
| void | | {{ScriptUsage | ||
| | |Summary= | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| | | int calcweaponoptions( int camo, int lens, int reticle, int tag, int emblem )<br/>int calcweaponoptions( int camo, int lens, int reticle, int tag )<br/>int calcweaponoptions( int camo, int lens, int reticle )<br/>int calcweaponoptions( int slotIndex, int weaponType ) | ||
| {{ScriptUsage | |||
| | |Summary= | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int calcplayeroptions( int ) | | int calcplayeroptions( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayerrenderoptions( int ) | | void setplayerrenderoptions( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void nextplayerrenderoption( string ) | | void nextplayerrenderoption( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void bbclasschoice( int, string, string ) | | void bbclasschoice( int, string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethighlighted() | | void sethighlighted() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void takeweapon( string ) | | void takeweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Removes the first occurrence of the specified weapon from a client. | |||
|Example=<pre>player takeweapon("mp7_mp");</pre> | |||
}} | |||
|- | |- | ||
| bool isthrowinggrenade() | | bool isthrowinggrenade() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is throwing a grenade. | |||
|Example=<pre>if (player isthrowinggrenade())</pre> | |||
}} | |||
|- | |- | ||
| void forcegrenadethrow() | | void forcegrenadethrow() | ||
| | | {{ScriptUsage | ||
|Summary=Forces the specified client to throw a grenade. | |||
|Example=<pre>player forcegrenadethrow();</pre> | |||
}} | |||
|- | |- | ||
| bool isfiring() | | bool isfiring() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is shooting. | |||
|Example=<pre>if (player isfiring())</pre> | |||
}} | |||
|- | |- | ||
| bool ismeleeing() | | bool ismeleeing() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is meleeing. | |||
|Example=<pre>if (player ismeleeing())</pre> | |||
}} | |||
|- | |- | ||
| bool isswitchingweapons() | | bool isswitchingweapons() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is switching weapons. | |||
|Example=<pre>if (player isswitchingweapons())</pre> | |||
}} | |||
|- | |- | ||
| bool isreloading() | | bool isreloading() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is reloading. | |||
|Example=<pre>if (player isreloading())</pre> | |||
}} | |||
|- | |- | ||
| void takeallweapons() | | void takeallweapons() | ||
| | | {{ScriptUsage | ||
|Summary=Removes all weapons from the specified client including the default melee knife. | |||
|Example=<pre>player takeallweapons();</pre> | |||
}} | |||
|- | |- | ||
| bool isinmovemode() | | bool isinmovemode() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getcurrentweapon() | | string getcurrentweapon() | ||
| | | {{ScriptUsage | ||
|Summary=Returns the specified clients currently held weapon. | |||
|Example=<pre>currentWeapon = player getcurrentweapon();</pre> | |||
}} | |||
|- | |- | ||
| float getcurrentweaponspinlerp() | | float getcurrentweaponspinlerp() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcurrentweaponspinlerp( float ) | | void setcurrentweaponspinlerp( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getcurrentweaponaltweapon() | | string getcurrentweaponaltweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isweaponoverheating( int ) | | int isweaponoverheating( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the specified client's slot index is overheating. | |||
|Example=<pre>if (player isweaponoverheating(0))</pre> | |||
}} | |||
|- | |- | ||
| void setweaponoverheating( int, float ) | | void setweaponoverheating( int, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the specified clients slot index overheat to a percentage. | |||
|Example=<pre>player setweaponoverheating(0, 99);</pre> | |||
}} | |||
|- | |- | ||
| string getcurrentoffhand() | | string getcurrentoffhand() | ||
| | | {{ScriptUsage | ||
|Summary=Returns the current lethal/tactical or equipment. | |||
|Example=<pre>offhandWeapon = player getcurrentoffhand();</pre> | |||
}} | |||
|- | |- | ||
| bool isusingoffhand() | | bool isusingoffhand() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client is using their offhand weapon. | |||
|Example=<pre>if (player isusingoffhand())</pre> | |||
}} | |||
|- | |- | ||
| void forceoffhandend() | | void forceoffhandend() | ||
| | | {{ScriptUsage | ||
|Summary=Forces the specified client to use their offhand weapon. | |||
|Example=<pre>player forceoffhandend()</pre> | |||
}} | |||
|- | |- | ||
| bool hasweapon( string ) | | bool hasweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the specified client has the specified weapon. | |||
|Example=<pre>if (player hasweapon("mp7_mp"))</pre> | |||
}} | |||
|- | |- | ||
| void switchtoweapon() | | void switchtoweapon() | ||
| | | {{ScriptUsage | ||
| | |Summary=Forces the specified weapon to switch to the specified weapon. | ||
| | |Example=<pre>player switchtoweapon("mp7_mp");</pre> | ||
}} | |||
|- | |||
| void switchtoweaponimmediate() | | void switchtoweaponimmediate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool switchtooffhand( string ) | | bool switchtooffhand( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Switch the player's offhand weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponplayejectbrass() | | void weaponplayejectbrass() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getlockonradius() | | int getlockonradius() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getlockonspeed() | | int getlockonspeed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void givestartammo( string ) | | void givestartammo( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the specified clients' specified weapon to the starting ammunition amount. | |||
|Example=<pre>player givestartammo("mp7_mp");</pre> | |||
}} | |||
|- | |- | ||
| void givemaxammo( string ) | | void givemaxammo( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Gives the specified clients' specified weapon maximum ammunition. | |||
|Example=<pre>player givemaxammo("mp7_mp");</pre> | |||
}} | |||
|- | |- | ||
| float getfractionstartammo( string ) | | float getfractionstartammo( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns a float of the specified weapons starting ammunition. | |||
|Example=<pre>fractionStartAmmo = player getfractionstartammo("mp7_mp");</pre> | |||
}} | |||
|- | |- | ||
| float getfractionmaxammo( string ) | | float getfractionmaxammo( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns a float of the specified weapons maximum ammunition. | |||
|Example=<pre>fractionMaxAmmo = player getfractionmaxammo("mp7_mp");</pre> | |||
}} | |||
|- | |- | ||
| void setweaponheatpercent( string, float ) | | void setweaponheatpercent( string, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setorigin( vector ) | | void setorigin( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Teleports the player to a location defined by x, y and z coordinate values. | |||
|Example=<pre>player setorigin((900, -78, 2055.1));</pre> | |||
}} | |||
|- | |- | ||
| void setvelocity( vector ) | | void setvelocity( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the player's velocity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayerangles( vector ) | | void setplayerangles( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Changes the player's view direction via x and y coordinate values. | |||
|Example=<pre>player setplayerangles(anotherplayer.angles);</pre> | |||
}} | |||
|- | |- | ||
| vector getplayerangles() | | vector getplayerangles() | ||
| | | {{ScriptUsage | ||
|Summary=Get the player's angles | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getgunangles() | | vector getgunangles() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getplayercamerapos() | | vector getplayercamerapos() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cameraactivate( int ) | | void cameraactivate( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void camerasetposition( vector, vector ) | | void camerasetposition( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void camerasetlookat( entity, vector ) | | void camerasetlookat( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gamepadusedlast() | | void gamepadusedlast() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int usebuttonpressed() | | int usebuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the use button is pressed otherwise 0. | |||
|Example=<pre>if (player usebuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int changeseatbuttonpressed() | | int changeseatbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int attackbuttonpressed() | | int attackbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the shooting button is pressed otherwise 0. | |||
|Example=<pre>if (player attackbuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int actionslotonebuttonpressed() | | int actionslotonebuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int actionslottwobuttonpressed() | | int actionslottwobuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int actionslotthreebuttonpressed() | | int actionslotthreebuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=1 if the left inventory button is pressed otherwise 0. | |||
|Example=<pre>if (player actionslotthreebuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int actionslotfourbuttonpressed() | | int actionslotfourbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int adsbuttonpressed() | | int adsbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the aiming down the sights button is pressed otherwise 0. | |||
|Example=<pre>if (player adsbuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int throwbuttonpressed() | | int throwbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int meleebuttonpressed() | | int meleebuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the melee button is pressed otherwise 0. | |||
|Example=<pre>if (player meleebuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int jumpbuttonpressed() | | int jumpbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the jumping button is pressed otherwise 0. | |||
|Example=<pre>if (player jumpbuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int stancebuttonpressed() | | int stancebuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int fragbuttonpressed() | | int fragbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the lethal grenade button is pressed otherwise 0. | |||
|Example=<pre>if (player fragbuttonpressed())</pre> | |||
}} | |||
|- | |- | ||
| int secondaryoffhandbuttonpressed() | | int secondaryoffhandbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int inventorybuttonpressed() | | int inventorybuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int sprintbuttonpressed() | | int sprintbuttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sprintuprequired() | | void sprintuprequired() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float playerads() | | float playerads() | ||
| | | {{ScriptUsage | ||
|Summary=Return the player's weapon position fraction. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pingplayer() | | void pingplayer() | ||
| | | {{ScriptUsage | ||
|Summary=Flashes a player on their teammate's compasses | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setviewmodel( string ) | | void setviewmodel( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the player's current view model. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getviewmodel() | | conststring getviewmodel() | ||
| | | {{ScriptUsage | ||
|Summary=Get the viewmodel name for the given player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setoffhandsecondaryclass( string ) | | void setoffhandsecondaryclass( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set whether player can use smoke grenades or flashbangs. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getoffhandsecondaryclass() | | conststring getoffhandsecondaryclass() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the name (either "smoke" or "flash") that toggle is set to. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string setoffhandprimaryclass( string ) | | string setoffhandprimaryclass( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationselection() | | void beginlocationselection() | ||
| | | {{ScriptUsage | ||
|Summary=Causes the player to begin selecting a location. A map HUD element should be visible for them to see where they're selecting. Works with endlocationselection(). When the user confirms or cancels, they will recieve a notify "confirm_location" or "cancel_location". The former notify contains the location they selected, as a vector. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationairstrikeselection() | | void beginlocationairstrikeselection() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationmortarselection() | | void beginlocationmortarselection() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationartilleryselection() | | void beginlocationartilleryselection() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationcomlinkselection() | | void beginlocationcomlinkselection() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void beginlocationnapalmselection() | | void beginlocationnapalmselection() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void endlocationselection() | | void endlocationselection() | ||
| | | {{ScriptUsage | ||
|Summary=Causes the player to leave location selection mode. Works with beginlocationselection(). | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clientsyssetstate( int, string ) | | void clientsyssetstate( int, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponlockstart( entity ) | | void weaponlockstart( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Begins player's weapon lockon sequence (hud effects, etc). Will clear any existing hard lock. Use WeaponLockFinalize() to complete lock. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponlockfinalize( entity ) | | void weaponlockfinalize( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Locks player's weapon onto an entity. Implies WeaponLockStart(), so this may be called to jump to a hard lock. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponlockfree() | | void weaponlockfree() | ||
| | | {{ScriptUsage | ||
|Summary=Clears player's weapon lock. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponlocktargettooclose( int ) | | void weaponlocktargettooclose( int ) | ||
| | | {{ScriptUsage | ||
|Summary=When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that they are too close. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void weaponlocknoclearance( int ) | | void weaponlocknoclearance( int ) | ||
| | | {{ScriptUsage | ||
|Summary=When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that there is an obstruction. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void buttonpressed() | | void buttonpressed() | ||
| | | {{ScriptUsage | ||
|Summary=Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void giveweaponnextattachment() | | void giveweaponnextattachment() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void givenextbaseweapon() | | void givenextbaseweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getnormalizedmovement() | | void getnormalizedmovement() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getnormalizedcameramovement() | | void getnormalizedcameramovement() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sayall() | | void sayall() | ||
| | | {{ScriptUsage | ||
|Summary=Write a client chat message from this client to everybody | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sayteam() | | void sayteam() | ||
| | | {{ScriptUsage | ||
|Summary=Write a client chat message from this client to everybody on their team | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspawnweapon( string ) | | void setspawnweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the weapon that this player will spawn with | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void initialweaponraise( string ) | | void initialweaponraise( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void seteverhadweaponall( int ) | | void seteverhadweaponall( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dropitem( string, constlowercasestring ) | | void dropitem( string, constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary=Drop an item with the given item name | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dropscavengeritem( string ) | | void dropscavengeritem( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int hasagrenadepulledback() | | int hasagrenadepulledback() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool finishplayerdamage( entity, entity, int, string, vector, vector, conststring, int, int ) | | bool finishplayerdamage( entity, entity, int, string, vector, vector, conststring, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Does damage to a player - usually as part of the damage callback | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void finishmeleehit( entity, string, vector, vector, int, int, int ) | | void finishmeleehit( entity, string, vector, vector, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void reviveplayer() | | void reviveplayer() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void undolaststand() | | void undolaststand() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void suicide() | | void suicide() | ||
| | | {{ScriptUsage | ||
|Summary=Kills the specified player. | |||
|Example=<pre>player suicide();</pre> | |||
}} | |||
|- | |- | ||
| void turnedhuman() | | void turnedhuman() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isinvehicle() | | bool isinvehicle() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isremotecontrolling() | | bool isremotecontrolling() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isweaponviewonlylinked() | | bool isweaponviewonlylinked() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowstand( int ) | | int allowstand( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can stand up | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowcrouch( int ) | | int allowcrouch( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can crouch | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowprone( int ) | | int allowprone( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can go prone | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowlean( int ) | | int allowlean( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can lean | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getvehicleoccupied() | | entity getvehicleoccupied() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getfriendlies( int ) | | array getfriendlies( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getenemies( int ) | | array getenemies( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int openmenu( string ) | | int openmenu( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Open a menu for this player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int openmenunomouse( string ) | | int openmenunomouse( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Open a menu for this player, with no mouse control. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void closemenu() | | void closemenu() | ||
| | | {{ScriptUsage | ||
|Summary=Close the current player menu | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void closeingamemenu() | | void closeingamemenu() | ||
| | | {{ScriptUsage | ||
|Summary=close the in game menu for this client. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void freezecontrols( int ) | | void freezecontrols( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Freezes/unfreezes the controls of the specified player | |||
|Example=<pre>player freezecontrols(1);</pre> | |||
}} | |||
|- | |- | ||
| void freezecontrolsallowlook( int ) | | void freezecontrolsallowlook( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int arecontrolsfrozen() | | int arecontrolsfrozen() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableusability() | | void disableusability() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enableusability() | | void enableusability() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableweapons() | | void disableweapons() | ||
| | | {{ScriptUsage | ||
|Summary=Disable the player's weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enableweapons() | | void enableweapons() | ||
| | | {{ScriptUsage | ||
|Summary=Enable the player's weapons | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disabledeathstreak() | | void disabledeathstreak() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enabledeathstreak() | | void enabledeathstreak() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int deathstreakactive() | | int deathstreakactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableoffhandweapons() | | void disableoffhandweapons() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enableoffhandweapons() | | void enableoffhandweapons() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableweaponcycling() | | void disableweaponcycling() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enableweaponcycling() | | void enableweaponcycling() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void revive() | | void revive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlaststandprevweap( string ) | | void setlaststandprevweap( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setreverb() | | void setreverb() | ||
| | | {{ScriptUsage | ||
|Summary=Set the sound reverberation for the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void deactivatereverb() | | void deactivatereverb() | ||
| | | {{ScriptUsage | ||
|Summary=deactivate the sound reverberation for the player on the given priority level | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setchannelvolumes() | | void setchannelvolumes() | ||
| | | {{ScriptUsage | ||
|Summary=Set the channel volumes for the player (a way of fading volumes by type) | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void deactivatechannelvolumes() | | void deactivatechannelvolumes() | ||
| | | {{ScriptUsage | ||
|Summary=deactivate the channel volumes for the player on the given priority level | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int setweaponammoclip( string, int ) | | int setweaponammoclip( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the weapon clip ammunition for the given weapon. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setweaponammostock( string, int ) | | void setweaponammostock( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the ammunition stockpile for the given weapon. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getweaponammoclip( string ) | | int getweaponammoclip( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Gets the amount of ammo left in the player's current weapon clip. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getweaponammostock( string ) | | int getweaponammostock( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Gets the ammunition stockpile for the given weapon. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int anyammoforweaponmodes( string ) | | int anyammoforweaponmodes( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the player has any ammo available for the weapon or any of it's alt-modes (grenade launcher, etc). | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void iprintln() | | void iprintln() | ||
| | | {{ScriptUsage | ||
|Summary=Prints text for the specified player only in the killfeed. | |||
|Example=<pre>player iprintln("Hello, World!");</pre> | |||
}} | |||
|- | |- | ||
| void iprintlnbold() | | void iprintlnbold() | ||
| | | {{ScriptUsage | ||
|Summary=Prints text for the specified player only in the middle of the screen. If the player entity is omitted, the text will be printed for every player in the lobby. | |||
|Example=<pre>player iprintlnBold("Hello, World!");</pre> | |||
}} | |||
|- | |- | ||
| void spawn( vector, vector ) | | void spawn( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Spawns a new entity and returns a reference to the entity. | |||
|Example=<pre>ufo = spawn("script_model", self.origin);</pre> | |||
}} | |||
|- | |- | ||
| void setentertime( int ) | | void setentertime( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cloneplayer( int ) | | void cloneplayer( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Creates a clone of the specified player at current position. | |||
|Example=<pre>player cloneplayer();</pre> | |||
}} | |||
|- | |- | ||
| setclientfov | | void setclientfov( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the field of view for a player. | |||
|Example=<pre>player setclientfov("90");</pre> | |||
}} | |||
|- | |- | ||
| void setclientthirdperson( int ) | | void setclientthirdperson( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Enables/disables 3rd person view for the specified player | |||
|Example=<pre>player setclientthirdperson(1);</pre> | |||
}} | |||
|- | |- | ||
| void setclientthirdpersonangle() | | void setclientthirdpersonangle() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientcompass() | | void setclientcompass() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientscriptmainmenu() | | void setclientscriptmainmenu() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientcgobjectivetext() | | void setclientcgobjectivetext() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientplayersprinttime() | | void setclientplayersprinttime() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientnumlives() | | void setclientnumlives() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientdrawtalk() | | void setclientdrawtalk() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientammocounterhide() | | void setclientammocounterhide() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientminiscoreboardhide() | | void setclientminiscoreboardhide() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclienthudhardcore() | | void setclienthudhardcore() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientplayerpushamount() | | void setclientplayerpushamount() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientaimlockonpitchstrength() | | void setclientaimlockonpitchstrength() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientuivisibilityflag( string, int ) | | void setclientuivisibilityflag( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientprofilevar( string, string ) | | void setclientprofilevar( string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playclientairstrike( vector, int, string, string, int, string, int ) | | void playclientairstrike( vector, int, string, string, int, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playclientnapalm( vector, int, string, string, int, string, int ) | | void playclientnapalm( vector, int, string, string, int, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcurrentspectatorclient( entity ) | | void setcurrentspectatorclient( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void relinktoturret( entity ) | | void relinktoturret( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void carryturret( entity, vector, vector ) | | void carryturret( entity, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopcarryturret( entity, vector, vector ) | | void stopcarryturret( entity, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool iscarryingturret() | | bool iscarryingturret() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array canplayerplaceturret( entity ) | | array canplayerplaceturret( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplacementhint( int ) | | void setplacementhint( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void linkguidedmissilecamera() | | void linkguidedmissilecamera() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void unlinkguidedmissilecamera() | | void unlinkguidedmissilecamera() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gpsjammeractive() | | void gpsjammeractive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gpsjammerinactive() | | void gpsjammerinactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void spawnprotectionactive() | | void spawnprotectionactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void spawnprotectioninactive() | | void spawnprotectioninactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dualgrenadesactive() | | void dualgrenadesactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dualgrenadesinactive() | | void dualgrenadesinactive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void linktomissile( entity, int ) | | void linktomissile( entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void unlinkfrommissile() | | void unlinkfrommissile() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array canplaceriotshield( conststring ) | | array canplaceriotshield( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setheldweaponmodel( int ) | | void setheldweaponmodel( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setriotshieldfailhint() | | void setriotshieldfailhint() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array canplayerplacevehicle( float, float, float, float, float, float ) | | array canplayerplacevehicle( float, float, float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void remotecontrolturret( entity ) | | void remotecontrolturret( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void remotecontrolturretoff( entity ) | | void remotecontrolturretoff( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordkillstreakevent( int ) | | void recordkillstreakevent( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordkillstreakendevent( int ) | | void recordkillstreakendevent( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordgameevent( string ) | | void recordgameevent( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordkillmodifier( string ) | | void recordkillmodifier( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordmedal( string ) | | void recordmedal( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordloadoutandperks() | | void recordloadoutandperks() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordloadoutperksandkillstreaks( string, string, string, string, int, int, int ) | | void recordloadoutperksandkillstreaks( string, string, string, string, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordmultikill( int ) | | void recordmultikill( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void incrementlifestat() | | void incrementlifestat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void incrementplayerstat( string, int ) | | void incrementplayerstat( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordplayerdeathzombies() | | void recordplayerdeathzombies() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordplayerdownzombies( string ) | | void recordplayerdownzombies( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordplayerrevivezombies( entity ) | | void recordplayerrevivezombies( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordzombiezone( string, string ) | | void recordzombiezone( string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int islookingat( entity ) | | int islookingat( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the entity is the same as the player's lookat entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playlocalsound( string ) | | void playlocalsound( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Plays a sound locally to the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoplocalsound( string ) | | void stoplocalsound( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Stops all instances of a local soundalias running on a player. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int istalking() | | int istalking() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the player is talking via voice chat | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowspectateteam( team, int ) | | void allowspectateteam( team, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set whether the player can spectate the given team. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getguid() | | int getguid() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getxuid() | | string getxuid() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int ishost() | | int ishost() | ||
| | | {{ScriptUsage | ||
|Summary=Returns 1 if the specified player is host, otherwise 0. | |||
|Example=<pre>if (player isHost())</pre> | |||
}} | |||
|- | |- | ||
| int islocaltohost() | | int islocaltohost() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowads( int ) | | int allowads( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can switch to ADS | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowjump( int ) | | int allowjump( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can jump | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowsprint( int ) | | int allowsprint( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can sprint | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int allowmelee( int ) | | int allowmelee( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether the player can melee | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int forceslick( int ) | | int forceslick( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setsprintduration( float ) | | void setsprintduration( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setsprintcooldown( float ) | | void setsprintcooldown( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspreadoverride( int ) | | void setspreadoverride( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the player fixed spread value | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resetspreadoverride() | | void resetspreadoverride() | ||
| | | {{ScriptUsage | ||
|Summary=Resets the player spread value to the ones of the weapon in use. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setactionslot( int, string, string ) | | void setactionslot( int, string, string ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the option to perform when the player executes (for example) "+actionslot 1". | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getinventoryweapon() | | string getinventoryweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setinventoryweapon( string ) | | void setinventoryweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getweaponslist( int ) | | array getweaponslist( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Gets an array of all weapons that the player has. Includes any alt-mode weapons (ex: m203_m4) | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getweaponslistprimaries() | | array getweaponslistprimaries() | ||
| | | {{ScriptUsage | ||
|Summary=Gets an array of all primary weapons that the player has. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startrevive() | | void startrevive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoprevive() | | void stoprevive() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void applyknockback( int, vector ) | | void applyknockback( int, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setperk( string ) | | void setperk( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Gives the player the specified perk | |||
|Example=<pre>player setperk("specialty_fastladderclimb");</pre> | |||
}} | |||
|- | |- | ||
| bool hasperk( string ) | | bool hasperk( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the player has the specified perk otherwise false | |||
|Example=<pre>if (player hasperk("specialty_fastladderclimb"))</pre> | |||
}}<br/> | |||
|- | |- | ||
| array getperks() | | array getperks() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearperks() | | void clearperks() | ||
| | | {{ScriptUsage | ||
|Summary=Removes all perks from the player | |||
|Example=<pre>player clearperks();</pre> | |||
}} | |||
|- | |- | ||
| void unsetperk( string ) | | void unsetperk( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Removes a specific perk from the player | |||
|Example=<pre>player unsetperk("specialty_fastladderclimb");</pre> | |||
}} | |||
|- | |- | ||
| void setrank( int, int ) | | void setrank( int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the player's rank and prestige level | |||
|Example=<pre>player setRank(level.maxRank, level.maxPrestige);</pre> | |||
}} | |||
|- | |- | ||
| void enableinvulnerability() | | void enableinvulnerability() | ||
| | | {{ScriptUsage | ||
|Summary=Enables god mode/invincibility for the specific player | |||
|Example=<pre>player enableinvulnerability();</pre> | |||
}} | |||
|- | |- | ||
| void disableinvulnerability() | | void disableinvulnerability() | ||
| | | {{ScriptUsage | ||
|Summary=Disables god mode/invincibility for the specific player | |||
|Example=<pre>player disableinvulnerability();</pre> | |||
}} | |||
|- | |- | ||
| void enableafterlife() | | void enableafterlife() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableafterlife() | | void disableafterlife() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool addgoal( vector, float, int, conststring, conststring ) | | bool addgoal( vector, float, int, conststring, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cancelgoal( conststring ) | | void cancelgoal( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool atgoal( conststring ) | | bool atgoal( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool hasgoal( conststring ) | | bool hasgoal( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getgoal( conststring ) | | vector getgoal( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pressusebutton( float ) | | void pressusebutton( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pressattackbutton( int ) | | void pressattackbutton( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pressdtpbutton() | | void pressdtpbutton() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool throwgrenade( string, vector ) | | bool throwgrenade( string, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getlookaheaddist() | | float getlookaheaddist() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getlookaheaddir() | | vector getlookaheaddir() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void lookat( vector ) | | void lookat( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearlookat() | | void clearlookat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowattack( int ) | | void allowattack( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pressads( int ) | | void pressads( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pressmelee() | | void pressmelee() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getthreats( float ) | | array getthreats( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector predictposition( entity, int ) | | vector predictposition( entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool botsighttracepassed( entity, vector ) | | bool botsighttracepassed( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botsetfailsa( pathnode ) | | void botsetfailsa( pathnode ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botsetdefaultclass( int, string ) | | void botsetdefaultclass( int, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botclassadditem( int, string ) | | void botclassadditem( int, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botclasssetweaponoption( int, int, string, int ) | | void botclasssetweaponoption( int, int, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botclassaddattachment( int, string, string, string ) | | void botclassaddattachment( int, string, string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void botleavegame() | | void botleavegame() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int issplitscreen() | | int issplitscreen() | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the game is a splitscreen game | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isplayeronsamemachine( entity ) | | int isplayeronsamemachine( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerknockback( int ) | | void playerknockback( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getplayerviewheight() | | float getplayerviewheight() | ||
| | | {{ScriptUsage | ||
|Summary=Get the player's view height | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void ishostforbots() | | void ishostforbots() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void murderline( vector, vector, string ) | | void murderline( vector, vector, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setoffhandvisible( int ) | | void setoffhandvisible( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void fakedamagefrom( vector ) | | void fakedamagefrom( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getsnapshotackindex() | | int getsnapshotackindex() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getleagueteamid() | | string getleagueteamid() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
| Line 1,109: | Line 1,661: | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%" | Description | |||
|- | |- | ||
| void moveto( vector ) | | void moveto( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Move this entity to the given point. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void movex( float ) | |||
| void movex() | | {{ScriptUsage | ||
| | |Summary=Move this entity to the given world x value | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void movey( float ) | |||
| void movey() | | {{ScriptUsage | ||
| | |Summary=move this entity to the given world y value | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void movez( float ) | |||
| void movez() | | {{ScriptUsage | ||
| | |Summary=Move this entity to the given world z value | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void movegravity( vector, float ) | | void movegravity( vector, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Fling this entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void moveslide( vector, float, vector ) | | void moveslide( vector, float, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopmoveslide() | | void stopmoveslide() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void rotateto( vector ) | | void rotateto( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Rotate this entity to the given world rotation value | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void rotatepitch( float ) | |||
| void rotatepitch() | | {{ScriptUsage | ||
| | |Summary=Rotate this entity to the given pitch | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void rotateyaw( float ) | |||
| void rotateyaw() | | {{ScriptUsage | ||
| | |Summary=Rotate this entity to the given yaw | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void rotateroll( float ) | |||
| void rotateroll() | | {{ScriptUsage | ||
| | |Summary=Rotate this entity to the given roll angle | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void devaddpitch( float ) | |||
| void devaddpitch() | | {{ScriptUsage | ||
| | |Summary=Add pitch in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void devaddyaw( float ) | |||
| void devaddyaw() | | {{ScriptUsage | ||
| | |Summary=Add yaw in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void devaddroll( float ) | |||
| void devaddroll() | | {{ScriptUsage | ||
| | |Summary=Add yaw in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void vibrate( vector, float, float, float ) | | void vibrate( vector, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Causes a script entity to vibrate, rotating around its origin, along a given vector dir | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void rotatevelocity( vector ) | | void rotatevelocity( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Rotate this entity at a particular velocity for a given time | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void solid() | | void solid() | ||
| | | {{ScriptUsage | ||
|Summary=Set the solid flag, so that this object is collidable. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void notsolid() | | void notsolid() | ||
| | | {{ScriptUsage | ||
|Summary=Unsets the solid flag, so that this object is no longer collidable. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcandamage( int ) | | void setcandamage( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the candamage flag for this entity - this means that it can respond to notifies from bullets and grenade hits | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void physicslaunch( vector, vector ) | | void physicslaunch( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Permanently turn this entity into a physics object with an intial force vector at the specified point. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcheapflag( int ) | | void setcheapflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void ignorecheapentityflag( int ) | | void ignorecheapentityflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
== Script Vehicle Methods == | == Script Vehicle Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| void attachpath( entityref ) | |||
| void attachpath() | | {{ScriptUsage | ||
| | |Summary=Attaches this vehicle to the given path. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string vehgetmodel() | | string vehgetmodel() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| getattachpos | | array getattachpos( entityref ) | ||
| array | | {{ScriptUsage | ||
| | |Summary=Returns the origin and angles if the vehicle were to be attached to the path. The origin and angles are returned as a vector array of size 2. Origin is 1st and angles is 2nd. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startpath() | | void startpath() | ||
| | | {{ScriptUsage | ||
|Summary=Starts the vehicle following this path. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entitynum drivepath( int ) | | entitynum drivepath( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathmove( vector, vector, vector ) | | void pathmove( vector, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathmoveclear() | | void pathmoveclear() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathfixedoffset( vector ) | | void pathfixedoffset( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathfixedoffsetclear() | | void pathfixedoffsetclear() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathvariableoffset( vector, float ) | | void pathvariableoffset( vector, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pathvariableoffsetclear() | | void pathvariableoffsetclear() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getpathfixedoffset() | | vector getpathfixedoffset() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getpathvariableoffset() | | vector getpathvariableoffset() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdrivepathphysicsscale( float ) | | void setdrivepathphysicsscale( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setswitchnode( entityref, entityref ) | |||
| void setswitchnode() | | {{ScriptUsage | ||
| | |Summary=Sets a switch node for this vehicle. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspeed( float, float, float ) | |||
| void setspeed() | | {{ScriptUsage | ||
| | |Summary=Sets the speed and acceleration for this vehicle. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspeedimmediate( float, float, float ) | |||
| void setspeedimmediate() | | {{ScriptUsage | ||
| | |Summary=Sets the speed and acceleration for this vehicle instantaneously. Direction will be toward the goal direction if there is a goal, otherwise the current direction. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getspeed() | | float getspeed() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current speed in inches per second. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getspeedmph() | | float getspeedmph() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getgoalspeedmph() | | float getgoalspeedmph() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the goal speed in miles per hour. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setbrake( float ) | | void setbrake( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getbrake() | | float getbrake() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float gethandbrake() | | float gethandbrake() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getscriptbrake() | | float getscriptbrake() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setacceleration( float ) | | void setacceleration( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the acceleration for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdeceleration( float ) | | void setdeceleration( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the deceleration for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resumespeed( float ) | | void resumespeed( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the vehicle to resume its path speed. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setyawspeed( float, float, float, float ) | | void setyawspeed( float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the yaw speed for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmaxpitchroll( float, float ) | | void setmaxpitchroll( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets max pitch and roll angle for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturningability( float ) | | void setturningability( float ) | ||
| | | {{ScriptUsage | ||
|Summary=If this is higher, helicopters can make sharper turns to match goal positions better. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setjitterparams( vector, float, float ) | | void setjitterparams( vector, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the jitter parameters. Set everything to 0 to stop jittering. Vehicle ignores jitter parameters when on ground | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setairresistance( float ) | | void setairresistance( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the speed at which air resistance maxes out. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getsteering() | | float getsteering() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getthrottle() | | float getthrottle() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setphysangles( vector ) | | void setphysangles( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethoverparams( float, float, float ) | | void sethoverparams( float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the hovering parameters. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void joltbody( vector, float, float, float ) | | void joltbody( vector, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Jolts the vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void freevehicle() | | void freevehicle() | ||
| | | {{ScriptUsage | ||
|Summary=Frees this vehicle instance. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getwheelsurface( conststring ) | | string getwheelsurface( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns the surface type of the given wheel as a string. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getvehicleowner() | | entity getvehicleowner() | ||
| | | {{ScriptUsage | ||
|Summary=Returns the owner of this particular vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isvehicleusable() | | int isvehicleusable() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makevehicleusable() | | void makevehicleusable() | ||
| | | {{ScriptUsage | ||
|Summary=Sets this vehicle to be usable by the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makevehicleunusable() | | void makevehicleunusable() | ||
| | | {{ScriptUsage | ||
|Summary=Sets this vehicle to be not usable by the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void usevehicle( entity, int, int ) | | void usevehicle( entity, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setviewclamp( entity, float, float, float, float ) | | void setviewclamp( entity, float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resetviewclamp( entity, entity ) | | void resetviewclamp( entity, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehiclelookattext( conststring, constistring ) | | void setvehiclelookattext( conststring, constistring ) | ||
| | | {{ScriptUsage | ||
|Summary=Set look at text for vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setneargoalnotifydist( float ) | | void setneargoalnotifydist( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set distance near goal at which near_goal notification should be sent once. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool setvehgoalpos( vector, int, int, int ) | | bool setvehgoalpos( vector, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target position for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearvehgoalpos() | | void clearvehgoalpos() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplanegoalpos( float, vector ) | | void setplanegoalpos( float, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplanebarrelroll( int, float ) | | void setplanebarrelroll( int, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalyaw( float ) | | void setgoalyaw( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleargoalyaw() | | void cleargoalyaw() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the goal yaw direction for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settargetyaw( float ) | | void settargetyaw( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleartargetyaw() | | void cleartargetyaw() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the target yaw direction for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlookatent( entity ) | | void setlookatent( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the entity this vehicle will orient towards. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearlookatent() | | void clearlookatent() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the entity the vehicle is orienting towards. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void takeplayercontrol() | | void takeplayercontrol() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void returnplayercontrol() | | void returnplayercontrol() | ||
| | | {{ScriptUsage | ||
|Summary=After controlling a vehicle from script using something like setvehgoalpos(), if the vehicle is being driven by a player, you call this function to return control of the vehicle to the player. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturrettargetvec( vector ) | | void setturrettargetvec( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target position for this vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturrettargetent( entity, vector ) | | void setturrettargetent( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target entity for this vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearturrettarget() | | void clearturrettarget() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the target for the vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgunnertargetvec( vector, int ) | | void setgunnertargetvec( vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getgunnertargetvec( int ) | | vector getgunnertargetvec( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgunnertargetent( entity, vector, int ) | | void setgunnertargetent( entity, vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleargunnertarget( int ) | | void cleargunnertarget( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgunnerturretontargetrange( int, float ) | | void setgunnerturretontargetrange( int, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getgunnertargetent( int ) | | entity getgunnertargetent( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getgunneranimpitch( int ) | | float getgunneranimpitch( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getgunneranimyaw( int ) | | float getgunneranimyaw( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehweapon( string ) | | void setvehweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the vehicle's weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity fireweapon( entity, vector ) | | entity fireweapon( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Fire the vehicle's weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity firegunnerweapon( int, entity ) | | entity firegunnerweapon( int, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopfireweapon() | | void stopfireweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isturretready() | | int isturretready() | ||
| | | {{ScriptUsage | ||
|Summary=Query whether this vehicle's turret is ready for firing | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehmaxspeed( float ) | | void setvehmaxspeed( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getvehoccupants() | | array getvehoccupants() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getseatoccupant( int ) | | entity getseatoccupant( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getoccupantseat( entity ) | | int getoccupantseat( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setseatoccupied( int, int ) | | void setseatoccupied( int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string seatgetweapon( int ) | | string seatgetweapon( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getseatfiringorigin( int ) | | vector getseatfiringorigin( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getseatfiringangles( int ) | | vector getseatfiringangles( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isgunnerfiring( int ) | | bool isgunnerfiring( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disablegunnerfiring( int, int ) | | void disablegunnerfiring( int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity finishvehicledamage( entity, entity, int, string, vector, vector, conststring, int, int, int, conststring, int ) | | entity finishvehicledamage( entity, entity, int, string, vector, vector, conststring, int, int, int, conststring, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void finishvehicleradiusdamage( entity, entity, float, float, int, string, vector, float, float, vector, int ) | | void finishvehicleradiusdamage( entity, entity, float, float, int, string, vector, float, float, vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isvehicleimmunetodamage( int, string, string ) | | bool isvehicleimmunetodamage( int, string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdefaultpitch( float ) | | void setdefaultpitch( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleardefaultpitch() | | void cleardefaultpitch() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getangularvelocity() | | vector getangularvelocity() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setangularvelocity( vector ) | | void setangularvelocity( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehvelocity( vector ) | | void setvehvelocity( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cancelaimove() | | void cancelaimove() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehicletype( string ) | | void setvehicletype( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getphysacceleration() | | vector getphysacceleration() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setphysacceleration( vector ) | | void setphysacceleration( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void drawtrajectory() | | void drawtrajectory() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setrotorspeed( float ) | | void setrotorspeed( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getmaxspeed( int ) | | float getmaxspeed( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmantleena( int ) | | void setmantleena( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehicleavoidance( int, float, int ) | | void setvehicleavoidance( int, float, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getvehicleavoidance() | | int getvehicleavoidance() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool vehcansee( entity, int ) | | bool vehcansee( entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool vehseenrecently( entity, float ) | | bool vehseenrecently( entity, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void vehclearenemy() | | void vehclearenemy() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void vehs( entity, float ) | | void vehs( entity, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void vehclearentitytarget() | | void vehclearentitytarget() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getturretheatvalue( int ) | | float getturretheatvalue( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isvehicleturretoverheating( int ) | | bool isvehicleturretoverheating( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpathtransitiontime( float ) | | void setpathtransitiontime( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getvehicleavoidancenodes( float ) | | array getvehicleavoidancenodes( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makesentient() | | void makesentient() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
== Hud Element Methods == | == Hud Element Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| settext | | void settext( string text ) | ||
| | | {{ScriptUsage | ||
|Summary=Set HUD text for this element. | |||
|Example=<pre>hudelem settext( "Hello, World!" );</pre> | |||
}} | |||
|- | |- | ||
| void clearalltextafterhudelem() | | void clearalltextafterhudelem() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the config strings for the unique text set after this string. This is intended for development use only. | |||
|Example=<pre>hudelem clearalltextafterhudelem();</pre> | |||
}} | |||
|- | |- | ||
| void setshader( string shader, int width, int height ) | |||
| void setshader( string, int, int ) | | {{ScriptUsage | ||
| | |Summary=Set the material for this Hud Element | ||
|Example=<pre>hudelem setshader( "material", 15, 15 );</pre> | |||
}} | |||
|- | |- | ||
| void settargetent( entity, entity ) | | void settargetent( entity, entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the entity that this waypoint should target. In MP, entity should already be a broadcasting entity, as with Objective_OnEntity(). | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleartargetent() | | void cleartargetent() | ||
| | | {{ScriptUsage | ||
|Summary=Clear this waypoint from targetting an entity. | |||
|Example=<pre>hudelem cleartargetent();</pre> | |||
}} | |||
|- | |- | ||
| settimer | | void settimer( float time ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a timer HUD element to count down | |||
|Example=<pre>hudelem settimer( level.counter );</pre> | |||
}} | |||
|- | |- | ||
| settimerup | | void settimerup( float time ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a timer HUD element to count up | |||
|Example=<pre>hudelem settimerup( level.counter );</pre> | |||
}} | |||
|- | |- | ||
| settenthstimer | | void settenthstimer( float time ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a timer HUD element to count down in tenths of a second | |||
|Example=<pre>hudelem settenthstimer( camtime );</pre> | |||
}} | |||
|- | |- | ||
| void settenthstimerup( float ) | | void settenthstimerup( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a timer HUD element to count up in tenths of a second | |||
|Example=<pre>hudelem settenthstimerup( .1 );</pre> | |||
}} | |||
|- | |- | ||
| void setclock() | | void setclock() | ||
| | | {{ScriptUsage | ||
|Summary=Set a clock HUD element to count down over a time period. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclockup() | | void setclockup() | ||
| | | {{ScriptUsage | ||
|Summary=Set a clock HUD element to count up over a time period. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvalue( float ) | | void setvalue( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a value HUD element to a given value. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setwaypoint( int, string, int, int ) | | void setwaypoint( int, string, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets a hud element to be a waypoint. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void fadeovertime( float ) | | void fadeovertime( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a hud element to transition in color (or alpha) over time. Normally setting the color (or alpha) of an element causes an immediate visual change. However, if the color (or alpha) gets set within <time> after calling fadeOverTime, then the hud element will transition to the new color over the remaining <time>. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void scaleovertime( float, int, int ) | | void scaleovertime( float, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a hud element to scale over time. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void moveovertime( float ) | | void moveovertime( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set a hud element to move over time. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void reset() | | void reset() | ||
| | | {{ScriptUsage | ||
|Summary=Reset a HUD element to its default state. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void destroy() | | void destroy() | ||
| | | {{ScriptUsage | ||
|Summary=Remove this Hud element altogether. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpulsefx( int, int, int ) | | void setpulsefx( int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the hudelem string to display with a "Pulse" effect. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcod7decodefx( int, int, int ) | | void setcod7decodefx( int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setredactfx( int, int, int, int ) | | void setredactfx( int, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settypewriterfx( int, int, int ) | | void settypewriterfx( int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int gettextwidth() | | int gettextwidth() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setperks( entity, entity ) | | void setperks( entity, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayernamestring( entity, entity ) | | void setplayernamestring( entity, entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the player name string for a HUD element | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmapnamestring( string ) | | void setmapnamestring( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the map name string | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgametypestring( string ) | |||
| void setgametypestring( | | {{ScriptUsage | ||
| | |Summary=Set the game type string for the game | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setwargamedata() | | void setwargamedata() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void changefontscaleovertime( float time ) | |||
| void changefontscaleovertime( float ) | | {{ScriptUsage | ||
| | |Summary=Set a hud element to transition in fontScale over time. Normally setting the fontScale of an element causes an immediate visual change. However, if the fontScale gets set within <time> after calling ChangeFontScaleOverTime, then the hud element will transition to the new fontScale over the remaining <time>. | ||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
| Line 1,790: | Line 2,673: | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| void freehelicopter() | | void freehelicopter() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspeed() | | void setspeed() | ||
| | | {{ScriptUsage | ||
|Summary=Sets the speed and acceleration for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getspeed() | | float getspeed() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current speed in inches per second. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getspeedmph() | | float getspeedmph() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resumespeed( float ) | | void resumespeed( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the vehicle to resume its path speed. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setyawspeed( float, float, float, float ) | | void setyawspeed( float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the yaw speed for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmaxpitchroll( float, float ) | | void setmaxpitchroll( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets max pitch and roll angle for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturningability( float ) | | void setturningability( float ) | ||
| | | {{ScriptUsage | ||
|Summary=If this is higher, helicopters can make sharper turns to match goal positions better. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setairresistance( float ) | | void setairresistance( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the speed at which air resistance maxes out. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethoverparams( float, float, float ) | | void sethoverparams( float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the hovering parameters. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setneargoalnotifydist( float ) | | void setneargoalnotifydist( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set distance near goal at which near_goal notification should be sent once. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool setvehgoalpos( vector, int, int, int ) | | bool setvehgoalpos( vector, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target position for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalyaw( float ) | | void setgoalyaw( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleargoalyaw() | | void cleargoalyaw() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the goal yaw direction for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settargetyaw( float ) | | void settargetyaw( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleartargetyaw() | | void cleartargetyaw() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the target yaw direction for this vehicle. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlookatent( entity ) | | void setlookatent( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the entity this vehicle will orient towards. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearlookatent() | | void clearlookatent() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the entity the vehicle is orienting towards. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehweapon( string ) | | void setvehweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the vehicle's weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity fireweapon( entity, vector ) | | entity fireweapon( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Fire the vehicle's weapon | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopfireweapon() | | void stopfireweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturrettargetvec( vector ) | | void setturrettargetvec( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target position for this vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturrettargetent( entity, vector ) | | void setturrettargetent( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the target entity for this vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearturrettarget() | | void clearturrettarget() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the target for the vehicle turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdamagestage( int ) | | void setdamagestage( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setheliheightlock( int ) | | void setheliheightlock( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getheliheightlockheight( vector ) | | float getheliheightlockheight( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isinsideheliheightlock() | | int isinsideheliheightlock() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setheightlockoffset() | | void setheightlockoffset() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
== Actor Methods == | == Actor Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| void startcoverarrival() | | void startcoverarrival() | ||
| | | {{ScriptUsage | ||
|Summary=Runs cover arrival animscript on an actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void starttraversearrival() | | void starttraversearrival() | ||
| | | {{ScriptUsage | ||
|Summary=Runs traverse arrival animscript on an actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity melee( vector ) | | entity melee( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Makes this actor melee attack. Returns the entity hit, if any. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool reacquirestep( float ) | | bool reacquirestep( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Do side step move to safe place left or right while facing enemy. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void findreacquirenode() | | void findreacquirenode() | ||
| | | {{ScriptUsage | ||
|Summary=Finds a reacquire node when exposed. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| pathnode getreacquirenode() | | pathnode getreacquirenode() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the reacquire node of this actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool usereacquirenode( pathnode ) | | bool usereacquirenode( pathnode ) | ||
| | | {{ScriptUsage | ||
|Summary=Use the given reacquire node. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void findreacquiredirectpath( int ) | | void findreacquiredirectpath( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Finds a path directly to the enemy. Call ReacquireMove to use the path. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool trimpathtoattack() | | bool trimpathtoattack() | ||
| | | {{ScriptUsage | ||
|Summary=Trims the path to attack. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool reacquiremove() | | bool reacquiremove() | ||
| | | {{ScriptUsage | ||
|Summary=Start the reaquire move | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void findreacquireproximatepath( int ) | | void findreacquireproximatepath( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Finds a path to a point that can see the enemy without leaving goal. Call ReacquireMove to use the path. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void flagenemyunattackable() | | void flagenemyunattackable() | ||
| | | {{ScriptUsage | ||
|Summary=Set this actor not to attack its current enemy. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearpitchorient() | | void clearpitchorient() | ||
| | | {{ScriptUsage | ||
|Summary=Clear pitch orientation | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpitchorient() | | void setpitchorient() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlookatanimnodes( anim, anim, anim ) | | void setlookatanimnodes( anim, anim, anim ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the animation nodes for this actor for looking at things to the left and right. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlookat( vector, float ) | | void setlookat( vector, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the actor to exit the prone position. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlookatyawlimits( float, float, float ) | | void setlookatyawlimits( float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the limits of what this actor can look at. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoplookat( float ) | | void stoplookat( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Make this actor stop looking at its current look at target. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool cansee( entity, int ) | | bool cansee( entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Check to see if the actor can see the given entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool seerecently( entity, float ) | | bool seerecently( entity, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int lastknowntime( entity ) | | int lastknowntime( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector lastknownpos( entity ) | | vector lastknownpos( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int maymovetopoint( vector, int ) | | int maymovetopoint( vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Check whether the actor can move to a given point. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int maymovefrompointtopoint( vector, vector, int ) | | int maymovefrompointtopoint( vector, vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Check whether the actor can move from a given point to a given point. Does not check friendly fire and in goal radius unlike maymovetopoint | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int teleport( vector, vector ) | | int teleport( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Teleport the actor to a new position with the given origin and angles. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float withinapproxpathdist( float ) | | float withinapproxpathdist( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Check whether the actor is within an approximate distance to his path | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int ispathdirect() | | int ispathdirect() | ||
| | | {{ScriptUsage | ||
|Summary=Check whether the actor's current path is direct | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowedstances( conststring, conststring, conststring ) | | void allowedstances( conststring, conststring, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the list of the actor's allowed stances. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isstanceallowed( conststring ) | | int isstanceallowed( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Checks whether this actor can go to the given stance. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void traversemode( conststring ) | | void traversemode( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the traverse mode of this actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void animmode( conststring, int ) | | void animmode( conststring, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the way that animation deltas are interpreted by the game engine | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void orientmode( conststring, vector, int ) | | void orientmode( conststring, vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the orient mode of this actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getorientmode( string ) | | conststring getorientmode( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getmotionangle() | | float getmotionangle() | ||
| | | {{ScriptUsage | ||
|Summary=Get the motion angle in degrees for this actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool shouldfacemotion() | | bool shouldfacemotion() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearmovehistory() | | void clearmovehistory() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getmovehistoryaverage() | | vector getmovehistoryaverage() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getanglestolikelyenemypath() | | vector getanglestolikelyenemypath() | ||
| | | {{ScriptUsage | ||
|Summary=Get the angles towards the direction an enemy is most likely to appear. Returns undefined if a good guess can't be made. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void lerpposition( vector, vector ) | | void lerpposition( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Interpolate an actor's position, and angles. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void predictoriginandangles() | | void predictoriginandangles() | ||
| | | {{ScriptUsage | ||
|Summary=Use physics to predict the actor's origin and angles | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void predictanim() | | void predictanim() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gethitenttype() | | void gethitenttype() | ||
| | | {{ScriptUsage | ||
|Summary=Get the type of entity that the actor has hit. Can be 'hit', 'obstacle' or 'world'. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float gethityaw() | | float gethityaw() | ||
| | | {{ScriptUsage | ||
|Summary=Get the direction in degrees that the player has hit an obstacle at. Returns an error if nothing was hit. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getgroundenttype() | | void getgroundenttype() | ||
| | | {{ScriptUsage | ||
|Summary=Get the entity type of the 'ground' that the actor is on. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isdeflected() | | int isdeflected() | ||
| | | {{ScriptUsage | ||
|Summary=Check if the actor has been deflected. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void animcustom( func, func ) | | void animcustom( func, func ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the anim script for this actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int canattackenemynode() | | int canattackenemynode() | ||
| | | {{ScriptUsage | ||
|Summary=Checks if this actor can attack its enemies node. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getpathlength() | | int getpathlength() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int calcpathlength( vector ) | | int calcpathlength( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| pathnode getnegotiationstartnode() | | pathnode getnegotiationstartnode() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the next negotiation node for this actor | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| pathnode getnegotiationendnode() | | pathnode getnegotiationendnode() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the end negotiation node for this actor | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int canseepathgoal() | | int canseepathgoal() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool checkprone( vector, float, int ) | | bool checkprone( vector, float, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true when a character can go prone at the specified position. Specifically setup for use by AI characters. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void pushplayer( int ) | | void pushplayer( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Set whether this character can push the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalnode( pathnode ) | | void setgoalnode( pathnode ) | ||
| | | {{ScriptUsage | ||
|Summary=Set this actor's goal node. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalpos( vector, vector ) | | void setgoalpos( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Set this actor's goal position. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalentity( entity ) | | void setgoalentity( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalvolume( entity ) | | void setgoalvolume( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set this actor's goal volume. This cannot be set if a goal entity is set. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgoalvolumeauto( entity ) | | void setgoalvolumeauto( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getgoalvolume() | | entity getgoalvolume() | ||
| | | {{ScriptUsage | ||
|Summary=Get this actor's goal volume. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleargoalvolume() | | void cleargoalvolume() | ||
| | | {{ScriptUsage | ||
|Summary=Clears this actor's goal volume. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setfixednodesafevolume( entity ) | | void setfixednodesafevolume( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Set this actor's fixed node safe volume. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getfixednodesafevolume() | | entity getfixednodesafevolume() | ||
| | | {{ScriptUsage | ||
|Summary=Get this actor's fixed node safe volume. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearfixednodesafevolume() | | void clearfixednodesafevolume() | ||
| | | {{ScriptUsage | ||
|Summary=Clears this actor's fixed node safe volume. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isingoal( vector ) | | bool isingoal( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Determine whether a given point is in the actor's current goal area | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setruntopos( vector ) | | void setruntopos( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Override where the actor should run to. This overrides the goal pos and the claimed node. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearruntopos() | | void clearruntopos() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool nearnode( pathnode ) | | bool nearnode( pathnode ) | ||
| | | {{ScriptUsage | ||
|Summary=Determine whether this actor is near to a given path node. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool nearclaimnode() | | bool nearclaimnode() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool nearclaimnodeandangle() | | bool nearclaimnodeandangle() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool atdangerousnode() | | bool atdangerousnode() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getenemyinfo( entity ) | | void getenemyinfo( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearenemy() | | void clearenemy() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the actor's current enemy entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setentitytarget( entity, float ) | | void setentitytarget( entity, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set an entity as the AI's target. This is for special cases only. Do not set AI or player targets with this. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearentitytarget() | | void clearentitytarget() | ||
| | | {{ScriptUsage | ||
|Summary=Clears an AI's entity target. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpotentialthreat( float ) | | void setpotentialthreat( float ) | ||
| | | {{ScriptUsage | ||
|Summary=In non-combat situations. This is mostly useful for friendlies. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearpotentialthreat() | | void clearpotentialthreat() | ||
| | | {{ScriptUsage | ||
|Summary=Clear the potential threat direction. See SetPotentialThreat for more info on potential threats | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getperfectinfo( entity ) | | void getperfectinfo( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setflashbangimmunity( int ) | | void setflashbangimmunity( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether an actor is succeptable to flashbangs. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setflashbanged( int ) | | void setflashbanged( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets whether an actor is under a flashbang effect. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getflashbangedstrength() | | float getflashbangedstrength() | ||
| | | {{ScriptUsage | ||
|Summary=Retrieves how strongly the actor was initially hit by a flashbang. 1.0 is full strength, 0.0 is none at all. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isknownenemyinradius( vector, float ) | | int isknownenemyinradius( vector, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Checks if there is a known enemy in a radius for an AI. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isknownenemyinvolume( entity ) | | int isknownenemyinvolume( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Checks if there is a known enemy in a volume for an AI. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settalktospecies( conststring ) | | void settalktospecies( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the species this AI can share enemy information with. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowpitchangle( int ) | | void allowpitchangle( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void knockback( int ) | | void knockback( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getdeltaturnyaw() | | float getdeltaturnyaw() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity finishactordamage( entity, entity, int, string, vector, vector, conststring, int, int ) | | entity finishactordamage( entity, entity, int, string, vector, vector, conststring, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array calclookaheadpos( vector, int ) | | array calclookaheadpos( vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setengagementmindist() | | void setengagementmindist() | ||
| | | {{ScriptUsage | ||
|Summary=Sets the min engagement distances used when selecting cover nodes. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setengagementmaxdist() | | void setengagementmaxdist() | ||
| | | {{ScriptUsage | ||
|Summary=Sets the max engagement distances used when selecting cover nodes. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isinscriptedstate() | | bool isinscriptedstate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity meleewithoffset( vector ) | | entity meleewithoffset( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int forceteleport( vector, vector ) | | int forceteleport( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setentityowner( entity ) | | void setentityowner( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearentityowner() | | void clearentityowner() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setanimstate( conststring, int ) | | void setanimstate( conststring, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setaimanimweights( float, float ) | | void setaimanimweights( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startscriptedanim() | | void startscriptedanim() | ||
| | | {{ScriptUsage | ||
|Summary=Runs an animscript on an actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void popaistate() | | void popaistate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int setanimstatefromasd( conststring, conststring, int ) | | int setanimstatefromasd( conststring, conststring, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool hasanimstatefromasd( conststring ) | | bool hasanimstatefromasd( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getanimstatefromasd() | | conststring getanimstatefromasd() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getanimsubstatefromasd( conststring, conststring ) | | int getanimsubstatefromasd( conststring, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getanimsubstatecountfromasd( conststring ) | | int getanimsubstatecountfromasd( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| anim getanimfromasd( conststring, animsindex, animsindex, int ) | | anim getanimfromasd( conststring, animsindex, animsindex, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getanimlengthfromasd( conststring, int ) | | float getanimlengthfromasd( conststring, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool getanimhasnotetrackfromasd( conststring, int, conststring ) | | bool getanimhasnotetrackfromasd( conststring, int, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setfreecameralockonallowed( int ) | | void setfreecameralockonallowed( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
== Builtin Common Methods == | == Builtin Common Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| void forceyellowdot( int ) | | void forceyellowdot( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableyellowdot( int ) | | void disableyellowdot( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowcamerarotation( int ) | | void allowcamerarotation( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool reloadonnunchuk() | | bool reloadonnunchuk() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool reloadonwiiumote() | | bool reloadonwiiumote() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void attach( string, constlowercasestring, int ) | | void attach( string, constlowercasestring, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Attach a model to an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void detach( string, constlowercasestring ) | | void detach( string, constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary=Detaches an attached model from an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void detachall() | | void detachall() | ||
| | | {{ScriptUsage | ||
|Summary=detaches all attached models from an entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getattachsize() | | int getattachsize() | ||
| | | {{ScriptUsage | ||
|Summary=Returns the number of attached models for this entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getattachmodelname( int ) | | conststring getattachmodelname( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns the name of the attached model at the given attachment slot | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getattachtagname( int ) | | conststring getattachtagname( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns the tagname of the attached model at the given attachment slot | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool getattachignorecollision( int ) | | bool getattachignorecollision( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns the ignore collision flag of the attached model at the given attachment slot | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void hidepart( constlowercasestring, string ) | | void hidepart( constlowercasestring, string ) | ||
| | | {{ScriptUsage | ||
|Summary=Hide part of an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void runscriptonent() | | void runscriptonent() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sendaiscriptvals( string, string ) | | void sendaiscriptvals( string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void showpart( constlowercasestring, string ) | | void showpart( constlowercasestring, string ) | ||
| | | {{ScriptUsage | ||
|Summary=Show part of an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void showallparts() | | void showallparts() | ||
| | | {{ScriptUsage | ||
|Summary=Show all parts of an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsoundtoplayer( string ) | | void playsoundtoplayer( string ) | ||
| | | {{ScriptUsage | ||
|Summary= Play the sound alias as if coming from the entity, so that only one player can hear it | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getlightcolor() | | vector getlightcolor() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current color of the light, as an RGB vector. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlightcolor( vector ) | | void setlightcolor( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the current color of the light, as an RGB vector. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getlightintensity() | | float getlightintensity() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current intensity of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlightintensity( float ) | | void setlightintensity( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the current intensity of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getlightradius() | | float getlightradius() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current radius of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlightradius( float ) | | void setlightradius( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the current radius of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getlightfovinner() | | float getlightfovinner() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current inner fov of a spot light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getlightfovouter() | | float getlightfovouter() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current outer fov of a spot light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlightfovrange( float, float ) | | void setlightfovrange( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the current radius of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getlightexponent() | | int getlightexponent() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the current exponent of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setlightexponent( int ) | | void setlightexponent( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the current exponent of the light. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool areallmissionsatscore( int ) | | bool areallmissionsatscore( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void isstartingclassdefault() | | void isstartingclassdefault() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void isstartingclasseraappropriate() | | void isstartingclasseraappropriate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getnumchallengescomplete( string ) | | int getnumchallengescomplete( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool hascompletedallgamechallenges() | | bool hascompletedallgamechallenges() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void hasallintel() | | void hasallintel() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getdstat() | | string getdstat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getdstatarraycount() | | int getdstatarraycount() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdstat( string, string, int, int, float, float ) | | void setdstat( string, string, int, int, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void adddstat() | | void adddstat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addweaponstat( string, string, int ) | |||
| void addweaponstat( string, | | {{ScriptUsage | ||
| | |Summary=Adds to a weapon's statistic. The first parameter is the weapon name, the second one the challenge category and the last one the increment. | ||
|Example=<pre>player addWeaponStat("flash_grenade_mp", "used", 1);</pre> | |||
}} | |||
|- | |- | ||
| void addbonuscardstat( int, string, int ) | | void addbonuscardstat( int, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getsessstat() | | void getsessstat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getsessstatarraycount() | | void getsessstatarraycount() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setsessstat() | | void setsessstat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addsessstat() | | void addsessstat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addplayerstat( string ) | | void addplayerstat( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addplayerstatwithgametype() | | void addplayerstatwithgametype() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addgametypestat() | | void addgametypestat() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void trackweaponfirenative( string, int, int, int ) | | void trackweaponfirenative( string, int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void updatestatratio( string, string, string ) | | void updatestatratio( string, string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int addrankxp( string, int ) | | int addrankxp( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void addrankxpvalue(string, int) | |||
| void addrankxpvalue( string ) | | {{ScriptUsage | ||
| | |Summary=Gives the player rank experience. The first parameter is the event type and the second one the experience reward. | ||
|Example=<pre>player addRankXPValue("contract", 60000);</pre> | |||
}} | |||
|- | |- | ||
| bool hasseasonpass() | | bool hasseasonpass() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setempjammed( int ) | | void setempjammed( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isempjammed() | | bool isempjammed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspawnerteam( team ) | | void setspawnerteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the team for this spawner | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void luinotifyevent() | | void luinotifyevent() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void launch( vector, vector ) | | void launch( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Launch an object that interacts with the world, using an initial velocity. From this point on this object will no longer block either missiles or bullets. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmovingplatformenabled( int ) | | void setmovingplatformenabled( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool ismovingplatform() | | bool ismovingplatform() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setviewmodelrenderflag( int ) | | void setviewmodelrenderflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdrawinfrared( int ) | | void setdrawinfrared( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setgpr() | | void setgpr() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gamehistorystartmatch( int ) | | void gamehistorystartmatch( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gamehistoryfinishmatch( int, int, int, int, int, float ) | | void gamehistoryfinishmatch( int, int, int, int, int, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void unlink() | | void unlink() | ||
| | | {{ScriptUsage | ||
|Summary=Unlinks a linked entity from another entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void linkto() | | void linkto() | ||
| | | {{ScriptUsage | ||
|Summary=Attaches one entity to another | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void linktoblendtotag() | | void linktoblendtotag() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enablelinkto() | | void enablelinkto() | ||
| | | {{ScriptUsage | ||
|Summary=enables linkto for an entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void linktoupdateoffset( vector, vector ) | | void linktoupdateoffset( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinkto() | | void playerlinkto() | ||
| | | {{ScriptUsage | ||
|Summary=Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. Rotating the parent entity/tag will not move the player's eye position, but only the player's view angles. Thus, the player's eye position is locked in place, always directly above the parent tag. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinktoblend( entity, constlowercasestring, float, float, float, float, float, float ) | | void playerlinktoblend( entity, constlowercasestring, float, float, float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinktodelta() | | void playerlinktodelta() | ||
| | | {{ScriptUsage | ||
|Summary=Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical) | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinkweaponviewtodelta() | | void playerlinkweaponviewtodelta() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinktoabsolute( entity, constlowercasestring ) | | void playerlinktoabsolute( entity, constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary=Attaches the player to an entity. No view movement is allowed. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical) | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playercamlinkto( entity, string ) | | void playercamlinkto( entity, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playercamunlink() | | void playercamunlink() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void lerpviewangleclamp( float, float, float, float, float, float, float ) | | void lerpviewangleclamp( float, float, float, float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setviewangleresistance() | | void setviewangleresistance() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinkedoffsetenable() | | void playerlinkedoffsetenable() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinkedoffsetdisable() | | void playerlinkedoffsetdisable() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playerlinkedsetusebaseangleforviewclamp( int ) | | void playerlinkedsetusebaseangleforviewclamp( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dontinterpolate() | | void dontinterpolate() | ||
| | | {{ScriptUsage | ||
|Summary=pop the entity's position instantaneously to where it moves this time step, rather than smoothly moving there from the previous position | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity magicgrenadetype( string, vector, vector, float ) | | entity magicgrenadetype( string, vector, vector, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startfadingblur( float, float ) | | void startfadingblur( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector localtoworldcoords( vector ) | | vector localtoworldcoords( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Transform the given local coordinate point to a world coordinate point | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector worldtolocalcoords( vector ) | | vector worldtolocalcoords( vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretspinning( int ) | | void setturretspinning( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void attachshieldmodel() | | void attachshieldmodel() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void detachshieldmodel() | | void detachshieldmodel() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setscriptmoverflag( int ) | | void setscriptmoverflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void refreshshieldattachment() | | void refreshshieldattachment() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcharacterindex( int ) | | void setcharacterindex( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void useplayerfootsteptable() | | void useplayerfootsteptable() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvisionsetforplayer( string, float ) | | void setvisionsetforplayer( string, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void useservervisionset( int ) | | void useservervisionset( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setinfraredvision( int ) | | void setinfraredvision( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getcontrollertype() | | string getcontrollertype() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setactorweapon( string, int ) | | void setactorweapon( string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resetfov() | | void resetfov() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
== Builtin Methods == | == Builtin Methods == | ||
{| class="wikitable" style="width:100%" | {| class="wikitable" style="width:100%" | ||
|- | |- | ||
! | ! style="width:40%" | Prototype | ||
! style="width:60%"| Description | |||
|- | |- | ||
| void setstowedweapon( string ) | | void setstowedweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getstowedweapon() | | string getstowedweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearstowedweapon() | | void clearstowedweapon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getammocount( string ) | | int getammocount( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Get the remaining ammo | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvisibletoplayer( entity ) | | void setvisibletoplayer( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setinvisibletoplayer( entity, int ) | | void setinvisibletoplayer( entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvisibletoall() | | void setvisibletoall() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setinvisibletoall() | | void setinvisibletoall() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvisibletoteam( team ) | | void setvisibletoteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvisibletoallexceptteam( team ) | | void setvisibletoallexceptteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setforcenocull() | | void setforcenocull() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void removeforcenocull() | | void removeforcenocull() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int islinkedto( entity ) | | int islinkedto( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowtacticalinsertion( int ) | | void allowtacticalinsertion( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void allowbottargetting( int ) | | void allowbottargetting( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getlinkedent() | | entity getlinkedent() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getorigin() | | vector getorigin() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the origin of an entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getangles() | | vector getangles() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getmins() | | vector getmins() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getmaxs() | | vector getmaxs() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getabsmins() | | vector getabsmins() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getabsmaxs() | | vector getabsmaxs() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getpointinbounds( float, float, float ) | | vector getpointinbounds( float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector geteye() | | vector geteye() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the position of the eye for an AI or Player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector geteyeapprox() | | vector geteyeapprox() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity useby( entity ) | | entity useby( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Uses the entity with the passed in entity as the activator | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setstablemissile( int ) | | void setstablemissile( int ) | ||
| | | {{ScriptUsage | ||
|Summary=This entity will shoot missiles that do not destabilize. Only applicable to vehicles, players and AI | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int istouching( entity, vector ) | | int istouching( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int istouchingswept( entity, float, float ) | | int istouchingswept( entity, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int istouchingvolume( vector, vector, vector ) | | int istouchingvolume( vector, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsound( string ) | | void playsound( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Play's the specified sound which can be heard by other nearby players as well | |||
|Example=<pre>player playsound("zmb_cha_ching");</pre> | |||
}} | |||
|- | |- | ||
| void playsoundwithnotify( string, conststring ) | | void playsoundwithnotify( string, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsoundontag( string, string ) | | void playsoundontag( string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsoundasmaster( string ) | | void playsoundasmaster( string ) | ||
| | | {{ScriptUsage | ||
|Summary= Play the sound alias as if coming from the entity, as a master sound | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsoundtoteam( string, entity ) | | void playsoundtoteam( string, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= Play the sound alias as if coming from the entity, so that only one team can hear it | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playbattlechattertoteam( string, string, team, entity ) | | void playbattlechattertoteam( string, string, team, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playsoundtoplayer( string ) | | void playsoundtoplayer( string ) | ||
| | | {{ScriptUsage | ||
|Summary= Play the sound alias as if coming from the entity, so that only one player can hear it | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playloopsound( string, float ) | | void playloopsound( string, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Play a sound as a loop | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoploopsound( float ) | | void stoploopsound( float ) | ||
| | | {{ScriptUsage | ||
|Summary= Stop a looping sound | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopsounds() | | void stopsounds() | ||
| | | {{ScriptUsage | ||
|Summary=Stop all sounds on an entity. *WARNING*, You must have a wait between StopSounds() and delete() or the sound will not stop. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playrumbleonentity() | | void playrumbleonentity() | ||
| | | {{ScriptUsage | ||
|Summary=Plays a rumble on the given entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void playrumblelooponentity() | | void playrumblelooponentity() | ||
| | | {{ScriptUsage | ||
|Summary=Plays a looping controller rumble on the given player. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoprumble( string ) | | void stoprumble( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Quits the playing of a particular rumble on a player. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void delete() | | void delete() | ||
| | | {{ScriptUsage | ||
|Summary=Removes an entity from the game in the same manner as a trigger_kill" | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmodel( string ) | | void setmodel( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Changes an entity's appearance | |||
|Example=<pre>player setmodel("german_shepherd_vest");</pre> | |||
}} | |||
|- | |- | ||
| void setzombieshrink( int ) | | void setzombieshrink( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setenemymodel( string ) | | void setenemymodel( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void dodamage( float, vector, entity, entity ) | | void dodamage( float, vector, entity, entity ) | ||
| | | {{ScriptUsage | ||
|Summary= Does damage to this entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getnormalhealth() | | float getnormalhealth() | ||
| | | {{ScriptUsage | ||
|Summary= Gets the normal health of this entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setnormalhealth( float ) | | void setnormalhealth( float ) | ||
| | | {{ScriptUsage | ||
|Summary= Sets the normal health of this entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmaxhealth( int ) | | void setmaxhealth( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void show() | | void show() | ||
| | | {{ScriptUsage | ||
|Summary=Turns the player visible (default) | |||
|Example=<pre>player show();</pre> | |||
}} | |||
|- | |- | ||
| void hide() | | void hide() | ||
| | | {{ScriptUsage | ||
|Summary=Turns the player invisible | |||
|Example=<pre>player hide();</pre> | |||
}} | |||
|- | |- | ||
| void ghost() | | void ghost() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void ghostindemo() | | void ghostindemo() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void showindemo() | | void showindemo() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void laseron() | | void laseron() | ||
| | | {{ScriptUsage | ||
|Summary=Turns on entity's laser sight. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void laseroff() | | void laseroff() | ||
| | | {{ScriptUsage | ||
|Summary=Turns off entity's laser sight. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void showtoplayer( entity ) | | void showtoplayer( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Show the entity to a given client | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int setcontents( int ) | | int setcontents( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the contents of an entity. Returns the old contents. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startfiring() | | void startfiring() | ||
| | | {{ScriptUsage | ||
|Summary=Starts a turret firing | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopfiring() | | void stopfiring() | ||
| | | {{ScriptUsage | ||
|Summary=Stops a turret firing | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void shootturret() | | void shootturret() | ||
| | | {{ScriptUsage | ||
|Summary=Shoots a turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopshootturret() | | void stopshootturret() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmode( conststring ) | | void setmode( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the mode of a turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getturretowner() | | entity getturretowner() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the "owner" of this turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settargetentity( entity ) | | void settargetentity( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the target of this turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getturretarclimits() | | array getturretarclimits() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayerspread( float ) | | void setplayerspread( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the spread of this turret when used by the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setaispread( float ) | | void setaispread( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the spread of this turret when used by an AI | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setconvergencetime( float ) | | void setconvergencetime( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the time that a turret takes to converge to its target, on either the pitch or yay planes. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setsuppressiontime( float ) | | void setsuppressiontime( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the time that a turret uses supressing fire after losing sight of an enemy | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void cleartargetentity() | | void cleartargetentity() | ||
| | | {{ScriptUsage | ||
|Summary=Clears the current target for this turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretteam( team ) | | void setturretteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the team of a turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void maketurretusable() | | void maketurretusable() | ||
| | | {{ScriptUsage | ||
|Summary=Sets a turret able to be used | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void maketurretunusable() | | void maketurretunusable() | ||
| | | {{ScriptUsage | ||
|Summary=Sets a turret to be unable to be used | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretaccuracy() | | void setturretaccuracy() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretignoregoals( int ) | | void setturretignoregoals( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the ignoreGoals flag for the turret. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getturrettarget() | | entity getturrettarget() | ||
| | | {{ScriptUsage | ||
|Summary= Gets the current target of this turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disconnectpaths() | | void disconnectpaths() | ||
| | | {{ScriptUsage | ||
|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=<pre></pre> | |||
}} | |||
|- | |- | ||
| void connectpaths() | | void connectpaths() | ||
| | | {{ScriptUsage | ||
|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=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getstance() | | conststring getstance() | ||
| | | {{ScriptUsage | ||
|Summary=Returns the current stance by the player. The returned value is either prone, stand or crouch | |||
|Example=<pre>currentstance = player getstance();</pre> | |||
}} | |||
|- | |- | ||
| void setstance( conststring ) | | void setstance( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary=Changes the stance for a specific player. Possible values are prone, stand and crouch | |||
|Example=<pre>player setstance("prone");</pre> | |||
}} | |||
|- | |- | ||
| void setcursorhint( string, entity ) | | void setcursorhint( string, entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets a visible cursor near to an objective | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setrevivehintstring( string, team ) | | void setrevivehintstring( string, team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethintstringforperk( string, string ) | | void sethintstringforperk( string, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethintstring( string ) | | void sethintstring( string ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the hint string for a usable entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setfovforkillcam( int ) | | void setfovforkillcam( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sethintlowpriority( int ) | | void sethintlowpriority( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void usetriggerrequirelookat() | | void usetriggerrequirelookat() | ||
| | | {{ScriptUsage | ||
|Summary=Modifies the use trigger so that it requires the user to be looking at it | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void triggerignoreteam() | | void triggerignoreteam() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void shellshock( string, float, int ) | | void shellshock( string, float, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Start a shell shock sequence for the player. The shell shock must be precached, otherwise calling this script will cause a script error. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getweaponforwarddir() | | vector getweaponforwarddir() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getweaponmuzzlepoint() | | vector getweaponmuzzlepoint() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector gettagorigin( constlowercasestring ) | | vector gettagorigin( constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary=Gets the origin of a particular tag on this model | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector gettagangles( constlowercasestring ) | | vector gettagangles( constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary=Gets the angles of a particular tag on this model | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getentnum() | | void getentnum() | ||
| | | {{ScriptUsage | ||
|Summary=Get the entity number for this entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopshellshock() | | void stopshellshock() | ||
| | | {{ScriptUsage | ||
|Summary=Stop a shell shock sequence for the player | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdepthoffield( float, float, float, float, float, float ) | | void setdepthoffield( float, float, float, float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the depth of field values for a player. If start >= end for near or far, depth of field is disabled for that region. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setburn( float ) | | void setburn( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setelectrified( float ) | | void setelectrified( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void spawnnapalmgroundflame( vector, string, vector, int ) | | void spawnnapalmgroundflame( vector, string, vector, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void needsrevive( int ) | | void needsrevive( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isinsecondchance() | | bool isinsecondchance() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float depthinwater() | | float depthinwater() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void shootup( float ) | | void shootup( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int depthofplayerinwater() | | int depthofplayerinwater() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void useweaponhidetags( string ) | | void useweaponhidetags( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void useweaponmodel( string, string, int ) | | void useweaponmodel( string, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void starttanning() | | void starttanning() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopburning() | | void stopburning() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setwaterdrops( int ) | | void setwaterdrops( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void restoredefaultdroppitch() | | void restoredefaultdroppitch() | ||
| | | {{ScriptUsage | ||
|Summary=Use this if you move a turret and need to reconfigure. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isfiringturret() | | bool isfiringturret() | ||
| | | {{ScriptUsage | ||
|Summary=Checks whether this turret is firing. The entity must be a turret | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isturretlockedon() | | bool isturretlockedon() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setviewmodeldepthoffield( float, float ) | | void setviewmodeldepthoffield( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the depth of field values for the player's viewmodel when at hip. If start >= end, depth of field is disabled. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void viewkick( float, vector ) | | void viewkick( float, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Damage the player, and throw the screen around | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector localtoworldcoords( vector ) | | vector localtoworldcoords( vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Transform the given local coordinate point to a world coordinate point | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setrightarc( float ) | | void setrightarc( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the amount that the turret can move to the right | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setleftarc( float ) | | void setleftarc( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the amount that the turret can move to the left | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void settoparc( float ) | | void settoparc( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the amount that the turret can pivot up | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setbottomarc( float ) | | void setbottomarc( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the amount that the turret can pivot down | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void radiusdamage() | | void radiusdamage() | ||
| | | {{ScriptUsage | ||
|Summary=Does damage to all damageable objects within a given radius. The amount of damage is linear according to how close the object is to the radius. See also Entity/radiusdamage to specify an entity the damage is coming from. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void detonate( entity ) | | void detonate( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Causes a grenade to explode. Must be called on a grenade. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void damageconetrace() | | void damageconetrace() | ||
| | | {{ScriptUsage | ||
|Summary=Determines how much the entity can be damaged from the given position, using the same check that is used by grenades. Performs multiple damage traces and returns an approximation to how much of the entity is damageable from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially damageable. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sightconetrace() | | void sightconetrace() | ||
| | | {{ScriptUsage | ||
|Summary=Determines how much the entity can be seen from the given position, using the same check that is used by grenades. Performs multiple sight traces and returns an approximation to how much of the entity is visible from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially visible. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int heliturretsighttrace( vector, entity, int ) | | int heliturretsighttrace( vector, entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int heliturretdogtrace( vector, entity, int ) | | int heliturretdogtrace( vector, entity, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int playersighttrace( vector, int, int ) | | int playersighttrace( vector, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void visionsetlerpratio( float ) | | void visionsetlerpratio( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float docowardswayanims() | | float docowardswayanims() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startpoisoning() | | void startpoisoning() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stoppoisoning() | | void stoppoisoning() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startbinocs() | | void startbinocs() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopbinocs() | | void stopbinocs() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isflared() | | bool isflared() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool ispoisoned() | | bool ispoisoned() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setcameraspikeactive( int ) | | void setcameraspikeactive( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isinsideheightlock() | | int isinsideheightlock() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int ismissileinsideheightlock() | | int ismissileinsideheightlock() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isonground( int ) | | int isonground( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Returns true if the player is on the ground. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getgroundent() | | entity getgroundent() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity getmoverent() | | entity getmoverent() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int issprinting() | | int issprinting() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setanim() | | void setanim() | ||
| | | {{ScriptUsage | ||
|Summary="Restart": These functions cause the animation to restart. If they had been previously playing, without this they would continue from their current time. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void useanimtree( animtree ) | | void useanimtree( animtree ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the animation tree of an entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void animscripted() | | void animscripted() | ||
| | | {{ScriptUsage | ||
|Summary=Runs an animscript on an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void animscriptedskiprestart() | | void animscriptedskiprestart() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void animrelative() | | void animrelative() | ||
| | | {{ScriptUsage | ||
|Summary=Runs an animscript on an entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopanimscripted() | | void stopanimscripted() | ||
| | | {{ScriptUsage | ||
|Summary=Halts animscript on this entity. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearanim( anim, float ) | | void clearanim( anim, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets an animation's goal weight (and the goal weights of all of its descendents) to zero over the specified time. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setentityanimrate( float ) | | void setentityanimrate( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getentityanimrate() | | float getentityanimrate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getcentroid() | | vector getcentroid() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the centroid of an entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool ismartyrdomgrenade() | | bool ismartyrdomgrenade() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getentitynumber() | | int getentitynumber() | ||
| | | {{ScriptUsage | ||
|Summary=Get the entity number of this entity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getentitytype() | | int getentitytype() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enablegrenadetouchdamage() | | void enablegrenadetouchdamage() | ||
| | | {{ScriptUsage | ||
|Summary=enable grenade damage for damage triggers | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disablegrenadetouchdamage() | | void disablegrenadetouchdamage() | ||
| | | {{ScriptUsage | ||
|Summary=Disable grenade damage for damage triggers | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void enableaimassist() | | void enableaimassist() | ||
| | | {{ScriptUsage | ||
|Summary=Enables aim assist on an entity. The entity must have a brush model | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void disableaimassist() | | void disableaimassist() | ||
| | | {{ScriptUsage | ||
|Summary=Disables aim assist on an entity. The entity must have a brush model | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void placespawnpoint() | | void placespawnpoint() | ||
| | | {{ScriptUsage | ||
|Summary=Raises the spawn point up to make sure it's not in the ground, then drops it back down into the ground. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setspawnclientflag( string ) | | void setspawnclientflag( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void directionalhitindicator( int, int ) | | void directionalhitindicator( int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sendkillstreakdamageevent( int ) | | void sendkillstreakdamageevent( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayergravity( int ) | | void setplayergravity( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearplayergravity() | | void clearplayergravity() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void sendfaceevent( conststring ) | | void sendfaceevent( conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setteamfortrigger( team ) | | void setteamfortrigger( team ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the team that this trigger will react to | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setexcludeteamfortrigger( team ) | | void setexcludeteamfortrigger( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setperkfortrigger( string ) | | void setperkfortrigger( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setignoreentfortrigger( entity ) | | void setignoreentfortrigger( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clientclaimtrigger( entity ) | | void clientclaimtrigger( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Claim a single user trigger. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clientreleasetrigger( entity ) | | void clientreleasetrigger( entity ) | ||
| | | {{ScriptUsage | ||
|Summary=Release a single user trigger. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void releaseclaimedtrigger() | | void releaseclaimedtrigger() | ||
| | | {{ScriptUsage | ||
|Summary=Release a currently claimed trigger | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isitemlocked( int ) | | int isitemlocked( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isitempurchased( int ) | | int isitempurchased( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void uploadleaderboards() | | void uploadleaderboards() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setnemesisxuid( string ) | | void setnemesisxuid( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getloadoutitem() | | int getloadoutitem() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isbonuscardactive( int, int ) | | int isbonuscardactive( int, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getloadoutitemref() | | string getloadoutitemref() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getloadoutweapon( int, string ) | | string getloadoutweapon( int, string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getloadoutperks( int ) | | array getloadoutperks( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getloadoutallocation( int ) | | int getloadoutallocation( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmovespeedscale( float ) | | void setmovespeedscale( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the multiplier for the player's movement speed | |||
|Example=<pre>player setmovespeedscale(2);</pre> | |||
}} | |||
|- | |- | ||
| float getmovespeedscale() | | float getmovespeedscale() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void logstring() | | void logstring() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void missile_settarget( entity, vector ) | | void missile_settarget( entity, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the target entity for a guided missile | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void missile_dronesetvisible( int ) | | void missile_dronesetvisible( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isonladder() | | bool isonladder() | ||
| | | {{ScriptUsage | ||
|Summary=Return true if the player is on a ladder, false otherwise. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool ismantling() | | bool ismantling() | ||
| | | {{ScriptUsage | ||
|Summary=Return true if the player is mantling, false otherwise. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isonslide() | | bool isonslide() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startdoorbreach() | | void startdoorbreach() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void stopdoorbreach() | | void stopdoorbreach() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void startragdoll( int ) | | void startragdoll( int ) | ||
| | | {{ScriptUsage | ||
|Summary=Begin ragdoll physics for this entity. Does nothing if the entity is already a ragdoll. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int isragdoll() | | int isragdoll() | ||
| | | {{ScriptUsage | ||
|Summary=Return true if the entity is a ragdoll body, false otherwise. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void launchragdoll( vector, constlowercasestring ) | | void launchragdoll( vector, constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void launchvehicle( vector, vector ) | | void launchvehicle( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setblur( float, float ) | | void setblur( float, float ) | ||
| | | {{ScriptUsage | ||
|Summary=Blur the screen over a period of time. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resetmissiledetonationtime( float ) | | void resetmissiledetonationtime( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void giveachievement() | | void giveachievement() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setzombiename( string ) | | void setzombiename( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setentgravitytrajectory( int ) | | void setentgravitytrajectory( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setvehicleteam( team ) | | void setvehicleteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary=Set which team a vehicle is on. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setteam( team ) | | void setteam( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| team getteam() | | team getteam() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setowner( entity ) | | void setowner( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmissileowner( entity ) | | void setmissileowner( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setentityweapon( string ) | | void setentityweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretowner( entity ) | | void setturretowner( entity ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturrettype( string ) | | void setturrettype( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| anim getcorpseanim( animsindex ) | | anim getcorpseanim( animsindex ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void itemweaponsetammo( int, int, int ) | | void itemweaponsetammo( int, int, int ) | ||
| | | {{ScriptUsage | ||
|Summary=Sets the ammo ammount for a weapon item entity (lying on the ground) | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretcarried( int ) | | void setturretcarried( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setturretminimapvisible( int ) | | void setturretminimapvisible( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmissilecoasting( int ) | | void setmissilecoasting( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setweapon( string ) | | void setweapon( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void gib( conststring, object ) | | void gib( conststring, object ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setphysparams( float, float, float ) | | void setphysparams( float, float, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayercollision( int ) | | void setplayercollision( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void reportuser( string ) | | void reportuser( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayercurrentobjective() | | void setplayercurrentobjective() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setplayercurrentstreak( int ) | | void setplayercurrentstreak( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getvelocity() | | vector getvelocity() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the player's velocity | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity spawnactor( int, conststring ) | | entity spawnactor( int, conststring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector getshootatpos() | | vector getshootatpos() | ||
| | | {{ScriptUsage | ||
|Summary=Gets the position an attacker would shoot at to hit this entity.For AI or player this is the eye position.For other entities it's the tag_eye if there is one else the center of the entity bounding box. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void predictspawnpoint( vector, vector ) | | void predictspawnpoint( vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdefaultdroppitch( float ) | | void setdefaultdroppitch( float ) | ||
| | | {{ScriptUsage | ||
|Summary=Set the default drop pitch that the turret attempts to return to when it is not in use. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setscanningpitch( float ) | | void setscanningpitch( float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity launchbomb( string, vector, vector ) | | entity launchbomb( string, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| entity magicgrenade( string, vector, vector ) | | entity magicgrenade( string, vector, vector ) | ||
| | | {{ScriptUsage | ||
|Summary=Creates a "Magic" grenade from an actor. | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makegrenadedud() | | void makegrenadedud() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setclientflag( int ) | | void setclientflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getclientflag( int ) | | int getclientflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void clearclientflag( int ) | | void clearclientflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setscriptmoverflag( int ) | | void setscriptmoverflag( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setmovingplatformenabled() | | void setmovingplatformenabled() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void fakefire( entity, vector, string, int ) | | void fakefire( entity, vector, string, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makeusable( team ) | | void makeusable( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void makeunusable() | | void makeunusable() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| vector predictgrenade() | | vector predictgrenade() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setdangerous( team, int ) | | void setdangerous( team, int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isdangerous( team ) | | bool isdangerous( team ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getindexforactivecontract() | | void getindexforactivecontract() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getactivecontractprogress() | | void getactivecontractprogress() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void incrementactivecontractprogress() | | void incrementactivecontractprogress() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void incrementactivecontracttime() | | void incrementactivecontracttime() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void isactivecontractcomplete() | | void isactivecontractcomplete() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void hasactivecontractexpired() | | void hasactivecontractexpired() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getactivecontracttimepassed() | | void getactivecontracttimepassed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void resetactivecontractprogress() | | void resetactivecontractprogress() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getpregameclass() | | void getpregameclass() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void getpregameteam() | | void getpregameteam() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpregameclass() | | void setpregameclass() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setpregameteam() | | void setpregameteam() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void recordleaguepreloser() | | void recordleaguepreloser() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void luinotifyeventtospectators() | | void luinotifyeventtospectators() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool istestclient() | | bool istestclient() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setworldfogactivebank( int ) | | void setworldfogactivebank( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool iszbarrier() | | bool iszbarrier() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getnumzbarrierpieces() | | int getnumzbarrierpieces() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getzbarrierpiecestate( int ) | | conststring getzbarrierpiecestate( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setzbarrierpiecestate( int, constlowercasestring, float ) | | void setzbarrierpiecestate( int, constlowercasestring, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool iszbarrieropen() | | bool iszbarrieropen() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool iszbarrierclosed() | | bool iszbarrierclosed() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void hidezbarrierpiece( int ) | | void hidezbarrierpiece( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void showzbarrierpiece( int ) | | void showzbarrierpiece( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void zbarrierpieceusedefaultmodel( int ) | | void zbarrierpieceusedefaultmodel( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void zbarrierpieceusealternatemodel( int ) | | void zbarrierpieceusealternatemodel( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void zbarrierpieceuseupgradedmodel( int ) | | void zbarrierpieceuseupgradedmodel( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void zbarrierpieceuseboxriselogic( int ) | | void zbarrierpieceuseboxriselogic( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getupgradedpiecenumlives( int ) | | int getupgradedpiecenumlives( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| array getzbarrierpieceindicesinstate( constlowercasestring ) | | array getzbarrierpieceindicesinstate( constlowercasestring ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getzbarrierpieceanimlengthforstate( int, constlowercasestring, float ) | | float getzbarrierpieceanimlengthforstate( int, constlowercasestring, float ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getzbarrierpieceanimstate( int ) | | conststring getzbarrierpieceanimstate( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getzbarrierpieceanimsubstate( int ) | | conststring getzbarrierpieceanimsubstate( int ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int zbarriersupportszombietaunts() | | int zbarriersupportszombietaunts() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int zbarriersupportszombiereachthroughattacks() | | int zbarriersupportszombiereachthroughattacks() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getzbarriertauntanimstate() | | conststring getzbarriertauntanimstate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| conststring getzbarrierreachthroughattackanimstate() | | conststring getzbarrierreachthroughattackanimstate() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| int getzbarriernumattackslots() | | int getzbarriernumattackslots() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| float getzbarrierattackslothorzoffset() | | float getzbarrierattackslothorzoffset() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setzbarriercolmodel( string ) | | void setzbarriercolmodel( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| string getweaponoptic( string ) | | string getweaponoptic( string ) | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| void setaltusetrigger() | | void setaltusetrigger() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
| bool isaltusetrigger() | | bool isaltusetrigger() | ||
| | | {{ScriptUsage | ||
|Summary= | |||
|Example=<pre></pre> | |||
}} | |||
|- | |- | ||
|} | |} | ||
Latest revision as of 23:53, 18 November 2015
Player Methods
| Prototype | Description |
|---|---|
| void giveweapon( string weapon, int altModelIndex, int weaponOptions ) void giveweapon( string weapon, int altModelIndex ) void giveweapon( string weapon ) |
Summary: Gives a weapon to the specified client with an optional argument for camo and attachments. A full list containing all the weapon names can be found here http://pastebin.com/wEq07Yzw player giveweapon("mp7_mp", 255, 0);
|
| void updateweaponoptions( string weapon, int weaponOptions ) | Summary:
|
| void setblockweaponpickup( string weapon, int blockWeaponPickup ) | Summary:
|
| int calcweaponoptions( int camo, int lens, int reticle, int tag, int emblem ) int calcweaponoptions( int camo, int lens, int reticle, int tag ) int calcweaponoptions( int camo, int lens, int reticle ) int calcweaponoptions( int slotIndex, int weaponType ) |
Summary:
|
| int calcplayeroptions( int ) | Summary:
|
| void setplayerrenderoptions( int ) | Summary:
|
| void nextplayerrenderoption( string ) | Summary:
|
| void bbclasschoice( int, string, string ) | Summary:
|
| void sethighlighted() | Summary:
|
| void takeweapon( string ) | Summary: Removes the first occurrence of the specified weapon from a client. player takeweapon("mp7_mp");
|
| bool isthrowinggrenade() | Summary: Returns true if the specified client is throwing a grenade. if (player isthrowinggrenade()) |
| void forcegrenadethrow() | Summary: Forces the specified client to throw a grenade. player forcegrenadethrow(); |
| bool isfiring() | Summary: Returns true if the specified client is shooting. if (player isfiring()) |
| bool ismeleeing() | Summary: Returns true if the specified client is meleeing. if (player ismeleeing()) |
| bool isswitchingweapons() | Summary: Returns true if the specified client is switching weapons. if (player isswitchingweapons()) |
| bool isreloading() | Summary: Returns true if the specified client is reloading. if (player isreloading()) |
| void takeallweapons() | Summary: Removes all weapons from the specified client including the default melee knife. player takeallweapons(); |
| bool isinmovemode() | Summary:
|
| string getcurrentweapon() | Summary: Returns the specified clients currently held weapon. currentWeapon = player getcurrentweapon(); |
| float getcurrentweaponspinlerp() | Summary:
|
| void setcurrentweaponspinlerp( float ) | Summary:
|
| string getcurrentweaponaltweapon() | Summary:
|
| int isweaponoverheating( int ) | Summary: Returns 1 if the specified client's slot index is overheating. if (player isweaponoverheating(0)) |
| void setweaponoverheating( int, float ) | Summary: Sets the specified clients slot index overheat to a percentage. player setweaponoverheating(0, 99); |
| string getcurrentoffhand() | Summary: Returns the current lethal/tactical or equipment. offhandWeapon = player getcurrentoffhand(); |
| bool isusingoffhand() | Summary: Returns true if the specified client is using their offhand weapon. if (player isusingoffhand()) |
| void forceoffhandend() | Summary: Forces the specified client to use their offhand weapon. player forceoffhandend() |
| bool hasweapon( string ) | Summary: Returns true if the specified client has the specified weapon. if (player hasweapon("mp7_mp"))
|
| void switchtoweapon() | Summary: Forces the specified weapon to switch to the specified weapon. player switchtoweapon("mp7_mp");
|
| void switchtoweaponimmediate() | Summary:
|
| bool switchtooffhand( string ) | Summary: Switch the player's offhand weapon |
| void weaponplayejectbrass() | Summary:
|
| int getlockonradius() | Summary:
|
| int getlockonspeed() | Summary:
|
| void givestartammo( string ) | Summary: Sets the specified clients' specified weapon to the starting ammunition amount. player givestartammo("mp7_mp");
|
| void givemaxammo( string ) | Summary: Gives the specified clients' specified weapon maximum ammunition. player givemaxammo("mp7_mp");
|
| float getfractionstartammo( string ) | Summary: Returns a float of the specified weapons starting ammunition. fractionStartAmmo = player getfractionstartammo("mp7_mp");
|
| float getfractionmaxammo( string ) | Summary: Returns a float of the specified weapons maximum ammunition. fractionMaxAmmo = player getfractionmaxammo("mp7_mp");
|
| void setweaponheatpercent( string, float ) | Summary:
|
| void setorigin( vector ) | Summary: Teleports the player to a location defined by x, y and z coordinate values. player setorigin((900, -78, 2055.1)); |
| void setvelocity( vector ) | Summary: Set the player's velocity |
| void setplayerangles( vector ) | Summary: Changes the player's view direction via x and y coordinate values. player setplayerangles(anotherplayer.angles); |
| vector getplayerangles() | Summary: Get the player's angles |
| vector getgunangles() | Summary:
|
| vector getplayercamerapos() | Summary:
|
| void cameraactivate( int ) | Summary:
|
| void camerasetposition( vector, vector ) | Summary:
|
| void camerasetlookat( entity, vector ) | Summary:
|
| void gamepadusedlast() | Summary:
|
| int usebuttonpressed() | Summary: Returns 1 if the use button is pressed otherwise 0. if (player usebuttonpressed()) |
| int changeseatbuttonpressed() | Summary:
|
| int attackbuttonpressed() | Summary: Returns 1 if the shooting button is pressed otherwise 0. if (player attackbuttonpressed()) |
| int actionslotonebuttonpressed() | Summary:
|
| int actionslottwobuttonpressed() | Summary:
|
| int actionslotthreebuttonpressed() | Summary: 1 if the left inventory button is pressed otherwise 0. if (player actionslotthreebuttonpressed()) |
| int actionslotfourbuttonpressed() | Summary:
|
| int adsbuttonpressed() | Summary: Returns 1 if the aiming down the sights button is pressed otherwise 0. if (player adsbuttonpressed()) |
| int throwbuttonpressed() | Summary:
|
| int meleebuttonpressed() | Summary: Returns 1 if the melee button is pressed otherwise 0. if (player meleebuttonpressed()) |
| int jumpbuttonpressed() | Summary: Returns 1 if the jumping button is pressed otherwise 0. if (player jumpbuttonpressed()) |
| int stancebuttonpressed() | Summary:
|
| int fragbuttonpressed() | Summary: Returns 1 if the lethal grenade button is pressed otherwise 0. if (player fragbuttonpressed()) |
| int secondaryoffhandbuttonpressed() | Summary:
|
| int inventorybuttonpressed() | Summary:
|
| int sprintbuttonpressed() | Summary:
|
| void sprintuprequired() | Summary:
|
| float playerads() | Summary: Return the player's weapon position fraction. |
| void pingplayer() | Summary: Flashes a player on their teammate's compasses |
| void setviewmodel( string ) | Summary: Set the player's current view model. |
| conststring getviewmodel() | Summary: Get the viewmodel name for the given player |
| void setoffhandsecondaryclass( string ) | Summary: Set whether player can use smoke grenades or flashbangs. |
| conststring getoffhandsecondaryclass() | Summary: Gets the name (either "smoke" or "flash") that toggle is set to. |
| string setoffhandprimaryclass( string ) | Summary:
|
| void beginlocationselection() | Summary: Causes the player to begin selecting a location. A map HUD element should be visible for them to see where they're selecting. Works with endlocationselection(). When the user confirms or cancels, they will recieve a notify "confirm_location" or "cancel_location". The former notify contains the location they selected, as a vector. |
| void beginlocationairstrikeselection() | Summary:
|
| void beginlocationmortarselection() | Summary:
|
| void beginlocationartilleryselection() | Summary:
|
| void beginlocationcomlinkselection() | Summary:
|
| void beginlocationnapalmselection() | Summary:
|
| void endlocationselection() | Summary: Causes the player to leave location selection mode. Works with beginlocationselection(). |
| void clientsyssetstate( int, string ) | Summary:
|
| void weaponlockstart( entity ) | Summary: Begins player's weapon lockon sequence (hud effects, etc). Will clear any existing hard lock. Use WeaponLockFinalize() to complete lock. |
| void weaponlockfinalize( entity ) | Summary: Locks player's weapon onto an entity. Implies WeaponLockStart(), so this may be called to jump to a hard lock. |
| void weaponlockfree() | Summary: Clears player's weapon lock. |
| void weaponlocktargettooclose( int ) | Summary: When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that they are too close. |
| void weaponlocknoclearance( int ) | Summary: When set true, the player will be unable to fire their lockon weapon, and will recieve a hint print telling them that there is an obstruction. |
| void buttonpressed() | Summary: Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K |
| void giveweaponnextattachment() | Summary:
|
| void givenextbaseweapon() | Summary:
|
| void getnormalizedmovement() | Summary:
|
| void getnormalizedcameramovement() | Summary:
|
| void sayall() | Summary: Write a client chat message from this client to everybody |
| void sayteam() | Summary: Write a client chat message from this client to everybody on their team |
| void setspawnweapon( string ) | Summary: Set the weapon that this player will spawn with |
| void initialweaponraise( string ) | Summary:
|
| void seteverhadweaponall( int ) | Summary:
|
| void dropitem( string, constlowercasestring ) | Summary: Drop an item with the given item name |
| void dropscavengeritem( string ) | Summary:
|
| int hasagrenadepulledback() | Summary:
|
| bool finishplayerdamage( entity, entity, int, string, vector, vector, conststring, int, int ) | Summary: Does damage to a player - usually as part of the damage callback |
| void finishmeleehit( entity, string, vector, vector, int, int, int ) | Summary:
|
| void reviveplayer() | Summary:
|
| void undolaststand() | Summary:
|
| void suicide() | Summary: Kills the specified player. player suicide(); |
| void turnedhuman() | Summary:
|
| bool isinvehicle() | Summary:
|
| bool isremotecontrolling() | Summary:
|
| bool isweaponviewonlylinked() | Summary:
|
| int allowstand( int ) | Summary: Sets whether the player can stand up |
| int allowcrouch( int ) | Summary: Sets whether the player can crouch |
| int allowprone( int ) | Summary: Sets whether the player can go prone |
| int allowlean( int ) | Summary: Sets whether the player can lean |
| entity getvehicleoccupied() | Summary:
|
| array getfriendlies( int ) | Summary:
|
| array getenemies( int ) | Summary:
|
| int openmenu( string ) | Summary: Open a menu for this player |
| int openmenunomouse( string ) | Summary: Open a menu for this player, with no mouse control. |
| void closemenu() | Summary: Close the current player menu |
| void closeingamemenu() | Summary: close the in game menu for this client. |
| void freezecontrols( int ) | Summary: Freezes/unfreezes the controls of the specified player player freezecontrols(1); |
| void freezecontrolsallowlook( int ) | Summary:
|
| int arecontrolsfrozen() | Summary:
|
| void disableusability() | Summary:
|
| void enableusability() | Summary:
|
| void disableweapons() | Summary: Disable the player's weapon |
| void enableweapons() | Summary: Enable the player's weapons |
| void disabledeathstreak() | Summary:
|
| void enabledeathstreak() | Summary:
|
| int deathstreakactive() | Summary:
|
| void disableoffhandweapons() | Summary:
|
| void enableoffhandweapons() | Summary:
|
| void disableweaponcycling() | Summary:
|
| void enableweaponcycling() | Summary:
|
| void revive() | Summary:
|
| void setlaststandprevweap( string ) | Summary:
|
| void setreverb() | Summary: Set the sound reverberation for the player |
| void deactivatereverb() | Summary: deactivate the sound reverberation for the player on the given priority level |
| void setchannelvolumes() | Summary: Set the channel volumes for the player (a way of fading volumes by type) |
| void deactivatechannelvolumes() | Summary: deactivate the channel volumes for the player on the given priority level |
| int setweaponammoclip( string, int ) | Summary: Set the weapon clip ammunition for the given weapon. |
| void setweaponammostock( string, int ) | Summary: Set the ammunition stockpile for the given weapon. |
| int getweaponammoclip( string ) | Summary: Gets the amount of ammo left in the player's current weapon clip. |
| int getweaponammostock( string ) | Summary: Gets the ammunition stockpile for the given weapon. |
| int anyammoforweaponmodes( string ) | Summary: Returns true if the player has any ammo available for the weapon or any of it's alt-modes (grenade launcher, etc). |
| void iprintln() | Summary: Prints text for the specified player only in the killfeed. player iprintln("Hello, World!");
|
| void iprintlnbold() | Summary: Prints text for the specified player only in the middle of the screen. If the player entity is omitted, the text will be printed for every player in the lobby. player iprintlnBold("Hello, World!");
|
| void spawn( vector, vector ) | Summary: Spawns a new entity and returns a reference to the entity. ufo = spawn("script_model", self.origin);
|
| void setentertime( int ) | Summary:
|
| void cloneplayer( int ) | Summary: Creates a clone of the specified player at current position. player cloneplayer(); |
| void setclientfov( float ) | Summary: Sets the field of view for a player. player setclientfov("90");
|
| void setclientthirdperson( int ) | Summary: Enables/disables 3rd person view for the specified player player setclientthirdperson(1); |
| void setclientthirdpersonangle() | Summary:
|
| void setclientcompass() | Summary:
|
| void setclientscriptmainmenu() | Summary:
|
| void setclientcgobjectivetext() | Summary:
|
| void setclientplayersprinttime() | Summary:
|
| void setclientnumlives() | Summary:
|
| void setclientdrawtalk() | Summary:
|
| void setclientammocounterhide() | Summary:
|
| void setclientminiscoreboardhide() | Summary:
|
| void setclienthudhardcore() | Summary:
|
| void setclientplayerpushamount() | Summary:
|
| void setclientaimlockonpitchstrength() | Summary:
|
| void setclientuivisibilityflag( string, int ) | Summary:
|
| void setclientprofilevar( string, string ) | Summary:
|
| void playclientairstrike( vector, int, string, string, int, string, int ) | Summary:
|
| void playclientnapalm( vector, int, string, string, int, string, int ) | Summary:
|
| void setcurrentspectatorclient( entity ) | Summary:
|
| void relinktoturret( entity ) | Summary:
|
| void carryturret( entity, vector, vector ) | Summary:
|
| void stopcarryturret( entity, vector, vector ) | Summary:
|
| bool iscarryingturret() | Summary:
|
| array canplayerplaceturret( entity ) | Summary:
|
| void setplacementhint( int ) | Summary:
|
| void linkguidedmissilecamera() | Summary:
|
| void unlinkguidedmissilecamera() | Summary:
|
| void gpsjammeractive() | Summary:
|
| void gpsjammerinactive() | Summary:
|
| void spawnprotectionactive() | Summary:
|
| void spawnprotectioninactive() | Summary:
|
| void dualgrenadesactive() | Summary:
|
| void dualgrenadesinactive() | Summary:
|
| void linktomissile( entity, int ) | Summary:
|
| void unlinkfrommissile() | Summary:
|
| array canplaceriotshield( conststring ) | Summary:
|
| void setheldweaponmodel( int ) | Summary:
|
| void setriotshieldfailhint() | Summary:
|
| array canplayerplacevehicle( float, float, float, float, float, float ) | Summary:
|
| void remotecontrolturret( entity ) | Summary:
|
| void remotecontrolturretoff( entity ) | Summary:
|
| void recordkillstreakevent( int ) | Summary:
|
| void recordkillstreakendevent( int ) | Summary:
|
| void recordgameevent( string ) | Summary:
|
| void recordkillmodifier( string ) | Summary:
|
| void recordmedal( string ) | Summary:
|
| void recordloadoutandperks() | Summary:
|
| void recordloadoutperksandkillstreaks( string, string, string, string, int, int, int ) | Summary:
|
| void recordmultikill( int ) | Summary:
|
| void incrementlifestat() | Summary:
|
| void incrementplayerstat( string, int ) | Summary:
|
| void recordplayerdeathzombies() | Summary:
|
| void recordplayerdownzombies( string ) | Summary:
|
| void recordplayerrevivezombies( entity ) | Summary:
|
| void recordzombiezone( string, string ) | Summary:
|
| int islookingat( entity ) | Summary: Returns true if the entity is the same as the player's lookat entity. |
| void playlocalsound( string ) | Summary: Plays a sound locally to the player |
| void stoplocalsound( string ) | Summary: Stops all instances of a local soundalias running on a player. |
| int istalking() | Summary: Returns true if the player is talking via voice chat |
| void allowspectateteam( team, int ) | Summary: Set whether the player can spectate the given team. |
| int getguid() | Summary:
|
| string getxuid() | Summary:
|
| int ishost() | Summary: Returns 1 if the specified player is host, otherwise 0. if (player isHost()) |
| int islocaltohost() | Summary:
|
| int allowads( int ) | Summary: Sets whether the player can switch to ADS |
| int allowjump( int ) | Summary: Sets whether the player can jump |
| int allowsprint( int ) | Summary: Sets whether the player can sprint |
| int allowmelee( int ) | Summary: Sets whether the player can melee |
| int forceslick( int ) | Summary:
|
| void setsprintduration( float ) | Summary:
|
| void setsprintcooldown( float ) | Summary:
|
| void setspreadoverride( int ) | Summary: Sets the player fixed spread value |
| void resetspreadoverride() | Summary: Resets the player spread value to the ones of the weapon in use. |
| void setactionslot( int, string, string ) | Summary: Sets the option to perform when the player executes (for example) "+actionslot 1". |
| string getinventoryweapon() | Summary:
|
| void setinventoryweapon( string ) | Summary:
|
| array getweaponslist( int ) | Summary: Gets an array of all weapons that the player has. Includes any alt-mode weapons (ex: m203_m4) |
| array getweaponslistprimaries() | Summary: Gets an array of all primary weapons that the player has. |
| void startrevive() | Summary:
|
| void stoprevive() | Summary:
|
| void applyknockback( int, vector ) | Summary:
|
| void setperk( string ) | Summary: Gives the player the specified perk player setperk("specialty_fastladderclimb");
|
| bool hasperk( string ) | Summary: Returns true if the player has the specified perk otherwise false if (player hasperk("specialty_fastladderclimb")) |
| array getperks() | Summary:
|
| void clearperks() | Summary: Removes all perks from the player player clearperks(); |
| void unsetperk( string ) | Summary: Removes a specific perk from the player player unsetperk("specialty_fastladderclimb");
|
| void setrank( int, int ) | Summary: Sets the player's rank and prestige level player setRank(level.maxRank, level.maxPrestige); |
| void enableinvulnerability() | Summary: Enables god mode/invincibility for the specific player player enableinvulnerability(); |
| void disableinvulnerability() | Summary: Disables god mode/invincibility for the specific player player disableinvulnerability(); |
| void enableafterlife() | Summary:
|
| void disableafterlife() | Summary:
|
| bool addgoal( vector, float, int, conststring, conststring ) | Summary:
|
| void cancelgoal( conststring ) | Summary:
|
| bool atgoal( conststring ) | Summary:
|
| bool hasgoal( conststring ) | Summary:
|
| vector getgoal( conststring ) | Summary:
|
| void pressusebutton( float ) | Summary:
|
| void pressattackbutton( int ) | Summary:
|
| void pressdtpbutton() | Summary:
|
| bool throwgrenade( string, vector ) | Summary: Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first. |
| float getlookaheaddist() | Summary:
|
| vector getlookaheaddir() | Summary:
|
| void lookat( vector ) | Summary:
|
| void clearlookat() | Summary:
|
| void allowattack( int ) | Summary:
|
| void pressads( int ) | Summary:
|
| void pressmelee() | Summary:
|
| array getthreats( float ) | Summary:
|
| vector predictposition( entity, int ) | Summary:
|
| bool botsighttracepassed( entity, vector ) | Summary:
|
| void botsetfailsa( pathnode ) | Summary:
|
| void botsetdefaultclass( int, string ) | Summary:
|
| void botclassadditem( int, string ) | Summary:
|
| void botclasssetweaponoption( int, int, string, int ) | Summary:
|
| void botclassaddattachment( int, string, string, string ) | Summary:
|
| void botleavegame() | Summary:
|
| int issplitscreen() | Summary: Returns true if the game is a splitscreen game |
| int isplayeronsamemachine( entity ) | Summary:
|
| void playerknockback( int ) | Summary:
|
| float getplayerviewheight() | Summary: Get the player's view height |
| void ishostforbots() | Summary:
|
| void murderline( vector, vector, string ) | Summary:
|
| void setoffhandvisible( int ) | Summary:
|
| void fakedamagefrom( vector ) | Summary:
|
| int getsnapshotackindex() | Summary:
|
| string getleagueteamid() | Summary:
|
Script Entity Methods
| Prototype | Description |
|---|---|
| void moveto( vector ) | Summary: Move this entity to the given point. |
| void movex( float ) | Summary: Move this entity to the given world x value |
| void movey( float ) | Summary: move this entity to the given world y value |
| void movez( float ) | Summary: Move this entity to the given world z value |
| void movegravity( vector, float ) | Summary: Fling this entity. |
| void moveslide( vector, float, vector ) | Summary:
|
| void stopmoveslide() | Summary:
|
| void rotateto( vector ) | Summary: Rotate this entity to the given world rotation value |
| void rotatepitch( float ) | Summary: Rotate this entity to the given pitch |
| void rotateyaw( float ) | Summary: Rotate this entity to the given yaw |
| void rotateroll( float ) | Summary: Rotate this entity to the given roll angle |
| void devaddpitch( float ) | Summary: Add pitch in local space. This is just for development purposes and doesn't interpolate |
| void devaddyaw( float ) | Summary: Add yaw in local space. This is just for development purposes and doesn't interpolate |
| void devaddroll( float ) | Summary: Add yaw in local space. This is just for development purposes and doesn't interpolate |
| void vibrate( vector, float, float, float ) | Summary: Causes a script entity to vibrate, rotating around its origin, along a given vector dir |
| void rotatevelocity( vector ) | Summary: Rotate this entity at a particular velocity for a given time |
| void solid() | Summary: Set the solid flag, so that this object is collidable. |
| void notsolid() | Summary: Unsets the solid flag, so that this object is no longer collidable. |
| void setcandamage( int ) | Summary: Set the candamage flag for this entity - this means that it can respond to notifies from bullets and grenade hits |
| void physicslaunch( vector, vector ) | Summary: Permanently turn this entity into a physics object with an intial force vector at the specified point. |
| void setcheapflag( int ) | Summary:
|
| void ignorecheapentityflag( int ) | Summary:
|
Script Vehicle Methods
| Prototype | Description |
|---|---|
| void attachpath( entityref ) | Summary: Attaches this vehicle to the given path. |
| string vehgetmodel() | Summary:
|
| array getattachpos( entityref ) | Summary: Returns the origin and angles if the vehicle were to be attached to the path. The origin and angles are returned as a vector array of size 2. Origin is 1st and angles is 2nd. |
| void startpath() | Summary: Starts the vehicle following this path. |
| entitynum drivepath( int ) | Summary:
|
| void pathmove( vector, vector, vector ) | Summary:
|
| void pathmoveclear() | Summary:
|
| void pathfixedoffset( vector ) | Summary:
|
| void pathfixedoffsetclear() | Summary:
|
| void pathvariableoffset( vector, float ) | Summary:
|
| void pathvariableoffsetclear() | Summary:
|
| vector getpathfixedoffset() | Summary:
|
| vector getpathvariableoffset() | Summary:
|
| void setdrivepathphysicsscale( float ) | Summary:
|
| void setswitchnode( entityref, entityref ) | Summary: Sets a switch node for this vehicle. |
| void setspeed( float, float, float ) | Summary: Sets the speed and acceleration for this vehicle. |
| void setspeedimmediate( float, float, float ) | Summary: Sets the speed and acceleration for this vehicle instantaneously. Direction will be toward the goal direction if there is a goal, otherwise the current direction. |
| float getspeed() | Summary: Gets the current speed in inches per second. |
| float getspeedmph() | Summary:
|
| float getgoalspeedmph() | Summary: Gets the goal speed in miles per hour. |
| void setbrake( float ) | Summary:
|
| float getbrake() | Summary:
|
| float gethandbrake() | Summary:
|
| float getscriptbrake() | Summary:
|
| void setacceleration( float ) | Summary: Sets the acceleration for this vehicle. |
| void setdeceleration( float ) | Summary: Sets the deceleration for this vehicle. |
| void resumespeed( float ) | Summary: Sets the vehicle to resume its path speed. |
| void setyawspeed( float, float, float, float ) | Summary: Sets the yaw speed for this vehicle. |
| void setmaxpitchroll( float, float ) | Summary: Sets max pitch and roll angle for this vehicle. |
| void setturningability( float ) | Summary: If this is higher, helicopters can make sharper turns to match goal positions better. |
| void setjitterparams( vector, float, float ) | Summary: Set the jitter parameters. Set everything to 0 to stop jittering. Vehicle ignores jitter parameters when on ground |
| void setairresistance( float ) | Summary: Sets the speed at which air resistance maxes out. |
| float getsteering() | Summary:
|
| float getthrottle() | Summary:
|
| void setphysangles( vector ) | Summary:
|
| void sethoverparams( float, float, float ) | Summary: Set the hovering parameters. |
| void joltbody( vector, float, float, float ) | Summary: Jolts the vehicle. |
| void freevehicle() | Summary: Frees this vehicle instance. |
| string getwheelsurface( conststring ) | Summary: Returns the surface type of the given wheel as a string. |
| entity getvehicleowner() | Summary: Returns the owner of this particular vehicle. |
| int isvehicleusable() | Summary:
|
| void makevehicleusable() | Summary: Sets this vehicle to be usable by the player |
| void makevehicleunusable() | Summary: Sets this vehicle to be not usable by the player |
| void usevehicle( entity, int, int ) | Summary:
|
| void setviewclamp( entity, float, float, float, float ) | Summary:
|
| void resetviewclamp( entity, entity ) | Summary:
|
| void setvehiclelookattext( conststring, constistring ) | Summary: Set look at text for vehicle. |
| void setneargoalnotifydist( float ) | Summary: Set distance near goal at which near_goal notification should be sent once. |
| bool setvehgoalpos( vector, int, int, int ) | Summary: Set the target position for this vehicle. |
| void clearvehgoalpos() | Summary:
|
| void setplanegoalpos( float, vector ) | Summary:
|
| void setplanebarrelroll( int, float ) | Summary:
|
| void setgoalyaw( float ) | Summary: Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw |
| void cleargoalyaw() | Summary: Clear the goal yaw direction for this vehicle. |
| void settargetyaw( float ) | Summary: Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. |
| void cleartargetyaw() | Summary: Clear the target yaw direction for this vehicle. |
| void setlookatent( entity ) | Summary: Set the entity this vehicle will orient towards. |
| void clearlookatent() | Summary: Clear the entity the vehicle is orienting towards. |
| void takeplayercontrol() | Summary:
|
| void returnplayercontrol() | Summary: After controlling a vehicle from script using something like setvehgoalpos(), if the vehicle is being driven by a player, you call this function to return control of the vehicle to the player. |
| void setturrettargetvec( vector ) | Summary: Set the target position for this vehicle turret. |
| void setturrettargetent( entity, vector ) | Summary: Set the target entity for this vehicle turret. |
| void clearturrettarget() | Summary: Clear the target for the vehicle turret. |
| void setgunnertargetvec( vector, int ) | Summary:
|
| vector getgunnertargetvec( int ) | Summary:
|
| void setgunnertargetent( entity, vector, int ) | Summary:
|
| void cleargunnertarget( int ) | Summary:
|
| void setgunnerturretontargetrange( int, float ) | Summary:
|
| entity getgunnertargetent( int ) | Summary:
|
| float getgunneranimpitch( int ) | Summary:
|
| float getgunneranimyaw( int ) | Summary:
|
| void setvehweapon( string ) | Summary: Set the vehicle's weapon |
| entity fireweapon( entity, vector ) | Summary: Fire the vehicle's weapon |
| entity firegunnerweapon( int, entity ) | Summary:
|
| void stopfireweapon() | Summary:
|
| int isturretready() | Summary: Query whether this vehicle's turret is ready for firing |
| void setvehmaxspeed( float ) | Summary:
|
| array getvehoccupants() | Summary:
|
| entity getseatoccupant( int ) | Summary:
|
| int getoccupantseat( entity ) | Summary:
|
| void setseatoccupied( int, int ) | Summary:
|
| string seatgetweapon( int ) | Summary:
|
| vector getseatfiringorigin( int ) | Summary:
|
| vector getseatfiringangles( int ) | Summary:
|
| bool isgunnerfiring( int ) | Summary:
|
| void disablegunnerfiring( int, int ) | Summary:
|
| entity finishvehicledamage( entity, entity, int, string, vector, vector, conststring, int, int, int, conststring, int ) | Summary:
|
| void finishvehicleradiusdamage( entity, entity, float, float, int, string, vector, float, float, vector, int ) | Summary:
|
| bool isvehicleimmunetodamage( int, string, string ) | Summary:
|
| void setdefaultpitch( float ) | Summary:
|
| void cleardefaultpitch() | Summary:
|
| vector getangularvelocity() | Summary:
|
| void setangularvelocity( vector ) | Summary:
|
| void setvehvelocity( vector ) | Summary:
|
| void cancelaimove() | Summary:
|
| void setvehicletype( string ) | Summary:
|
| vector getphysacceleration() | Summary:
|
| void setphysacceleration( vector ) | Summary:
|
| void drawtrajectory() | Summary:
|
| void setrotorspeed( float ) | Summary:
|
| float getmaxspeed( int ) | Summary:
|
| void setmantleena( int ) | Summary:
|
| void setvehicleavoidance( int, float, int ) | Summary:
|
| int getvehicleavoidance() | Summary:
|
| bool vehcansee( entity, int ) | Summary:
|
| bool vehseenrecently( entity, float ) | Summary:
|
| void vehclearenemy() | Summary:
|
| void vehs( entity, float ) | Summary:
|
| void vehclearentitytarget() | Summary:
|
| float getturretheatvalue( int ) | Summary:
|
| bool isvehicleturretoverheating( int ) | Summary:
|
| void setpathtransitiontime( float ) | Summary:
|
| array getvehicleavoidancenodes( float ) | Summary:
|
| void makesentient() | Summary:
|
Hud Element Methods
| Prototype | Description |
|---|---|
| void settext( string text ) | Summary: Set HUD text for this element. hudelem settext( "Hello, World!" ); |
| void clearalltextafterhudelem() | Summary: Clear the config strings for the unique text set after this string. This is intended for development use only. hudelem clearalltextafterhudelem(); |
| void setshader( string shader, int width, int height ) | Summary: Set the material for this Hud Element hudelem setshader( "material", 15, 15 ); |
| void settargetent( entity, entity ) | Summary: Set the entity that this waypoint should target. In MP, entity should already be a broadcasting entity, as with Objective_OnEntity(). |
| void cleartargetent() | Summary: Clear this waypoint from targetting an entity. hudelem cleartargetent(); |
| void settimer( float time ) | Summary: Set a timer HUD element to count down hudelem settimer( level.counter ); |
| void settimerup( float time ) | Summary: Set a timer HUD element to count up hudelem settimerup( level.counter ); |
| void settenthstimer( float time ) | Summary: Set a timer HUD element to count down in tenths of a second hudelem settenthstimer( camtime ); |
| void settenthstimerup( float ) | Summary: Set a timer HUD element to count up in tenths of a second hudelem settenthstimerup( .1 ); |
| void setclock() | Summary: Set a clock HUD element to count down over a time period. |
| void setclockup() | Summary: Set a clock HUD element to count up over a time period. |
| void setvalue( float ) | Summary: Set a value HUD element to a given value. |
| void setwaypoint( int, string, int, int ) | Summary: Sets a hud element to be a waypoint. |
| void fadeovertime( float ) | Summary: Set a hud element to transition in color (or alpha) over time. Normally setting the color (or alpha) of an element causes an immediate visual change. However, if the color (or alpha) gets set within <time> after calling fadeOverTime, then the hud element will transition to the new color over the remaining <time>. |
| void scaleovertime( float, int, int ) | Summary: Set a hud element to scale over time. |
| void moveovertime( float ) | Summary: Set a hud element to move over time. |
| void reset() | Summary: Reset a HUD element to its default state. |
| void destroy() | Summary: Remove this Hud element altogether. |
| void setpulsefx( int, int, int ) | Summary: Set the hudelem string to display with a "Pulse" effect. |
| void setcod7decodefx( int, int, int ) | Summary:
|
| void setredactfx( int, int, int, int ) | Summary:
|
| void settypewriterfx( int, int, int ) | Summary:
|
| int gettextwidth() | Summary:
|
| void setperks( entity, entity ) | Summary:
|
| void setplayernamestring( entity, entity ) | Summary: Set the player name string for a HUD element |
| void setmapnamestring( string ) | Summary: Set the map name string |
| void setgametypestring( string ) | Summary: Set the game type string for the game |
| void setwargamedata() | Summary:
|
| void changefontscaleovertime( float time ) | Summary: Set a hud element to transition in fontScale over time. Normally setting the fontScale of an element causes an immediate visual change. However, if the fontScale gets set within <time> after calling ChangeFontScaleOverTime, then the hud element will transition to the new fontScale over the remaining <time>. |
Helicopter Methods
| Prototype | Description |
|---|---|
| void freehelicopter() | Summary:
|
| void setspeed() | Summary: Sets the speed and acceleration for this vehicle. |
| float getspeed() | Summary: Gets the current speed in inches per second. |
| float getspeedmph() | Summary:
|
| void resumespeed( float ) | Summary: Sets the vehicle to resume its path speed. |
| void setyawspeed( float, float, float, float ) | Summary: Sets the yaw speed for this vehicle. |
| void setmaxpitchroll( float, float ) | Summary: Sets max pitch and roll angle for this vehicle. |
| void setturningability( float ) | Summary: If this is higher, helicopters can make sharper turns to match goal positions better. |
| void setairresistance( float ) | Summary: Sets the speed at which air resistance maxes out. |
| void sethoverparams( float, float, float ) | Summary: Set the hovering parameters. |
| void setneargoalnotifydist( float ) | Summary: Set distance near goal at which near_goal notification should be sent once. |
| bool setvehgoalpos( vector, int, int, int ) | Summary: Set the target position for this vehicle. |
| void setgoalyaw( float ) | Summary: Set the goal yaw direction for this vehicle. Goal yaw is ignored if vehicle doesn't stop at goal. Lookat entity has priority over goal yaw |
| void cleargoalyaw() | Summary: Clear the goal yaw direction for this vehicle. |
| void settargetyaw( float ) | Summary: Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. |
| void cleartargetyaw() | Summary: Clear the target yaw direction for this vehicle. |
| void setlookatent( entity ) | Summary: Set the entity this vehicle will orient towards. |
| void clearlookatent() | Summary: Clear the entity the vehicle is orienting towards. |
| void setvehweapon( string ) | Summary: Set the vehicle's weapon |
| entity fireweapon( entity, vector ) | Summary: Fire the vehicle's weapon |
| void stopfireweapon() | Summary:
|
| void setturrettargetvec( vector ) | Summary: Set the target position for this vehicle turret. |
| void setturrettargetent( entity, vector ) | Summary: Set the target entity for this vehicle turret. |
| void clearturrettarget() | Summary: Clear the target for the vehicle turret. |
| void setdamagestage( int ) | Summary:
|
| void setheliheightlock( int ) | Summary:
|
| float getheliheightlockheight( vector ) | Summary:
|
| int isinsideheliheightlock() | Summary:
|
| void setheightlockoffset() | Summary:
|
Actor Methods
| Prototype | Description |
|---|---|
| void startcoverarrival() | Summary: Runs cover arrival animscript on an actor. |
| void starttraversearrival() | Summary: Runs traverse arrival animscript on an actor. |
| entity melee( vector ) | Summary: Makes this actor melee attack. Returns the entity hit, if any. |
| bool reacquirestep( float ) | Summary: Do side step move to safe place left or right while facing enemy. |
| void findreacquirenode() | Summary: Finds a reacquire node when exposed. |
| pathnode getreacquirenode() | Summary: Gets the reacquire node of this actor. |
| bool usereacquirenode( pathnode ) | Summary: Use the given reacquire node. |
| void findreacquiredirectpath( int ) | Summary: Finds a path directly to the enemy. Call ReacquireMove to use the path. |
| bool trimpathtoattack() | Summary: Trims the path to attack. |
| bool reacquiremove() | Summary: Start the reaquire move |
| void findreacquireproximatepath( int ) | Summary: Finds a path to a point that can see the enemy without leaving goal. Call ReacquireMove to use the path. |
| void flagenemyunattackable() | Summary: Set this actor not to attack its current enemy. |
| void clearpitchorient() | Summary: Clear pitch orientation |
| void setpitchorient() | Summary:
|
| void setlookatanimnodes( anim, anim, anim ) | Summary: Set the animation nodes for this actor for looking at things to the left and right. |
| void setlookat( vector, float ) | Summary: Set the actor to exit the prone position. |
| void setlookatyawlimits( float, float, float ) | Summary: Set the limits of what this actor can look at. |
| void stoplookat( float ) | Summary: Make this actor stop looking at its current look at target. |
| bool cansee( entity, int ) | Summary: Check to see if the actor can see the given entity. |
| bool seerecently( entity, float ) | Summary:
|
| int lastknowntime( entity ) | Summary:
|
| vector lastknownpos( entity ) | Summary:
|
| int maymovetopoint( vector, int ) | Summary: Check whether the actor can move to a given point. |
| int maymovefrompointtopoint( vector, vector, int ) | Summary: Check whether the actor can move from a given point to a given point. Does not check friendly fire and in goal radius unlike maymovetopoint |
| int teleport( vector, vector ) | Summary: Teleport the actor to a new position with the given origin and angles. |
| float withinapproxpathdist( float ) | Summary: Check whether the actor is within an approximate distance to his path |
| int ispathdirect() | Summary: Check whether the actor's current path is direct |
| void allowedstances( conststring, conststring, conststring ) | Summary: Sets the list of the actor's allowed stances. |
| int isstanceallowed( conststring ) | Summary: Checks whether this actor can go to the given stance. |
| void traversemode( conststring ) | Summary: Set the traverse mode of this actor. |
| void animmode( conststring, int ) | Summary: Set the way that animation deltas are interpreted by the game engine |
| void orientmode( conststring, vector, int ) | Summary: Set the orient mode of this actor. |
| conststring getorientmode( string ) | Summary:
|
| float getmotionangle() | Summary: Get the motion angle in degrees for this actor. |
| bool shouldfacemotion() | Summary:
|
| void clearmovehistory() | Summary:
|
| vector getmovehistoryaverage() | Summary:
|
| vector getanglestolikelyenemypath() | Summary: Get the angles towards the direction an enemy is most likely to appear. Returns undefined if a good guess can't be made. |
| void lerpposition( vector, vector ) | Summary: Interpolate an actor's position, and angles. |
| void predictoriginandangles() | Summary: Use physics to predict the actor's origin and angles |
| void predictanim() | Summary:
|
| void gethitenttype() | Summary: Get the type of entity that the actor has hit. Can be 'hit', 'obstacle' or 'world'. |
| float gethityaw() | Summary: Get the direction in degrees that the player has hit an obstacle at. Returns an error if nothing was hit. |
| void getgroundenttype() | Summary: Get the entity type of the 'ground' that the actor is on. |
| int isdeflected() | Summary: Check if the actor has been deflected. |
| void animcustom( func, func ) | Summary: Sets the anim script for this actor. |
| int canattackenemynode() | Summary: Checks if this actor can attack its enemies node. |
| int getpathlength() | Summary:
|
| int calcpathlength( vector ) | Summary:
|
| pathnode getnegotiationstartnode() | Summary: Gets the next negotiation node for this actor |
| pathnode getnegotiationendnode() | Summary: Gets the end negotiation node for this actor |
| int canseepathgoal() | Summary:
|
| bool checkprone( vector, float, int ) | Summary: Returns true when a character can go prone at the specified position. Specifically setup for use by AI characters. |
| void pushplayer( int ) | Summary: Set whether this character can push the player |
| void setgoalnode( pathnode ) | Summary: Set this actor's goal node. |
| void setgoalpos( vector, vector ) | Summary: Set this actor's goal position. |
| void setgoalentity( entity ) | Summary:
|
| void setgoalvolume( entity ) | Summary: Set this actor's goal volume. This cannot be set if a goal entity is set. |
| void setgoalvolumeauto( entity ) | Summary:
|
| entity getgoalvolume() | Summary: Get this actor's goal volume. |
| void cleargoalvolume() | Summary: Clears this actor's goal volume. |
| void setfixednodesafevolume( entity ) | Summary: Set this actor's fixed node safe volume. |
| entity getfixednodesafevolume() | Summary: Get this actor's fixed node safe volume. |
| void clearfixednodesafevolume() | Summary: Clears this actor's fixed node safe volume. |
| bool isingoal( vector ) | Summary: Determine whether a given point is in the actor's current goal area |
| void setruntopos( vector ) | Summary: Override where the actor should run to. This overrides the goal pos and the claimed node. |
| void clearruntopos() | Summary:
|
| bool nearnode( pathnode ) | Summary: Determine whether this actor is near to a given path node. |
| bool nearclaimnode() | Summary:
|
| bool nearclaimnodeandangle() | Summary:
|
| bool atdangerousnode() | Summary:
|
| void getenemyinfo( entity ) | Summary:
|
| void clearenemy() | Summary: Clear the actor's current enemy entity. |
| void setentitytarget( entity, float ) | Summary: Set an entity as the AI's target. This is for special cases only. Do not set AI or player targets with this. |
| void clearentitytarget() | Summary: Clears an AI's entity target. |
| void setpotentialthreat( float ) | Summary: In non-combat situations. This is mostly useful for friendlies. |
| void clearpotentialthreat() | Summary: Clear the potential threat direction. See SetPotentialThreat for more info on potential threats |
| void getperfectinfo( entity ) | Summary:
|
| void setflashbangimmunity( int ) | Summary: Sets whether an actor is succeptable to flashbangs. |
| void setflashbanged( int ) | Summary: Sets whether an actor is under a flashbang effect. |
| float getflashbangedstrength() | Summary: Retrieves how strongly the actor was initially hit by a flashbang. 1.0 is full strength, 0.0 is none at all. |
| int isknownenemyinradius( vector, float ) | Summary: Checks if there is a known enemy in a radius for an AI. |
| int isknownenemyinvolume( entity ) | Summary: Checks if there is a known enemy in a volume for an AI. |
| void settalktospecies( conststring ) | Summary: Sets the species this AI can share enemy information with. |
| void allowpitchangle( int ) | Summary:
|
| void knockback( int ) | Summary:
|
| float getdeltaturnyaw() | Summary:
|
| entity finishactordamage( entity, entity, int, string, vector, vector, conststring, int, int ) | Summary:
|
| array calclookaheadpos( vector, int ) | Summary:
|
| void setengagementmindist() | Summary: Sets the min engagement distances used when selecting cover nodes. |
| void setengagementmaxdist() | Summary: Sets the max engagement distances used when selecting cover nodes. |
| bool isinscriptedstate() | Summary:
|
| entity meleewithoffset( vector ) | Summary:
|
| int forceteleport( vector, vector ) | Summary:
|
| void setentityowner( entity ) | Summary:
|
| void clearentityowner() | Summary:
|
| void setanimstate( conststring, int ) | Summary:
|
| void setaimanimweights( float, float ) | Summary:
|
| void startscriptedanim() | Summary: Runs an animscript on an actor. |
| void popaistate() | Summary:
|
| int setanimstatefromasd( conststring, conststring, int ) | Summary:
|
| bool hasanimstatefromasd( conststring ) | Summary:
|
| conststring getanimstatefromasd() | Summary:
|
| int getanimsubstatefromasd( conststring, conststring ) | Summary:
|
| int getanimsubstatecountfromasd( conststring ) | Summary:
|
| anim getanimfromasd( conststring, animsindex, animsindex, int ) | Summary:
|
| float getanimlengthfromasd( conststring, int ) | Summary:
|
| bool getanimhasnotetrackfromasd( conststring, int, conststring ) | Summary:
|
| void setfreecameralockonallowed( int ) | Summary:
|
Builtin Common Methods
| Prototype | Description |
|---|---|
| void forceyellowdot( int ) | Summary:
|
| void disableyellowdot( int ) | Summary:
|
| void allowcamerarotation( int ) | Summary:
|
| bool reloadonnunchuk() | Summary:
|
| bool reloadonwiiumote() | Summary:
|
| void attach( string, constlowercasestring, int ) | Summary: Attach a model to an entity. |
| void detach( string, constlowercasestring ) | Summary: Detaches an attached model from an entity. |
| void detachall() | Summary: detaches all attached models from an entity |
| int getattachsize() | Summary: Returns the number of attached models for this entity. |
| conststring getattachmodelname( int ) | Summary: Returns the name of the attached model at the given attachment slot |
| conststring getattachtagname( int ) | Summary: Returns the tagname of the attached model at the given attachment slot |
| bool getattachignorecollision( int ) | Summary: Returns the ignore collision flag of the attached model at the given attachment slot |
| void hidepart( constlowercasestring, string ) | Summary: Hide part of an entity. |
| void runscriptonent() | Summary:
|
| void sendaiscriptvals( string, string ) | Summary:
|
| void showpart( constlowercasestring, string ) | Summary: Show part of an entity. |
| void showallparts() | Summary: Show all parts of an entity. |
| void playsoundtoplayer( string ) | Summary: Play the sound alias as if coming from the entity, so that only one player can hear it |
| vector getlightcolor() | Summary: Gets the current color of the light, as an RGB vector. |
| void setlightcolor( vector ) | Summary: Sets the current color of the light, as an RGB vector. |
| float getlightintensity() | Summary: Gets the current intensity of the light. |
| void setlightintensity( float ) | Summary: Sets the current intensity of the light. |
| float getlightradius() | Summary: Gets the current radius of the light. |
| void setlightradius( float ) | Summary: Sets the current radius of the light. |
| float getlightfovinner() | Summary: Gets the current inner fov of a spot light. |
| float getlightfovouter() | Summary: Gets the current outer fov of a spot light. |
| void setlightfovrange( float, float ) | Summary: Sets the current radius of the light. |
| int getlightexponent() | Summary: Gets the current exponent of the light. |
| void setlightexponent( int ) | Summary: Sets the current exponent of the light. |
| bool areallmissionsatscore( int ) | Summary:
|
| void isstartingclassdefault() | Summary:
|
| void isstartingclasseraappropriate() | Summary:
|
| int getnumchallengescomplete( string ) | Summary:
|
| bool hascompletedallgamechallenges() | Summary:
|
| void hasallintel() | Summary:
|
| string getdstat() | Summary:
|
| int getdstatarraycount() | Summary:
|
| void setdstat( string, string, int, int, float, float ) | Summary:
|
| void adddstat() | Summary:
|
| void addweaponstat( string, string, int ) | Summary: Adds to a weapon's statistic. The first parameter is the weapon name, the second one the challenge category and the last one the increment. player addWeaponStat("flash_grenade_mp", "used", 1);
|
| void addbonuscardstat( int, string, int ) | Summary:
|
| void getsessstat() | Summary:
|
| void getsessstatarraycount() | Summary:
|
| void setsessstat() | Summary:
|
| void addsessstat() | Summary:
|
| void addplayerstat( string ) | Summary:
|
| void addplayerstatwithgametype() | Summary:
|
| void addgametypestat() | Summary:
|
| void trackweaponfirenative( string, int, int, int ) | Summary:
|
| void updatestatratio( string, string, string ) | Summary:
|
| int addrankxp( string, int ) | Summary:
|
| void addrankxpvalue(string, int) | Summary: Gives the player rank experience. The first parameter is the event type and the second one the experience reward. player addRankXPValue("contract", 60000);
|
| bool hasseasonpass() | Summary:
|
| void setempjammed( int ) | Summary:
|
| bool isempjammed() | Summary:
|
| void setspawnerteam( team ) | Summary: Set the team for this spawner |
| void luinotifyevent() | Summary:
|
| void launch( vector, vector ) | Summary: Launch an object that interacts with the world, using an initial velocity. From this point on this object will no longer block either missiles or bullets. |
| void setmovingplatformenabled( int ) | Summary:
|
| bool ismovingplatform() | Summary:
|
| void setviewmodelrenderflag( int ) | Summary:
|
| void setdrawinfrared( int ) | Summary:
|
| void setgpr() | Summary:
|
| void gamehistorystartmatch( int ) | Summary:
|
| void gamehistoryfinishmatch( int, int, int, int, int, float ) | Summary:
|
| void unlink() | Summary: Unlinks a linked entity from another entity |
| void linkto() | Summary: Attaches one entity to another |
| void linktoblendtotag() | Summary:
|
| void enablelinkto() | Summary: enables linkto for an entity |
| void linktoupdateoffset( vector, vector ) | Summary:
|
| void playerlinkto() | Summary: Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. Rotating the parent entity/tag will not move the player's eye position, but only the player's view angles. Thus, the player's eye position is locked in place, always directly above the parent tag. |
| void playerlinktoblend( entity, constlowercasestring, float, float, float, float, float, float ) | Summary:
|
| void playerlinktodelta() | Summary: Attaches the player to an entity. Any entity rotation is added to the player's view, allow the player to look around. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical) |
| void playerlinkweaponviewtodelta() | Summary:
|
| void playerlinktoabsolute( entity, constlowercasestring ) | Summary: Attaches the player to an entity. No view movement is allowed. The player's eye position will remain fixed relative to the parent entity/tag. Thus, pitching and rolling will cause the player's eye position to move. (But the player entity always remains vertical) |
| void playercamlinkto( entity, string ) | Summary:
|
| void playercamunlink() | Summary:
|
| void lerpviewangleclamp( float, float, float, float, float, float, float ) | Summary:
|
| void setviewangleresistance() | Summary:
|
| void playerlinkedoffsetenable() | Summary:
|
| void playerlinkedoffsetdisable() | Summary:
|
| void playerlinkedsetusebaseangleforviewclamp( int ) | Summary:
|
| void dontinterpolate() | Summary: pop the entity's position instantaneously to where it moves this time step, rather than smoothly moving there from the previous position |
| entity magicgrenadetype( string, vector, vector, float ) | Summary:
|
| void startfadingblur( float, float ) | Summary:
|
| vector localtoworldcoords( vector ) | Summary: Transform the given local coordinate point to a world coordinate point |
| vector worldtolocalcoords( vector ) | Summary:
|
| void setturretspinning( int ) | Summary:
|
| void attachshieldmodel() | Summary:
|
| void detachshieldmodel() | Summary:
|
| void setscriptmoverflag( int ) | Summary:
|
| void refreshshieldattachment() | Summary:
|
| void setcharacterindex( int ) | Summary:
|
| void useplayerfootsteptable() | Summary:
|
| void setvisionsetforplayer( string, float ) | Summary:
|
| void useservervisionset( int ) | Summary:
|
| void setinfraredvision( int ) | Summary:
|
| string getcontrollertype() | Summary:
|
| void setactorweapon( string, int ) | Summary:
|
| void resetfov() | Summary:
|
Builtin Methods
| Prototype | Description |
|---|---|
| void setstowedweapon( string ) | Summary:
|
| string getstowedweapon() | Summary:
|
| void clearstowedweapon() | Summary:
|
| int getammocount( string ) | Summary: Get the remaining ammo |
| void setvisibletoplayer( entity ) | Summary:
|
| void setinvisibletoplayer( entity, int ) | Summary:
|
| void setvisibletoall() | Summary:
|
| void setinvisibletoall() | Summary:
|
| void setvisibletoteam( team ) | Summary:
|
| void setvisibletoallexceptteam( team ) | Summary:
|
| void setforcenocull() | Summary:
|
| void removeforcenocull() | Summary:
|
| int islinkedto( entity ) | Summary:
|
| void allowtacticalinsertion( int ) | Summary:
|
| void allowbottargetting( int ) | Summary:
|
| entity getlinkedent() | Summary:
|
| vector getorigin() | Summary: Gets the origin of an entity |
| vector getangles() | Summary:
|
| vector getmins() | Summary:
|
| vector getmaxs() | Summary:
|
| vector getabsmins() | Summary:
|
| vector getabsmaxs() | Summary:
|
| vector getpointinbounds( float, float, float ) | Summary:
|
| vector geteye() | Summary: Gets the position of the eye for an AI or Player |
| vector geteyeapprox() | Summary:
|
| entity useby( entity ) | Summary: Uses the entity with the passed in entity as the activator |
| void setstablemissile( int ) | Summary: This entity will shoot missiles that do not destabilize. Only applicable to vehicles, players and AI |
| int istouching( entity, vector ) | Summary:
|
| int istouchingswept( entity, float, float ) | Summary:
|
| int istouchingvolume( vector, vector, vector ) | Summary:
|
| void playsound( string ) | Summary: Play's the specified sound which can be heard by other nearby players as well player playsound("zmb_cha_ching");
|
| void playsoundwithnotify( string, conststring ) | Summary:
|
| void playsoundontag( string, string ) | Summary:
|
| void playsoundasmaster( string ) | Summary: Play the sound alias as if coming from the entity, as a master sound |
| void playsoundtoteam( string, entity ) | Summary: Play the sound alias as if coming from the entity, so that only one team can hear it |
| void playbattlechattertoteam( string, string, team, entity ) | Summary:
|
| void playsoundtoplayer( string ) | Summary: Play the sound alias as if coming from the entity, so that only one player can hear it |
| void playloopsound( string, float ) | Summary: Play a sound as a loop |
| void stoploopsound( float ) | Summary: Stop a looping sound |
| void stopsounds() | Summary: Stop all sounds on an entity. *WARNING*, You must have a wait between StopSounds() and delete() or the sound will not stop. |
| void playrumbleonentity() | Summary: Plays a rumble on the given entity. |
| void playrumblelooponentity() | Summary: Plays a looping controller rumble on the given player. |
| void stoprumble( string ) | Summary: Quits the playing of a particular rumble on a player. |
| void delete() | Summary: Removes an entity from the game in the same manner as a trigger_kill" |
| void setmodel( string ) | Summary: Changes an entity's appearance player setmodel("german_shepherd_vest");
|
| void setzombieshrink( int ) | Summary:
|
| void setenemymodel( string ) | Summary:
|
| void dodamage( float, vector, entity, entity ) | Summary: Does damage to this entity |
| float getnormalhealth() | Summary: Gets the normal health of this entity |
| void setnormalhealth( float ) | Summary: Sets the normal health of this entity |
| void setmaxhealth( int ) | Summary:
|
| void show() | Summary: Turns the player visible (default) player show(); |
| void hide() | Summary: Turns the player invisible player hide(); |
| void ghost() | Summary:
|
| void ghostindemo() | Summary:
|
| void showindemo() | Summary:
|
| void laseron() | Summary: Turns on entity's laser sight. |
| void laseroff() | Summary: Turns off entity's laser sight. |
| void showtoplayer( entity ) | Summary: Show the entity to a given client |
| int setcontents( int ) | Summary: Sets the contents of an entity. Returns the old contents. |
| void startfiring() | Summary: Starts a turret firing |
| void stopfiring() | Summary: Stops a turret firing |
| void shootturret() | Summary: Shoots a turret |
| void stopshootturret() | Summary:
|
| void setmode( conststring ) | Summary: Set the mode of a turret. |
| entity getturretowner() | Summary: Gets the "owner" of this turret |
| void settargetentity( entity ) | Summary: Sets the target of this turret |
| array getturretarclimits() | Summary:
|
| void setplayerspread( float ) | Summary: Sets the spread of this turret when used by the player |
| void setaispread( float ) | Summary: Sets the spread of this turret when used by an AI |
| void setconvergencetime( float ) | Summary: Sets the time that a turret takes to converge to its target, on either the pitch or yay planes. |
| void setsuppressiontime( float ) | Summary: Sets the time that a turret uses supressing fire after losing sight of an enemy |
| void cleartargetentity() | Summary: Clears the current target for this turret. |
| void setturretteam( team ) | Summary: Sets the team of a turret |
| void maketurretusable() | Summary: Sets a turret able to be used |
| void maketurretunusable() | Summary: Sets a turret to be unable to be used |
| void setturretaccuracy() | Summary:
|
| void setturretignoregoals( int ) | Summary: Sets the ignoreGoals flag for the turret. |
| entity getturrettarget() | Summary: Gets the current target of this turret |
| void disconnectpaths() | 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. |
| void connectpaths() | 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. |
| conststring getstance() | Summary: Returns the current stance by the player. The returned value is either prone, stand or crouch currentstance = player getstance(); |
| void setstance( conststring ) | Summary: Changes the stance for a specific player. Possible values are prone, stand and crouch player setstance("prone");
|
| void setcursorhint( string, entity ) | Summary: Sets a visible cursor near to an objective |
| void setrevivehintstring( string, team ) | Summary:
|
| void sethintstringforperk( string, string ) | Summary:
|
| void sethintstring( string ) | Summary: Sets the hint string for a usable entity |
| void setfovforkillcam( int ) | Summary:
|
| void sethintlowpriority( int ) | Summary:
|
| void usetriggerrequirelookat() | Summary: Modifies the use trigger so that it requires the user to be looking at it |
| void triggerignoreteam() | Summary:
|
| void shellshock( string, float, int ) | Summary: Start a shell shock sequence for the player. The shell shock must be precached, otherwise calling this script will cause a script error. |
| vector getweaponforwarddir() | Summary:
|
| vector getweaponmuzzlepoint() | Summary:
|
| vector gettagorigin( constlowercasestring ) | Summary: Gets the origin of a particular tag on this model |
| vector gettagangles( constlowercasestring ) | Summary: Gets the angles of a particular tag on this model |
| void getentnum() | Summary: Get the entity number for this entity |
| void stopshellshock() | Summary: Stop a shell shock sequence for the player |
| void setdepthoffield( float, float, float, float, float, float ) | Summary: Set the depth of field values for a player. If start >= end for near or far, depth of field is disabled for that region. |
| void setburn( float ) | Summary:
|
| void setelectrified( float ) | Summary:
|
| void spawnnapalmgroundflame( vector, string, vector, int ) | Summary:
|
| void needsrevive( int ) | Summary:
|
| bool isinsecondchance() | Summary:
|
| float depthinwater() | Summary:
|
| void shootup( float ) | Summary:
|
| int depthofplayerinwater() | Summary:
|
| void useweaponhidetags( string ) | Summary:
|
| void useweaponmodel( string, string, int ) | Summary:
|
| void starttanning() | Summary:
|
| void stopburning() | Summary:
|
| void setwaterdrops( int ) | Summary:
|
| void restoredefaultdroppitch() | Summary: Use this if you move a turret and need to reconfigure. |
| bool isfiringturret() | Summary: Checks whether this turret is firing. The entity must be a turret |
| bool isturretlockedon() | Summary:
|
| void setviewmodeldepthoffield( float, float ) | Summary: Set the depth of field values for the player's viewmodel when at hip. If start >= end, depth of field is disabled. |
| void viewkick( float, vector ) | Summary: Damage the player, and throw the screen around |
| vector localtoworldcoords( vector ) | Summary: Transform the given local coordinate point to a world coordinate point |
| void setrightarc( float ) | Summary: Set the amount that the turret can move to the right |
| void setleftarc( float ) | Summary: Set the amount that the turret can move to the left |
| void settoparc( float ) | Summary: Set the amount that the turret can pivot up |
| void setbottomarc( float ) | Summary: Set the amount that the turret can pivot down |
| void radiusdamage() | Summary: Does damage to all damageable objects within a given radius. The amount of damage is linear according to how close the object is to the radius. See also Entity/radiusdamage to specify an entity the damage is coming from. |
| void detonate( entity ) | Summary: Causes a grenade to explode. Must be called on a grenade. |
| void damageconetrace() | Summary: Determines how much the entity can be damaged from the given position, using the same check that is used by grenades. Performs multiple damage traces and returns an approximation to how much of the entity is damageable from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially damageable. |
| void sightconetrace() | Summary: Determines how much the entity can be seen from the given position, using the same check that is used by grenades. Performs multiple sight traces and returns an approximation to how much of the entity is visible from the given point (between 0 and 1). In SinglePlayer this will always be 1 if the entity is partially visible. |
| int heliturretsighttrace( vector, entity, int ) | Summary:
|
| int heliturretdogtrace( vector, entity, int ) | Summary:
|
| int playersighttrace( vector, int, int ) | Summary:
|
| void visionsetlerpratio( float ) | Summary:
|
| float docowardswayanims() | Summary:
|
| void startpoisoning() | Summary:
|
| void stoppoisoning() | Summary:
|
| void startbinocs() | Summary:
|
| void stopbinocs() | Summary:
|
| bool isflared() | Summary:
|
| bool ispoisoned() | Summary:
|
| void setcameraspikeactive( int ) | Summary:
|
| int isinsideheightlock() | Summary:
|
| int ismissileinsideheightlock() | Summary:
|
| int isonground( int ) | Summary: Returns true if the player is on the ground. |
| entity getgroundent() | Summary:
|
| entity getmoverent() | Summary:
|
| int issprinting() | Summary:
|
| void setanim() | Summary: "Restart": These functions cause the animation to restart. If they had been previously playing, without this they would continue from their current time. |
| void useanimtree( animtree ) | Summary: Set the animation tree of an entity |
| void animscripted() | Summary: Runs an animscript on an entity. |
| void animscriptedskiprestart() | Summary:
|
| void animrelative() | Summary: Runs an animscript on an entity. |
| void stopanimscripted() | Summary: Halts animscript on this entity. |
| void clearanim( anim, float ) | Summary: Sets an animation's goal weight (and the goal weights of all of its descendents) to zero over the specified time. |
| void setentityanimrate( float ) | Summary:
|
| float getentityanimrate() | Summary:
|
| vector getcentroid() | Summary: Gets the centroid of an entity |
| bool ismartyrdomgrenade() | Summary:
|
| int getentitynumber() | Summary: Get the entity number of this entity |
| int getentitytype() | Summary:
|
| void enablegrenadetouchdamage() | Summary: enable grenade damage for damage triggers |
| void disablegrenadetouchdamage() | Summary: Disable grenade damage for damage triggers |
| void enableaimassist() | Summary: Enables aim assist on an entity. The entity must have a brush model |
| void disableaimassist() | Summary: Disables aim assist on an entity. The entity must have a brush model |
| void placespawnpoint() | Summary: Raises the spawn point up to make sure it's not in the ground, then drops it back down into the ground. |
| void setspawnclientflag( string ) | Summary:
|
| void directionalhitindicator( int, int ) | Summary:
|
| void sendkillstreakdamageevent( int ) | Summary:
|
| void setplayergravity( int ) | Summary:
|
| void clearplayergravity() | Summary:
|
| void sendfaceevent( conststring ) | Summary:
|
| void setteamfortrigger( team ) | Summary: Set the team that this trigger will react to |
| void setexcludeteamfortrigger( team ) | Summary:
|
| void setperkfortrigger( string ) | Summary:
|
| void setignoreentfortrigger( entity ) | Summary:
|
| void clientclaimtrigger( entity ) | Summary: Claim a single user trigger. |
| void clientreleasetrigger( entity ) | Summary: Release a single user trigger. |
| void releaseclaimedtrigger() | Summary: Release a currently claimed trigger |
| int isitemlocked( int ) | Summary:
|
| int isitempurchased( int ) | Summary:
|
| void uploadleaderboards() | Summary:
|
| void setnemesisxuid( string ) | Summary:
|
| int getloadoutitem() | Summary:
|
| int isbonuscardactive( int, int ) | Summary:
|
| string getloadoutitemref() | Summary:
|
| string getloadoutweapon( int, string ) | Summary:
|
| array getloadoutperks( int ) | Summary:
|
| int getloadoutallocation( int ) | Summary:
|
| void setmovespeedscale( float ) | Summary: Sets the multiplier for the player's movement speed player setmovespeedscale(2); |
| float getmovespeedscale() | Summary:
|
| void logstring() | Summary:
|
| void missile_settarget( entity, vector ) | Summary: Sets the target entity for a guided missile |
| void missile_dronesetvisible( int ) | Summary:
|
| bool isonladder() | Summary: Return true if the player is on a ladder, false otherwise. |
| bool ismantling() | Summary: Return true if the player is mantling, false otherwise. |
| bool isonslide() | Summary:
|
| void startdoorbreach() | Summary:
|
| void stopdoorbreach() | Summary:
|
| void startragdoll( int ) | Summary: Begin ragdoll physics for this entity. Does nothing if the entity is already a ragdoll. |
| int isragdoll() | Summary: Return true if the entity is a ragdoll body, false otherwise. |
| void launchragdoll( vector, constlowercasestring ) | Summary:
|
| void launchvehicle( vector, vector ) | Summary:
|
| void setblur( float, float ) | Summary: Blur the screen over a period of time. |
| void resetmissiledetonationtime( float ) | Summary:
|
| void giveachievement() | Summary:
|
| void setzombiename( string ) | Summary:
|
| void setentgravitytrajectory( int ) | Summary:
|
| void setvehicleteam( team ) | Summary: Set which team a vehicle is on. |
| void setteam( team ) | Summary:
|
| team getteam() | Summary:
|
| void setowner( entity ) | Summary:
|
| void setmissileowner( entity ) | Summary:
|
| void setentityweapon( string ) | Summary:
|
| void setturretowner( entity ) | Summary:
|
| void setturrettype( string ) | Summary:
|
| anim getcorpseanim( animsindex ) | Summary:
|
| void itemweaponsetammo( int, int, int ) | Summary: Sets the ammo ammount for a weapon item entity (lying on the ground) |
| void setturretcarried( int ) | Summary:
|
| void setturretminimapvisible( int ) | Summary:
|
| void setmissilecoasting( int ) | Summary:
|
| void setweapon( string ) | Summary:
|
| void gib( conststring, object ) | Summary:
|
| void setphysparams( float, float, float ) | Summary:
|
| void setplayercollision( int ) | Summary:
|
| void reportuser( string ) | Summary:
|
| void setplayercurrentobjective() | Summary:
|
| void setplayercurrentstreak( int ) | Summary:
|
| vector getvelocity() | Summary: Gets the player's velocity |
| entity spawnactor( int, conststring ) | Summary:
|
| vector getshootatpos() | Summary: Gets the position an attacker would shoot at to hit this entity.For AI or player this is the eye position.For other entities it's the tag_eye if there is one else the center of the entity bounding box. |
| void predictspawnpoint( vector, vector ) | Summary:
|
| void setdefaultdroppitch( float ) | Summary: Set the default drop pitch that the turret attempts to return to when it is not in use. |
| void setscanningpitch( float ) | Summary:
|
| entity launchbomb( string, vector, vector ) | Summary:
|
| entity magicgrenade( string, vector, vector ) | Summary: Creates a "Magic" grenade from an actor. |
| void makegrenadedud() | Summary:
|
| void setclientflag( int ) | Summary:
|
| int getclientflag( int ) | Summary:
|
| void clearclientflag( int ) | Summary:
|
| void setscriptmoverflag( int ) | Summary:
|
| void setmovingplatformenabled() | Summary:
|
| void fakefire( entity, vector, string, int ) | Summary:
|
| void makeusable( team ) | Summary:
|
| void makeunusable() | Summary:
|
| vector predictgrenade() | Summary:
|
| void setdangerous( team, int ) | Summary:
|
| bool isdangerous( team ) | Summary:
|
| void getindexforactivecontract() | Summary:
|
| void getactivecontractprogress() | Summary:
|
| void incrementactivecontractprogress() | Summary:
|
| void incrementactivecontracttime() | Summary:
|
| void isactivecontractcomplete() | Summary:
|
| void hasactivecontractexpired() | Summary:
|
| void getactivecontracttimepassed() | Summary:
|
| void resetactivecontractprogress() | Summary:
|
| void getpregameclass() | Summary:
|
| void getpregameteam() | Summary:
|
| void setpregameclass() | Summary:
|
| void setpregameteam() | Summary:
|
| void recordleaguepreloser() | Summary:
|
| void luinotifyeventtospectators() | Summary:
|
| bool istestclient() | Summary:
|
| void setworldfogactivebank( int ) | Summary:
|
| bool iszbarrier() | Summary:
|
| int getnumzbarrierpieces() | Summary:
|
| conststring getzbarrierpiecestate( int ) | Summary:
|
| void setzbarrierpiecestate( int, constlowercasestring, float ) | Summary:
|
| bool iszbarrieropen() | Summary:
|
| bool iszbarrierclosed() | Summary:
|
| void hidezbarrierpiece( int ) | Summary:
|
| void showzbarrierpiece( int ) | Summary:
|
| void zbarrierpieceusedefaultmodel( int ) | Summary:
|
| void zbarrierpieceusealternatemodel( int ) | Summary:
|
| void zbarrierpieceuseupgradedmodel( int ) | Summary:
|
| void zbarrierpieceuseboxriselogic( int ) | Summary:
|
| int getupgradedpiecenumlives( int ) | Summary:
|
| array getzbarrierpieceindicesinstate( constlowercasestring ) | Summary:
|
| float getzbarrierpieceanimlengthforstate( int, constlowercasestring, float ) | Summary:
|
| conststring getzbarrierpieceanimstate( int ) | Summary:
|
| conststring getzbarrierpieceanimsubstate( int ) | Summary:
|
| int zbarriersupportszombietaunts() | Summary:
|
| int zbarriersupportszombiereachthroughattacks() | Summary:
|
| conststring getzbarriertauntanimstate() | Summary:
|
| conststring getzbarrierreachthroughattackanimstate() | Summary:
|
| int getzbarriernumattackslots() | Summary:
|
| float getzbarrierattackslothorzoffset() | Summary:
|
| void setzbarriercolmodel( string ) | Summary:
|
| string getweaponoptic( string ) | Summary:
|
| void setaltusetrigger() | Summary:
|
| bool isaltusetrigger() | Summary:
|