mirror of
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies-and-multiplayer.git
synced 2025-06-07 17:37:50 -05:00
added some basic function data
This commit is contained in:
parent
df1d2f542f
commit
ed0c423727
@ -1 +1,102 @@
|
|||||||
|
# Black Ops 2 Functions Descriptions and Locations List
|
||||||
|
|
||||||
|
## Built in Functions:
|
||||||
|
|
||||||
|
getgametypesetting( STRING ) - returns the value of a gametypesetting based on the STRING input
|
||||||
|
- STRING
|
||||||
|
getentitynumber() -
|
||||||
|
|
||||||
|
getentarray() - returns an array of all entities on the map currently OPTIONAL ARGS:
|
||||||
|
- STRING arg1: makes the function return all of the entities with this name based on arg2
|
||||||
|
- STRING arg2: can be targetname or classname depending on the array of arg1
|
||||||
|
|
||||||
|
getbaseweaponitemindex( weapon_name ) -
|
||||||
- weapon_name is a STRING
|
- weapon_name is a STRING
|
||||||
|
|
||||||
|
getreffromitemindex( weapon_name ) -
|
||||||
|
- weapon_name is a STRING
|
||||||
|
|
||||||
|
giveweapon( weapon_name ) - gives the entity a weapon
|
||||||
|
- weapon_name is a STRING
|
||||||
|
|
||||||
|
switchtoweapon( weapon_name ) - forces the entity to switch to the indicated weapon entity must have the weapon for the switch to occur
|
||||||
|
|
||||||
|
getplayerviewheight() - returns the view height of the entity
|
||||||
|
|
||||||
|
getcurrentweapon() - returns the name of the current weapon as a string that the entity is holding
|
||||||
|
|
||||||
|
gettime() - returns the current time since the game has started as milliseconds increments in 0050
|
||||||
|
|
||||||
|
getweaponammostock() - returns the remaining ammo stock in the weapon the entity is holding
|
||||||
|
|
||||||
|
setweaponammoclip( weapon_name, weapon_clip_to_give ) - sets the weapon clip of the weapon for the entity
|
||||||
|
- STRING weapon_name: the name of the weapon
|
||||||
|
- INT weapon_clip_to_give the amount of ammo to set the clip to
|
||||||
|
|
||||||
|
setweaponammostock( weapon_name, weapon_stock_to_give ) - sets the weapon stock of the weapon for the entity
|
||||||
|
- STRING weapon_name: the name of the weapon
|
||||||
|
|
||||||
|
isthrowinggrenade() - returns a boolean must be called on an entity
|
||||||
|
|
||||||
|
isreloading() - returns a boolean must be called on an entity
|
||||||
|
|
||||||
|
isswitchingweapons() - returns a boolean must be called on an entity
|
||||||
|
|
||||||
|
ismantling() - returns a boolean must be called on an entity
|
||||||
|
|
||||||
|
isonladder() - returns a boolean must be called on an entity
|
||||||
|
|
||||||
|
isalive( entity ) - returns a boolean
|
||||||
|
|
||||||
|
isplayer( entity ) - returns a boolean
|
||||||
|
|
||||||
|
isai( entity ) - returns a boolean based on whether the input is an AI
|
||||||
|
|
||||||
|
loadfx( effect ) - loads an effect in
|
||||||
|
|
||||||
|
randomfloatrange( float1, float2 ) - returns a random float with a value between the 2 inputs values
|
||||||
|
|
||||||
|
playerads() -
|
||||||
|
|
||||||
|
pixendevent() -
|
||||||
|
|
||||||
|
predictspawnpoint( spawnpoint.origin, spawnpoint.angles ) -
|
||||||
|
|
||||||
|
spawn() -
|
||||||
|
|
||||||
|
setclientnamemode( STRING ) -
|
||||||
|
|
||||||
|
### AI related engine functions
|
||||||
|
|
||||||
|
allowattack( boolean ) - controls whether the entity is allowed to attack
|
||||||
|
|
||||||
|
addgoal( goal, goal_radius, goal_priority, goal_name ) - gives the AI a goal where:
|
||||||
|
- goal: is generally an entity's or object's origin
|
||||||
|
- INT goal_radius: is how close the AI has to be for the goal to be completed
|
||||||
|
- INT goal_priority: is how high a priority the AI has in accomplishing the goal over other goals
|
||||||
|
- STRING goal_name: is used by other goal functions like atgoal( goal_name ) or cancel( goal_name )
|
||||||
|
|
||||||
|
atgoal( goal ) - returns a boolean if the AI is at the goal input
|
||||||
|
|
||||||
|
cancelgoal( goal ) - cancels the current goal the AI has
|
||||||
|
|
||||||
|
pressads( boolean ) - makes an entity press the ads button
|
||||||
|
|
||||||
|
pressattackbutton( duration ) - makes an entity press the attack button for a duration
|
||||||
|
|
||||||
|
pressusebutton( duration ) - makes an entity press the use buton for the duration
|
||||||
|
|
||||||
|
pressmelee() - makes an entity press the melee button
|
||||||
|
|
||||||
|
gethreats( fov ) - returns the enemies in the AIs fov accepts -1 as an input
|
||||||
|
|
||||||
|
botsighttracepassed( entity ) - returns a boolean if the entity is visible to the entity it being called on
|
||||||
|
|
||||||
|
### Math functions
|
||||||
|
|
||||||
|
|
||||||
|
## Shared Script Based Functions Between Zombies and MP
|
||||||
|
|
||||||
|
maps/mp/_utility::is_bot() - returns the value of self.pers[ "bot" ], this var is always set on a bots spawn
|
||||||
|
|
||||||
|
common_scripts/utility::cointoss() - returns a specific boolean 50% of the time
|
@ -0,0 +1,4 @@
|
|||||||
|
# Black Ops 2 patch_mp Functions Descriptions and Locations List
|
||||||
|
|
||||||
|
### Functions in maps/mp/_utility.gsc:
|
||||||
|
|
@ -1,13 +1,5 @@
|
|||||||
# Black Ops 2 Functions Descriptions and Locations List
|
# Black Ops 2 Functions Descriptions and Locations List
|
||||||
|
|
||||||
### Built in Functions:
|
|
||||||
|
|
||||||
isthrowinggrenade() - returns 1 if the player is currently throwing a grenade or 0 if they are not
|
|
||||||
- must be called on a player
|
|
||||||
|
|
||||||
loadfx( effect ) - loads an effect in
|
|
||||||
usage - level._effect[ "building_dust" ] = loadfx( "maps/zombie/fx_zmb_buildable_assemble_dust" );
|
|
||||||
|
|
||||||
### Functions in _zm_utility.gsc:
|
### Functions in _zm_utility.gsc:
|
||||||
|
|
||||||
convertsecondstomilliseconds( seconds ) - returns seconds multiplied by 1000
|
convertsecondstomilliseconds( seconds ) - returns seconds multiplied by 1000
|
Loading…
x
Reference in New Issue
Block a user