Game Script Methods (BO2): Difference between revisions
Aerosoul94 (talk | contribs) No edit summary |
|||
| Line 188: | Line 188: | ||
| bool switchtooffhand( string ) | | bool switchtooffhand( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Switch the player's offhand weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 248: | Line 248: | ||
| void setvelocity( vector ) | | void setvelocity( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the player's velocity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 260: | Line 260: | ||
| vector getplayerangles() | | vector getplayerangles() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the player's angles | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 404: | Line 404: | ||
| float playerads() | | float playerads() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Return the player's weapon position fraction. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 410: | Line 410: | ||
| void pingplayer() | | void pingplayer() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Flashes a player on their teammate's compasses | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 416: | Line 416: | ||
| void setviewmodel( string ) | | void setviewmodel( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the player's current view model. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 422: | Line 422: | ||
| conststring getviewmodel() | | conststring getviewmodel() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the viewmodel name for the given player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 428: | Line 428: | ||
| void setoffhandsecondaryclass( string ) | | void setoffhandsecondaryclass( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set whether player can use smoke grenades or flashbangs. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 434: | Line 434: | ||
| conststring getoffhandsecondaryclass() | | conststring getoffhandsecondaryclass() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the name (either "smoke" or "flash") that toggle is set to. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 446: | Line 446: | ||
| void beginlocationselection() | | void beginlocationselection() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 482: | Line 482: | ||
| void endlocationselection() | | void endlocationselection() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Causes the player to leave location selection mode. Works with beginlocationselection(). | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 494: | Line 494: | ||
| void weaponlockstart( entity ) | | void weaponlockstart( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Begins player's weapon lockon sequence (hud effects, etc). Will clear any existing hard lock. Use WeaponLockFinalize() to complete lock. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 500: | Line 500: | ||
| void weaponlockfinalize( entity ) | | void weaponlockfinalize( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Locks player's weapon onto an entity. Implies WeaponLockStart(), so this may be called to jump to a hard lock. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 506: | Line 506: | ||
| void weaponlockfree() | | void weaponlockfree() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clears player's weapon lock. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 512: | Line 512: | ||
| void weaponlocktargettooclose( int ) | | void weaponlocktargettooclose( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 518: | Line 518: | ||
| void weaponlocknoclearance( int ) | | void weaponlocknoclearance( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 524: | Line 524: | ||
| void buttonpressed() | | void buttonpressed() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check if the host is pressing the button/key, "BUTTON_A", "BUTTON_B", "K | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 554: | Line 554: | ||
| void sayall() | | void sayall() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Write a client chat message from this client to everybody | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 560: | Line 560: | ||
| void sayteam() | | void sayteam() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Write a client chat message from this client to everybody on their team | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 566: | Line 566: | ||
| void setspawnweapon( string ) | | void setspawnweapon( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the weapon that this player will spawn with | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 584: | Line 584: | ||
| void dropitem( string, constlowercasestring ) | | void dropitem( string, constlowercasestring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Drop an item with the given item name | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 602: | Line 602: | ||
| bool finishplayerdamage( entity, entity, int, string, vector, vector, conststring, int, int ) | | bool finishplayerdamage( entity, entity, int, string, vector, vector, conststring, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Does damage to a player - usually as part of the damage callback | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 656: | Line 656: | ||
| int allowstand( int ) | | int allowstand( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can stand up | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 662: | Line 662: | ||
| int allowcrouch( int ) | | int allowcrouch( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can crouch | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 668: | Line 668: | ||
| int allowprone( int ) | | int allowprone( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can go prone | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 674: | Line 674: | ||
| int allowlean( int ) | | int allowlean( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can lean | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 698: | Line 698: | ||
| int openmenu( string ) | | int openmenu( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Open a menu for this player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 704: | Line 704: | ||
| int openmenunomouse( string ) | | int openmenunomouse( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Open a menu for this player, with no mouse control. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 710: | Line 710: | ||
| void closemenu() | | void closemenu() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Close the current player menu | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 716: | Line 716: | ||
| void closeingamemenu() | | void closeingamemenu() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=close the in game menu for this client. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 752: | Line 752: | ||
| void disableweapons() | | void disableweapons() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Disable the player's weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 758: | Line 758: | ||
| void enableweapons() | | void enableweapons() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Enable the player's weapons | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 818: | Line 818: | ||
| void setreverb() | | void setreverb() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the sound reverberation for the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 824: | Line 824: | ||
| void deactivatereverb() | | void deactivatereverb() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=deactivate the sound reverberation for the player on the given priority level | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 830: | Line 830: | ||
| void setchannelvolumes() | | void setchannelvolumes() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the channel volumes for the player (a way of fading volumes by type) | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 836: | Line 836: | ||
| void deactivatechannelvolumes() | | void deactivatechannelvolumes() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=deactivate the channel volumes for the player on the given priority level | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 842: | Line 842: | ||
| int setweaponammoclip( string, int ) | | int setweaponammoclip( string, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the weapon clip ammunition for the given weapon. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 848: | Line 848: | ||
| void setweaponammostock( string, int ) | | void setweaponammostock( string, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the ammunition stockpile for the given weapon. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 854: | Line 854: | ||
| int getweaponammoclip( string ) | | int getweaponammoclip( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the amount of ammo left in the player's weapon's current clip. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 860: | Line 860: | ||
| int getweaponammostock( string ) | | int getweaponammostock( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the ammunition stockpile for the given weapon. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 866: | Line 866: | ||
| int anyammoforweaponmodes( string ) | | int anyammoforweaponmodes( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 884: | Line 884: | ||
| void spawn( vector, vector ) | | void spawn( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Spawns a new entity and returns a reference to the entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,232: | Line 1,232: | ||
| int islookingat( entity ) | | int islookingat( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns true if the entity is the same as the player's lookat entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,238: | Line 1,238: | ||
| void playlocalsound( string ) | | void playlocalsound( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Plays a sound locally to the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,244: | Line 1,244: | ||
| void stoplocalsound( string ) | | void stoplocalsound( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Stops all instances of a local soundalias running on a player. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,250: | Line 1,250: | ||
| int istalking() | | int istalking() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns true if the player is talking via voice chat | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,256: | Line 1,256: | ||
| void allowspectateteam( team, int ) | | void allowspectateteam( team, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set whether the player can spectate the given team. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,286: | Line 1,286: | ||
| int allowads( int ) | | int allowads( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can switch to ADS | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,292: | Line 1,292: | ||
| int allowjump( int ) | | int allowjump( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can jump | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,298: | Line 1,298: | ||
| int allowsprint( int ) | | int allowsprint( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can sprint | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,304: | Line 1,304: | ||
| int allowmelee( int ) | | int allowmelee( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether the player can melee | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,328: | Line 1,328: | ||
| void setspreadoverride( int ) | | void setspreadoverride( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the player fixed spread value | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,334: | Line 1,334: | ||
| void resetspreadoverride() | | void resetspreadoverride() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Resets the player spread value to the ones of the weapon in use. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,340: | Line 1,340: | ||
| void setactionslot( int, string, string ) | | void setactionslot( int, string, string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the option to perform when the player executes (for example) "+actionslot 1". | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,358: | Line 1,358: | ||
| array getweaponslist( int ) | | array getweaponslist( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets an array of all weapons that the player has. Includes any alt-mode weapons (ex: m203_m4) | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,364: | Line 1,364: | ||
| array getweaponslistprimaries() | | array getweaponslistprimaries() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets an array of all primary weapons that the player has. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,418: | Line 1,418: | ||
| void setrank( int, int ) | | void setrank( int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the player's rank and prestige level | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,496: | Line 1,496: | ||
| bool throwgrenade( string, vector ) | | bool throwgrenade( string, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Throw a grenade. CheckGrenadeThrowPos() or CheckGrenadeThrow() must be called first. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,598: | Line 1,598: | ||
| int issplitscreen() | | int issplitscreen() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns true if the game is a splitscreen game | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,616: | Line 1,616: | ||
| float getplayerviewheight() | | float getplayerviewheight() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the player's view height | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,666: | Line 1,666: | ||
| void moveto( vector ) | | void moveto( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Move this entity to the given point. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,672: | Line 1,672: | ||
| void movex( float ) | | void movex( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Move this entity to the given world x value | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,678: | Line 1,678: | ||
| void movey( float ) | | void movey( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=move this entity to the given world y value | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,684: | Line 1,684: | ||
| void movez( float ) | | void movez( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Move this entity to the given world z value | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,690: | Line 1,690: | ||
| void movegravity( vector, float ) | | void movegravity( vector, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Fling this entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,708: | Line 1,708: | ||
| void rotateto( vector ) | | void rotateto( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Rotate this entity to the given world rotation value | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,714: | Line 1,714: | ||
| void rotatepitch( float ) | | void rotatepitch( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Rotate this entity to the given pitch | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,720: | Line 1,720: | ||
| void rotateyaw( float ) | | void rotateyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Rotate this entity to the given yaw | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,726: | Line 1,726: | ||
| void rotateroll( float ) | | void rotateroll( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Rotate this entity to the given roll angle | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,732: | Line 1,732: | ||
| void devaddpitch( float ) | | void devaddpitch( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Add pitch in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,738: | Line 1,738: | ||
| void devaddyaw( float ) | | void devaddyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Add yaw in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,744: | Line 1,744: | ||
| void devaddroll( float ) | | void devaddroll( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Add yaw in local space. This is just for development purposes and doesn't interpolate | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,750: | Line 1,750: | ||
| void vibrate( vector, float, float, float ) | | void vibrate( vector, float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Causes a script entity to vibrate, rotating around its origin, along a given vector dir | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,756: | Line 1,756: | ||
| void rotatevelocity( vector ) | | void rotatevelocity( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Rotate this entity at a particular velocity for a given time | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,762: | Line 1,762: | ||
| void solid() | | void solid() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the solid flag, so that this object is collidable. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,768: | Line 1,768: | ||
| void notsolid() | | void notsolid() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Unsets the solid flag, so that this object is no longer collidable. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,774: | Line 1,774: | ||
| void setcandamage( int ) | | void setcandamage( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the candamage flag for this entity - this means that it can respond to notifies from bullets and grenade hits | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,780: | Line 1,780: | ||
| void physicslaunch( vector, vector ) | | void physicslaunch( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Permanently turn this entity into a physics object with an intial force vector at the specified point. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,805: | Line 1,805: | ||
| void attachpath( entityref ) | | void attachpath( entityref ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Attaches this vehicle to the given path. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,817: | Line 1,817: | ||
| array getattachpos( entityref ) | | array getattachpos( entityref ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,823: | Line 1,823: | ||
| void startpath() | | void startpath() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Starts the vehicle following this path. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,889: | Line 1,889: | ||
| void setswitchnode( entityref, entityref ) | | void setswitchnode( entityref, entityref ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets a switch node for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,895: | Line 1,895: | ||
| void setspeed( float, float, float ) | | void setspeed( float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the speed and acceleration for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,901: | Line 1,901: | ||
| void setspeedimmediate( float, float, float ) | | void setspeedimmediate( float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,907: | Line 1,907: | ||
| float getspeed() | | float getspeed() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current speed in inches per second. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,919: | Line 1,919: | ||
| float getgoalspeedmph() | | float getgoalspeedmph() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the goal speed in miles per hour. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,949: | Line 1,949: | ||
| void setacceleration( float ) | | void setacceleration( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the acceleration for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,955: | Line 1,955: | ||
| void setdeceleration( float ) | | void setdeceleration( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the deceleration for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,961: | Line 1,961: | ||
| void resumespeed( float ) | | void resumespeed( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the vehicle to resume its path speed. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,967: | Line 1,967: | ||
| void setyawspeed( float, float, float, float ) | | void setyawspeed( float, float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the yaw speed for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,973: | Line 1,973: | ||
| void setmaxpitchroll( float, float ) | | void setmaxpitchroll( float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets max pitch and roll angle for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,979: | Line 1,979: | ||
| void setturningability( float ) | | void setturningability( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=If this is higher, helicopters can make sharper turns to match goal positions better. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,985: | Line 1,985: | ||
| void setjitterparams( vector, float, float ) | | void setjitterparams( vector, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the jitter parameters. Set everything to 0 to stop jittering. Vehicle ignores jitter parameters when on ground | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 1,991: | Line 1,991: | ||
| void setairresistance( float ) | | void setairresistance( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the speed at which air resistance maxes out. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,015: | Line 2,015: | ||
| void sethoverparams( float, float, float ) | | void sethoverparams( float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the hovering parameters. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,021: | Line 2,021: | ||
| void joltbody( vector, float, float, float ) | | void joltbody( vector, float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Jolts the vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,027: | Line 2,027: | ||
| void freevehicle() | | void freevehicle() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Frees this vehicle instance. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,033: | Line 2,033: | ||
| string getwheelsurface( conststring ) | | string getwheelsurface( conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the surface type of the given wheel as a string. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,039: | Line 2,039: | ||
| entity getvehicleowner() | | entity getvehicleowner() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the owner of this particular vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,051: | Line 2,051: | ||
| void makevehicleusable() | | void makevehicleusable() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets this vehicle to be usable by the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,057: | Line 2,057: | ||
| void makevehicleunusable() | | void makevehicleunusable() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets this vehicle to be not usable by the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,081: | Line 2,081: | ||
| void setvehiclelookattext( conststring, constistring ) | | void setvehiclelookattext( conststring, constistring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set look at text for vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,087: | Line 2,087: | ||
| void setneargoalnotifydist( float ) | | void setneargoalnotifydist( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set distance near goal at which near_goal notification should be sent once. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,093: | Line 2,093: | ||
| bool setvehgoalpos( vector, int, int, int ) | | bool setvehgoalpos( vector, int, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target position for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,117: | Line 2,117: | ||
| void setgoalyaw( float ) | | void setgoalyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,123: | Line 2,123: | ||
| void cleargoalyaw() | | void cleargoalyaw() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the goal yaw direction for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,129: | Line 2,129: | ||
| void settargetyaw( float ) | | void settargetyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,135: | Line 2,135: | ||
| void cleartargetyaw() | | void cleartargetyaw() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the target yaw direction for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,141: | Line 2,141: | ||
| void setlookatent( entity ) | | void setlookatent( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the entity this vehicle will orient towards. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,147: | Line 2,147: | ||
| void clearlookatent() | | void clearlookatent() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the entity the vehicle is orienting towards. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,159: | Line 2,159: | ||
| void returnplayercontrol() | | void returnplayercontrol() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,165: | Line 2,165: | ||
| void setturrettargetvec( vector ) | | void setturrettargetvec( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target position for this vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,171: | Line 2,171: | ||
| void setturrettargetent( entity, vector ) | | void setturrettargetent( entity, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target entity for this vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,177: | Line 2,177: | ||
| void clearturrettarget() | | void clearturrettarget() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the target for the vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,231: | Line 2,231: | ||
| void setvehweapon( string ) | | void setvehweapon( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the vehicle's weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,237: | Line 2,237: | ||
| entity fireweapon( entity, vector ) | | entity fireweapon( entity, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Fire the vehicle's weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,255: | Line 2,255: | ||
| int isturretready() | | int isturretready() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Query whether this vehicle's turret is ready for firing | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,496: | Line 2,496: | ||
| void settext() | | void settext() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set HUD text for this element. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,502: | Line 2,502: | ||
| void clearalltextafterhudelem() | | void clearalltextafterhudelem() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the config strings for the unique text set after this string. This is intended for development use only. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,508: | Line 2,508: | ||
| void setshader( string, int, int ) | | void setshader( string, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the material for this Hud Element | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,514: | Line 2,514: | ||
| void settargetent( entity, entity ) | | void settargetent( entity, entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,520: | Line 2,520: | ||
| void cleartargetent() | | void cleartargetent() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear this waypoint from targetting an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,526: | Line 2,526: | ||
| void settimer( float ) | | void settimer( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a timer HUD element to count down | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,532: | Line 2,532: | ||
| void settimerup( float ) | | void settimerup( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a timer HUD element to count up | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,538: | Line 2,538: | ||
| void settenthstimer( float ) | | void settenthstimer( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a timer HUD element to count down in tenths of a second | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,544: | Line 2,544: | ||
| void settenthstimerup( float ) | | void settenthstimerup( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a timer HUD element to count up in tenths of a second | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,550: | Line 2,550: | ||
| void setclock() | | void setclock() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a clock HUD element to count down over a time period. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,556: | Line 2,556: | ||
| void setclockup() | | void setclockup() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a clock HUD element to count up over a time period. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,562: | Line 2,562: | ||
| void setvalue( float ) | | void setvalue( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a value HUD element to a given value. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,568: | Line 2,568: | ||
| void setwaypoint( int, string, int, int ) | | void setwaypoint( int, string, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets a hud element to be a waypoint. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,574: | Line 2,574: | ||
| void fadeovertime( float ) | | void fadeovertime( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,580: | Line 2,580: | ||
| void scaleovertime( float, int, int ) | | void scaleovertime( float, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a hud element to scale over time. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,586: | Line 2,586: | ||
| void moveovertime( float ) | | void moveovertime( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set a hud element to move over time. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,592: | Line 2,592: | ||
| void reset() | | void reset() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Reset a HUD element to its default state. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,598: | Line 2,598: | ||
| void destroy() | | void destroy() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Remove this Hud element altogether. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,604: | Line 2,604: | ||
| void setpulsefx( int, int, int ) | | void setpulsefx( int, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the hudelem string to display with a "Pulse" effect. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,640: | Line 2,640: | ||
| void setplayernamestring( entity, entity ) | | void setplayernamestring( entity, entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the player name string for a HUD element | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,646: | Line 2,646: | ||
| void setmapnamestring( string ) | | void setmapnamestring( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the map name string | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,652: | Line 2,652: | ||
| void setgametypestring( string ) | | void setgametypestring( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the game type string for the game | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,664: | Line 2,664: | ||
| void changefontscaleovertime( float ) | | void changefontscaleovertime( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,683: | Line 2,683: | ||
| void setspeed() | | void setspeed() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the speed and acceleration for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,689: | Line 2,689: | ||
| float getspeed() | | float getspeed() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current speed in inches per second. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,701: | Line 2,701: | ||
| void resumespeed( float ) | | void resumespeed( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the vehicle to resume its path speed. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,707: | Line 2,707: | ||
| void setyawspeed( float, float, float, float ) | | void setyawspeed( float, float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the yaw speed for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,713: | Line 2,713: | ||
| void setmaxpitchroll( float, float ) | | void setmaxpitchroll( float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets max pitch and roll angle for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,719: | Line 2,719: | ||
| void setturningability( float ) | | void setturningability( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=If this is higher, helicopters can make sharper turns to match goal positions better. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,725: | Line 2,725: | ||
| void setairresistance( float ) | | void setairresistance( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the speed at which air resistance maxes out. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,731: | Line 2,731: | ||
| void sethoverparams( float, float, float ) | | void sethoverparams( float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the hovering parameters. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,737: | Line 2,737: | ||
| void setneargoalnotifydist( float ) | | void setneargoalnotifydist( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set distance near goal at which near_goal notification should be sent once. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,743: | Line 2,743: | ||
| bool setvehgoalpos( vector, int, int, int ) | | bool setvehgoalpos( vector, int, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target position for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,749: | Line 2,749: | ||
| void setgoalyaw( float ) | | void setgoalyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,755: | Line 2,755: | ||
| void cleargoalyaw() | | void cleargoalyaw() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the goal yaw direction for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,761: | Line 2,761: | ||
| void settargetyaw( float ) | | void settargetyaw( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target yaw direction for this vehicle. Goal yaw has priority over target yaw. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,767: | Line 2,767: | ||
| void cleartargetyaw() | | void cleartargetyaw() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the target yaw direction for this vehicle. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,773: | Line 2,773: | ||
| void setlookatent( entity ) | | void setlookatent( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the entity this vehicle will orient towards. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,779: | Line 2,779: | ||
| void clearlookatent() | | void clearlookatent() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the entity the vehicle is orienting towards. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,785: | Line 2,785: | ||
| void setvehweapon( string ) | | void setvehweapon( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the vehicle's weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,791: | Line 2,791: | ||
| entity fireweapon( entity, vector ) | | entity fireweapon( entity, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Fire the vehicle's weapon | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,803: | Line 2,803: | ||
| void setturrettargetvec( vector ) | | void setturrettargetvec( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target position for this vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,809: | Line 2,809: | ||
| void setturrettargetent( entity, vector ) | | void setturrettargetent( entity, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the target entity for this vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,815: | Line 2,815: | ||
| void clearturrettarget() | | void clearturrettarget() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the target for the vehicle turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,858: | Line 2,858: | ||
| void startcoverarrival() | | void startcoverarrival() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Runs cover arrival animscript on an actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,864: | Line 2,864: | ||
| void starttraversearrival() | | void starttraversearrival() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Runs traverse arrival animscript on an actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,870: | Line 2,870: | ||
| entity melee( vector ) | | entity melee( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Makes this actor melee attack. Returns the entity hit, if any. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,876: | Line 2,876: | ||
| bool reacquirestep( float ) | | bool reacquirestep( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Do side step move to safe place left or right while facing enemy. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,882: | Line 2,882: | ||
| void findreacquirenode() | | void findreacquirenode() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Finds a reacquire node when exposed. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,888: | Line 2,888: | ||
| pathnode getreacquirenode() | | pathnode getreacquirenode() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the reacquire node of this actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,894: | Line 2,894: | ||
| bool usereacquirenode( pathnode ) | | bool usereacquirenode( pathnode ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Use the given reacquire node. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,900: | Line 2,900: | ||
| void findreacquiredirectpath( int ) | | void findreacquiredirectpath( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Finds a path directly to the enemy. Call ReacquireMove to use the path. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,906: | Line 2,906: | ||
| bool trimpathtoattack() | | bool trimpathtoattack() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Trims the path to attack. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,912: | Line 2,912: | ||
| bool reacquiremove() | | bool reacquiremove() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Start the reaquire move | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,918: | Line 2,918: | ||
| void findreacquireproximatepath( int ) | | void findreacquireproximatepath( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Finds a path to a point that can see the enemy without leaving goal. Call ReacquireMove to use the path. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,924: | Line 2,924: | ||
| void flagenemyunattackable() | | void flagenemyunattackable() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set this actor not to attack its current enemy. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,930: | Line 2,930: | ||
| void clearpitchorient() | | void clearpitchorient() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear pitch orientation | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,942: | Line 2,942: | ||
| void setlookatanimnodes( anim, anim, anim ) | | void setlookatanimnodes( anim, anim, anim ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the animation nodes for this actor for looking at things to the left and right. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,948: | Line 2,948: | ||
| void setlookat( vector, float ) | | void setlookat( vector, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the actor to exit the prone position. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,954: | Line 2,954: | ||
| void setlookatyawlimits( float, float, float ) | | void setlookatyawlimits( float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the limits of what this actor can look at. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,960: | Line 2,960: | ||
| void stoplookat( float ) | | void stoplookat( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Make this actor stop looking at its current look at target. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,966: | Line 2,966: | ||
| bool cansee( entity, int ) | | bool cansee( entity, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check to see if the actor can see the given entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,990: | Line 2,990: | ||
| int maymovetopoint( vector, int ) | | int maymovetopoint( vector, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check whether the actor can move to a given point. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 2,996: | Line 2,996: | ||
| int maymovefrompointtopoint( vector, vector, int ) | | int maymovefrompointtopoint( vector, vector, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,002: | Line 3,002: | ||
| int teleport( vector, vector ) | | int teleport( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Teleport the actor to a new position with the given origin and angles. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,008: | Line 3,008: | ||
| float withinapproxpathdist( float ) | | float withinapproxpathdist( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check whether the actor is within an approximate distance to his path | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,014: | Line 3,014: | ||
| int ispathdirect() | | int ispathdirect() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check whether the actor's current path is direct | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,020: | Line 3,020: | ||
| void allowedstances( conststring, conststring, conststring ) | | void allowedstances( conststring, conststring, conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the list of the actor's allowed stances. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,026: | Line 3,026: | ||
| int isstanceallowed( conststring ) | | int isstanceallowed( conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Checks whether this actor can go to the given stance. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,032: | Line 3,032: | ||
| void traversemode( conststring ) | | void traversemode( conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the traverse mode of this actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,038: | Line 3,038: | ||
| void animmode( conststring, int ) | | void animmode( conststring, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the way that animation deltas are interpreted by the game engine | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,044: | Line 3,044: | ||
| void orientmode( conststring, vector, int ) | | void orientmode( conststring, vector, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the orient mode of this actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,056: | Line 3,056: | ||
| float getmotionangle() | | float getmotionangle() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the motion angle in degrees for this actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,080: | Line 3,080: | ||
| vector getanglestolikelyenemypath() | | vector getanglestolikelyenemypath() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,086: | Line 3,086: | ||
| void lerpposition( vector, vector ) | | void lerpposition( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Interpolate an actor's position, and angles. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,092: | Line 3,092: | ||
| void predictoriginandangles() | | void predictoriginandangles() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Use physics to predict the actor's origin and angles | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,104: | Line 3,104: | ||
| void gethitenttype() | | void gethitenttype() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the type of entity that the actor has hit. Can be 'hit', 'obstacle' or 'world'. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,110: | Line 3,110: | ||
| float gethityaw() | | float gethityaw() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the direction in degrees that the player has hit an obstacle at. Returns an error if nothing was hit. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,116: | Line 3,116: | ||
| void getgroundenttype() | | void getgroundenttype() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the entity type of the 'ground' that the actor is on. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,122: | Line 3,122: | ||
| int isdeflected() | | int isdeflected() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Check if the actor has been deflected. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,128: | Line 3,128: | ||
| void animcustom( func, func ) | | void animcustom( func, func ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the anim script for this actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,134: | Line 3,134: | ||
| int canattackenemynode() | | int canattackenemynode() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Checks if this actor can attack its enemies node. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,152: | Line 3,152: | ||
| pathnode getnegotiationstartnode() | | pathnode getnegotiationstartnode() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the next negotiation node for this actor | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,158: | Line 3,158: | ||
| pathnode getnegotiationendnode() | | pathnode getnegotiationendnode() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the end negotiation node for this actor | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,170: | Line 3,170: | ||
| bool checkprone( vector, float, int ) | | bool checkprone( vector, float, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns true when a character can go prone at the specified position. Specifically setup for use by AI characters. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,176: | Line 3,176: | ||
| void pushplayer( int ) | | void pushplayer( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set whether this character can push the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,182: | Line 3,182: | ||
| void setgoalnode( pathnode ) | | void setgoalnode( pathnode ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set this actor's goal node. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,188: | Line 3,188: | ||
| void setgoalpos( vector, vector ) | | void setgoalpos( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set this actor's goal position. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,200: | Line 3,200: | ||
| void setgoalvolume( entity ) | | void setgoalvolume( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set this actor's goal volume. This cannot be set if a goal entity is set. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,212: | Line 3,212: | ||
| entity getgoalvolume() | | entity getgoalvolume() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get this actor's goal volume. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,218: | Line 3,218: | ||
| void cleargoalvolume() | | void cleargoalvolume() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clears this actor's goal volume. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,224: | Line 3,224: | ||
| void setfixednodesafevolume( entity ) | | void setfixednodesafevolume( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set this actor's fixed node safe volume. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,230: | Line 3,230: | ||
| entity getfixednodesafevolume() | | entity getfixednodesafevolume() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get this actor's fixed node safe volume. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,236: | Line 3,236: | ||
| void clearfixednodesafevolume() | | void clearfixednodesafevolume() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clears this actor's fixed node safe volume. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,242: | Line 3,242: | ||
| bool isingoal( vector ) | | bool isingoal( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Determine whether a given point is in the actor's current goal area | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,248: | Line 3,248: | ||
| void setruntopos( vector ) | | void setruntopos( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Override where the actor should run to. This overrides the goal pos and the claimed node. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,260: | Line 3,260: | ||
| bool nearnode( pathnode ) | | bool nearnode( pathnode ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Determine whether this actor is near to a given path node. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,290: | Line 3,290: | ||
| void clearenemy() | | void clearenemy() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the actor's current enemy entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,296: | Line 3,296: | ||
| void setentitytarget( entity, float ) | | void setentitytarget( entity, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,302: | Line 3,302: | ||
| void clearentitytarget() | | void clearentitytarget() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clears an AI's entity target. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,308: | Line 3,308: | ||
| void setpotentialthreat( float ) | | void setpotentialthreat( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=In non-combat situations. This is mostly useful for friendlies. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,314: | Line 3,314: | ||
| void clearpotentialthreat() | | void clearpotentialthreat() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clear the potential threat direction. See SetPotentialThreat for more info on potential threats | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,326: | Line 3,326: | ||
| void setflashbangimmunity( int ) | | void setflashbangimmunity( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether an actor is succeptable to flashbangs. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,332: | Line 3,332: | ||
| void setflashbanged( int ) | | void setflashbanged( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets whether an actor is under a flashbang effect. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,338: | Line 3,338: | ||
| float getflashbangedstrength() | | float getflashbangedstrength() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,344: | Line 3,344: | ||
| int isknownenemyinradius( vector, float ) | | int isknownenemyinradius( vector, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Checks if there is a known enemy in a radius for an AI. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,350: | Line 3,350: | ||
| int isknownenemyinvolume( entity ) | | int isknownenemyinvolume( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Checks if there is a known enemy in a volume for an AI. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,356: | Line 3,356: | ||
| void settalktospecies( conststring ) | | void settalktospecies( conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the species this AI can share enemy information with. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,392: | Line 3,392: | ||
| void setengagementmindist() | | void setengagementmindist() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the min engagement distances used when selecting cover nodes. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,398: | Line 3,398: | ||
| void setengagementmaxdist() | | void setengagementmaxdist() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the max engagement distances used when selecting cover nodes. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,446: | Line 3,446: | ||
| void startscriptedanim() | | void startscriptedanim() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Runs an animscript on an actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,549: | Line 3,549: | ||
| void attach( string, constlowercasestring, int ) | | void attach( string, constlowercasestring, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Attach a model to an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,555: | Line 3,555: | ||
| void detach( string, constlowercasestring ) | | void detach( string, constlowercasestring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Detaches an attached model from an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,561: | Line 3,561: | ||
| void detachall() | | void detachall() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=detaches all attached models from an entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,567: | Line 3,567: | ||
| int getattachsize() | | int getattachsize() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the number of attached models for this entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,573: | Line 3,573: | ||
| conststring getattachmodelname( int ) | | conststring getattachmodelname( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the name of the attached model at the given attachment slot | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,579: | Line 3,579: | ||
| conststring getattachtagname( int ) | | conststring getattachtagname( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the tagname of the attached model at the given attachment slot | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,585: | Line 3,585: | ||
| bool getattachignorecollision( int ) | | bool getattachignorecollision( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns the ignore collision flag of the attached model at the given attachment slot | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,591: | Line 3,591: | ||
| void hidepart( constlowercasestring, string ) | | void hidepart( constlowercasestring, string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Hide part of an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,609: | Line 3,609: | ||
| void showpart( constlowercasestring, string ) | | void showpart( constlowercasestring, string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Show part of an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,615: | Line 3,615: | ||
| void showallparts() | | void showallparts() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Show all parts of an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,621: | Line 3,621: | ||
| void playsoundtoplayer( string ) | | void playsoundtoplayer( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Play the sound alias as if coming from the entity, so that only one player can hear it | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,627: | Line 3,627: | ||
| vector getlightcolor() | | vector getlightcolor() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current color of the light, as an RGB vector. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,633: | Line 3,633: | ||
| void setlightcolor( vector ) | | void setlightcolor( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the current color of the light, as an RGB vector. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,639: | Line 3,639: | ||
| float getlightintensity() | | float getlightintensity() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current intensity of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,645: | Line 3,645: | ||
| void setlightintensity( float ) | | void setlightintensity( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the current intensity of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,651: | Line 3,651: | ||
| float getlightradius() | | float getlightradius() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current radius of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,657: | Line 3,657: | ||
| void setlightradius( float ) | | void setlightradius( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the current radius of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,663: | Line 3,663: | ||
| float getlightfovinner() | | float getlightfovinner() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current inner fov of a spot light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,669: | Line 3,669: | ||
| float getlightfovouter() | | float getlightfovouter() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current outer fov of a spot light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,675: | Line 3,675: | ||
| void setlightfovrange( float, float ) | | void setlightfovrange( float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the current radius of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,681: | Line 3,681: | ||
| int getlightexponent() | | int getlightexponent() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the current exponent of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,687: | Line 3,687: | ||
| void setlightexponent( int ) | | void setlightexponent( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the current exponent of the light. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,849: | Line 3,849: | ||
| void setspawnerteam( team ) | | void setspawnerteam( team ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the team for this spawner | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,861: | Line 3,861: | ||
| void launch( vector, vector ) | | void launch( vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,909: | Line 3,909: | ||
| void unlink() | | void unlink() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Unlinks a linked entity from another entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,915: | Line 3,915: | ||
| void linkto() | | void linkto() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Attaches one entity to another | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,927: | Line 3,927: | ||
| void enablelinkto() | | void enablelinkto() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=enables linkto for an entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,939: | Line 3,939: | ||
| void playerlinkto() | | void playerlinkto() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,951: | Line 3,951: | ||
| void playerlinktodelta() | | void playerlinktodelta() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 3,963: | Line 3,963: | ||
| void playerlinktoabsolute( entity, constlowercasestring ) | | void playerlinktoabsolute( entity, constlowercasestring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,011: | Line 4,011: | ||
| void dontinterpolate() | | void dontinterpolate() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,029: | Line 4,029: | ||
| vector localtoworldcoords( vector ) | | vector localtoworldcoords( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Transform the given local coordinate point to a world coordinate point | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,144: | Line 4,144: | ||
| int getammocount( string ) | | int getammocount( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the remaining ammo | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,222: | Line 4,222: | ||
| vector getorigin() | | vector getorigin() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the origin of an entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,264: | Line 4,264: | ||
| vector geteye() | | vector geteye() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the position of the eye for an AI or Player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,276: | Line 4,276: | ||
| entity useby( entity ) | | entity useby( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Uses the entity with the passed in entity as the activator | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,282: | Line 4,282: | ||
| void setstablemissile( int ) | | void setstablemissile( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=This entity will shoot missiles that do not destabilize. Only applicable to vehicles, players and AI | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,324: | Line 4,324: | ||
| void playsoundasmaster( string ) | | void playsoundasmaster( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Play the sound alias as if coming from the entity, as a master sound | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,330: | Line 4,330: | ||
| void playsoundtoteam( string, entity ) | | void playsoundtoteam( string, entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Play the sound alias as if coming from the entity, so that only one team can hear it | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,342: | Line 4,342: | ||
| void playsoundtoplayer( string ) | | void playsoundtoplayer( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Play the sound alias as if coming from the entity, so that only one player can hear it | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,348: | Line 4,348: | ||
| void playloopsound( string, float ) | | void playloopsound( string, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Play a sound as a loop | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,354: | Line 4,354: | ||
| void stoploopsound( float ) | | void stoploopsound( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Stop a looping sound | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,360: | Line 4,360: | ||
| void stopsounds() | | void stopsounds() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,366: | Line 4,366: | ||
| void playrumbleonentity() | | void playrumbleonentity() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Plays a rumble on the given entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,372: | Line 4,372: | ||
| void playrumblelooponentity() | | void playrumblelooponentity() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Plays a looping controller rumble on the given player. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,378: | Line 4,378: | ||
| void stoprumble( string ) | | void stoprumble( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Quits the playing of a particular rumble on a player. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,384: | Line 4,384: | ||
| void delete() | | void delete() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Removes an entity from the game in the same manner as a trigger_kill" | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,408: | Line 4,408: | ||
| void dodamage( float, vector, entity, entity ) | | void dodamage( float, vector, entity, entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Does damage to this entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,414: | Line 4,414: | ||
| float getnormalhealth() | | float getnormalhealth() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Gets the normal health of this entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,420: | Line 4,420: | ||
| void setnormalhealth( float ) | | void setnormalhealth( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Sets the normal health of this entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,462: | Line 4,462: | ||
| void laseron() | | void laseron() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Turns on entity's laser sight. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,468: | Line 4,468: | ||
| void laseroff() | | void laseroff() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Turns off entity's laser sight. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,474: | Line 4,474: | ||
| void showtoplayer( entity ) | | void showtoplayer( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Show the entity to a given client | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,480: | Line 4,480: | ||
| int setcontents( int ) | | int setcontents( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the contents of an entity. Returns the old contents. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,486: | Line 4,486: | ||
| void startfiring() | | void startfiring() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Starts a turret firing | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,492: | Line 4,492: | ||
| void stopfiring() | | void stopfiring() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Stops a turret firing | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,498: | Line 4,498: | ||
| void shootturret() | | void shootturret() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Shoots a turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,510: | Line 4,510: | ||
| void setmode( conststring ) | | void setmode( conststring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the mode of a turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,516: | Line 4,516: | ||
| entity getturretowner() | | entity getturretowner() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the "owner" of this turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,522: | Line 4,522: | ||
| void settargetentity( entity ) | | void settargetentity( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the target of this turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,534: | Line 4,534: | ||
| void setplayerspread( float ) | | void setplayerspread( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the spread of this turret when used by the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,540: | Line 4,540: | ||
| void setaispread( float ) | | void setaispread( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the spread of this turret when used by an AI | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,546: | Line 4,546: | ||
| void setconvergencetime( float ) | | void setconvergencetime( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the time that a turret takes to converge to its target, on either the pitch or yay planes. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,552: | Line 4,552: | ||
| void setsuppressiontime( float ) | | void setsuppressiontime( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the time that a turret uses supressing fire after losing sight of an enemy | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,558: | Line 4,558: | ||
| void cleartargetentity() | | void cleartargetentity() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Clears the current target for this turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,564: | Line 4,564: | ||
| void setturretteam( team ) | | void setturretteam( team ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the team of a turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,570: | Line 4,570: | ||
| void maketurretusable() | | void maketurretusable() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets a turret able to be used | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,576: | Line 4,576: | ||
| void maketurretunusable() | | void maketurretunusable() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets a turret to be unable to be used | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,588: | Line 4,588: | ||
| void setturretignoregoals( int ) | | void setturretignoregoals( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the ignoreGoals flag for the turret. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,594: | Line 4,594: | ||
| entity getturrettarget() | | entity getturrettarget() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary= Gets the current target of this turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,600: | Line 4,600: | ||
| void disconnectpaths() | | void disconnectpaths() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,606: | Line 4,606: | ||
| void connectpaths() | | void connectpaths() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,624: | Line 4,624: | ||
| void setcursorhint( string, entity ) | | void setcursorhint( string, entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets a visible cursor near to an objective | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,642: | Line 4,642: | ||
| void sethintstring( string ) | | void sethintstring( string ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the hint string for a usable entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,660: | Line 4,660: | ||
| void usetriggerrequirelookat() | | void usetriggerrequirelookat() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Modifies the use trigger so that it requires the user to be looking at it | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,672: | Line 4,672: | ||
| void shellshock( string, float, int ) | | void shellshock( string, float, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,690: | Line 4,690: | ||
| vector gettagorigin( constlowercasestring ) | | vector gettagorigin( constlowercasestring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the origin of a particular tag on this model | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,696: | Line 4,696: | ||
| vector gettagangles( constlowercasestring ) | | vector gettagangles( constlowercasestring ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the angles of a particular tag on this model | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,702: | Line 4,702: | ||
| void getentnum() | | void getentnum() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the entity number for this entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,708: | Line 4,708: | ||
| void stopshellshock() | | void stopshellshock() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Stop a shell shock sequence for the player | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,714: | Line 4,714: | ||
| void setdepthoffield( float, float, float, float, float, float ) | | void setdepthoffield( float, float, float, float, float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,798: | Line 4,798: | ||
| void restoredefaultdroppitch() | | void restoredefaultdroppitch() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Use this if you move a turret and need to reconfigure. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,804: | Line 4,804: | ||
| bool isfiringturret() | | bool isfiringturret() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Checks whether this turret is firing. The entity must be a turret | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,816: | Line 4,816: | ||
| void setviewmodeldepthoffield( float, float ) | | void setviewmodeldepthoffield( float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,822: | Line 4,822: | ||
| void viewkick( float, vector ) | | void viewkick( float, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Damage the player, and throw the screen around | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,828: | Line 4,828: | ||
| vector localtoworldcoords( vector ) | | vector localtoworldcoords( vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Transform the given local coordinate point to a world coordinate point | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,834: | Line 4,834: | ||
| void setrightarc( float ) | | void setrightarc( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the amount that the turret can move to the right | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,840: | Line 4,840: | ||
| void setleftarc( float ) | | void setleftarc( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the amount that the turret can move to the left | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,846: | Line 4,846: | ||
| void settoparc( float ) | | void settoparc( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the amount that the turret can pivot up | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,852: | Line 4,852: | ||
| void setbottomarc( float ) | | void setbottomarc( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the amount that the turret can pivot down | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,858: | Line 4,858: | ||
| void radiusdamage() | | void radiusdamage() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,864: | Line 4,864: | ||
| void detonate( entity ) | | void detonate( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Causes a grenade to explode. Must be called on a grenade. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,870: | Line 4,870: | ||
| void damageconetrace() | | void damageconetrace() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,876: | Line 4,876: | ||
| void sightconetrace() | | void sightconetrace() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,966: | Line 4,966: | ||
| int isonground( int ) | | int isonground( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Returns true if the player is on the ground. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,990: | Line 4,990: | ||
| void setanim() | | void setanim() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 4,996: | Line 4,996: | ||
| void useanimtree( animtree ) | | void useanimtree( animtree ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the animation tree of an entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,002: | Line 5,002: | ||
| void animscripted() | | void animscripted() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Runs an animscript on an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,014: | Line 5,014: | ||
| void animrelative() | | void animrelative() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Runs an animscript on an entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,020: | Line 5,020: | ||
| void stopanimscripted() | | void stopanimscripted() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Halts animscript on this entity. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,026: | Line 5,026: | ||
| void clearanim( anim, float ) | | void clearanim( anim, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,044: | Line 5,044: | ||
| vector getcentroid() | | vector getcentroid() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the centroid of an entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,056: | Line 5,056: | ||
| int getentitynumber() | | int getentitynumber() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Get the entity number of this entity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,068: | Line 5,068: | ||
| void enablegrenadetouchdamage() | | void enablegrenadetouchdamage() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=enable grenade damage for damage triggers | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,074: | Line 5,074: | ||
| void disablegrenadetouchdamage() | | void disablegrenadetouchdamage() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Disable grenade damage for damage triggers | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,080: | Line 5,080: | ||
| void enableaimassist() | | void enableaimassist() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Enables aim assist on an entity. The entity must have a brush model | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,086: | Line 5,086: | ||
| void disableaimassist() | | void disableaimassist() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Disables aim assist on an entity. The entity must have a brush model | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,092: | Line 5,092: | ||
| void placespawnpoint() | | void placespawnpoint() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,134: | Line 5,134: | ||
| void setteamfortrigger( team ) | | void setteamfortrigger( team ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the team that this trigger will react to | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,158: | Line 5,158: | ||
| void clientclaimtrigger( entity ) | | void clientclaimtrigger( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Claim a single user trigger. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,164: | Line 5,164: | ||
| void clientreleasetrigger( entity ) | | void clientreleasetrigger( entity ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Release a single user trigger. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,170: | Line 5,170: | ||
| void releaseclaimedtrigger() | | void releaseclaimedtrigger() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Release a currently claimed trigger | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,254: | Line 5,254: | ||
| void missile_settarget( entity, vector ) | | void missile_settarget( entity, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the target entity for a guided missile | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,266: | Line 5,266: | ||
| bool isonladder() | | bool isonladder() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Return true if the player is on a ladder, false otherwise. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,272: | Line 5,272: | ||
| bool ismantling() | | bool ismantling() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Return true if the player is mantling, false otherwise. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,296: | Line 5,296: | ||
| void startragdoll( int ) | | void startragdoll( int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Begin ragdoll physics for this entity. Does nothing if the entity is already a ragdoll. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,302: | Line 5,302: | ||
| int isragdoll() | | int isragdoll() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Return true if the entity is a ragdoll body, false otherwise. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,320: | Line 5,320: | ||
| void setblur( float, float ) | | void setblur( float, float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Blur the screen over a period of time. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,350: | Line 5,350: | ||
| void setvehicleteam( team ) | | void setvehicleteam( team ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set which team a vehicle is on. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,404: | Line 5,404: | ||
| void itemweaponsetammo( int, int, int ) | | void itemweaponsetammo( int, int, int ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Sets the ammo ammount for a weapon item entity (lying on the ground) | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,470: | Line 5,470: | ||
| vector getvelocity() | | vector getvelocity() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Gets the player's velocity | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,482: | Line 5,482: | ||
| vector getshootatpos() | | vector getshootatpos() | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |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> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,494: | Line 5,494: | ||
| void setdefaultdroppitch( float ) | | void setdefaultdroppitch( float ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Set the default drop pitch that the turret attempts to return to when it is not in use. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
| Line 5,512: | Line 5,512: | ||
| entity magicgrenade( string, vector, vector ) | | entity magicgrenade( string, vector, vector ) | ||
| {{ScriptUsage | | {{ScriptUsage | ||
|Summary= | |Summary=Creates a "Magic" grenade from an actor. | ||
|Example=<pre></pre> | |Example=<pre></pre> | ||
}} | }} | ||
Revision as of 14:27, 29 October 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, y and z 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:
|
| 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: Get the amount of ammo left in the player's weapon's current clip. |
| int getweaponammostock( string ) | Summary: Get 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 |
| void setentertime( int ) | Summary:
|
| void cloneplayer( int ) | Summary: Creates a clone of the specified player at current position player cloneplayer(); |
| void setclientfov() | Summary:
|
| 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, false otherwise if (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 |
| 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() | Summary: Set HUD text for this element. |
| void clearalltextafterhudelem() | Summary: Clear the config strings for the unique text set after this string. This is intended for development use only. |
| void setshader( string, int, int ) | Summary: Set the material for this Hud Element |
| 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. |
| void settimer( float ) | Summary: Set a timer HUD element to count down |
| void settimerup( float ) | Summary: Set a timer HUD element to count up |
| void settenthstimer( float ) | Summary: Set a timer HUD element to count down in tenths of a second |
| void settenthstimerup( float ) | Summary: Set a timer HUD element to count up in tenths of a second |
| 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 ) | 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, int, int ) | Summary:
|
| 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 ) | Summary:
|
| 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:
|