From ed0c423727fee49d04d0f33f76e9347651f50feb Mon Sep 17 00:00:00 2001 From: JezuzLizard Date: Sat, 25 Jul 2020 02:28:24 -0700 Subject: [PATCH] added some basic function data --- engine functions and descriptions.md | 101 ++++++++++++++++++ ...mp functions descriptions and locations.md | 4 + ...zm functions descriptions and locations.md | 8 -- 3 files changed, 105 insertions(+), 8 deletions(-) create mode 100644 patch_mp/patch_mp functions descriptions and locations.md rename functions descriptions and locations.md => patch_zm/patch_zm functions descriptions and locations.md (88%) diff --git a/engine functions and descriptions.md b/engine functions and descriptions.md index 896b7a9..3d49596 100644 --- a/engine functions and descriptions.md +++ b/engine functions and descriptions.md @@ -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 + +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 \ No newline at end of file diff --git a/patch_mp/patch_mp functions descriptions and locations.md b/patch_mp/patch_mp functions descriptions and locations.md new file mode 100644 index 0000000..4cb5451 --- /dev/null +++ b/patch_mp/patch_mp functions descriptions and locations.md @@ -0,0 +1,4 @@ +# Black Ops 2 patch_mp Functions Descriptions and Locations List + +### Functions in maps/mp/_utility.gsc: + diff --git a/functions descriptions and locations.md b/patch_zm/patch_zm functions descriptions and locations.md similarity index 88% rename from functions descriptions and locations.md rename to patch_zm/patch_zm functions descriptions and locations.md index 0d2e783..98d41c0 100644 --- a/functions descriptions and locations.md +++ b/patch_zm/patch_zm functions descriptions and locations.md @@ -1,13 +1,5 @@ # 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: convertsecondstomilliseconds( seconds ) - returns seconds multiplied by 1000