mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 14:55:30 +03:00
Updated VScript in Mapbase (markdown)
parent
6b1929182e
commit
878e9c364b
@ -102,10 +102,11 @@ These are functions that can be accessed globally and without a class.
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *handle* GameOver(string *message*, float *delay*, float *fadeTime*, float *loadTime*, int *r*, int *g*, int *b*)| Ends the game and reloads the last save. |
|
||||
| *handle* GameOver(*string* message, *float* delay, *float* fadeTime, *float* loadTime, *int* r, *int* g, *int* b)| Ends the game and reloads the last save. |
|
||||
| *bool* MegaPhyscannonActive()| Checks if supercharged gravity gun mode is enabled. |
|
||||
| *void* printc(string *text*)| Version of print() which takes a color before the message. |
|
||||
| *void* printcl(string *text*)| Version of printl() which takes a color before the message. |
|
||||
| *void* printc(*string* text)| Version of print() which takes a color before the message. |
|
||||
| *void* printcl(*string* text)| Version of printl() which takes a color before the message. |
|
||||
| *void* DecalTrace(*CGameTrace* trace, *string* decalName)| Creates a dynamic decal based on the given trace info. The trace information can be generated by TraceLineComplex() and the decal name must be from decals_subrect.txt. |
|
||||
|
||||
***
|
||||
|
||||
@ -153,6 +154,16 @@ These global functions are related to math or math-related classes.
|
||||
| *float* Approach(*float* target, *float* value, *float* speed)| Returns a value which approaches the target value from the input value with the specified speed. |
|
||||
| *float* PredictedPosition(*CBaseEntity* target, *float* flTimeDelta)| Predicts what an entity's position will be in a given amount of time. |
|
||||
|
||||
### Precaching
|
||||
These global functions are related to precaching assets.
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *int* PrecacheModel(*string* fileName)| Precaches a model for later usage. |
|
||||
| *void* PrecacheMaterial(*string* fileName)| Precaches a material for later usage. |
|
||||
| *void* PrecacheParticleSystem(*string* fileName)| Precaches a particle system for later usage. |
|
||||
| *void* PrecacheOther(*string* className)| Precaches an entity class for later usage. |
|
||||
|
||||
***
|
||||
|
||||
## Entity Classes
|
||||
@ -170,7 +181,10 @@ Root class of all server-side entities. This class was already exposed to VScrip
|
||||
| *bool* IsVisibleWithMask(Vector *target*, int *traceMask*)| Check if the specified position can be visible to this entity with a specific trace mask. |
|
||||
| *int* TakeDamage(*CTakeDamageInfo* info)| Apply damage to this entity with a given info handle |
|
||||
| *void* FireBullets(*FireBulletsInfo_t* info)| Fire bullets from entity with a given info handle |
|
||||
| *int* TakeHealth(*float* health, *int* damageType)| Give this entity health |
|
||||
| *bool* IsAlive()| Return true if this entity is alive |
|
||||
| *int* Classify()| Get Class_T class ID |
|
||||
| *bool* AddOutput(*string* output, *string* target, *string* input, *string* parameter, *float* delay, *int* maxTimes)| Add an output |
|
||||
| *string* GetKeyValue(string *key*)| Get a keyvalue |
|
||||
| *int* GetSpawnFlags()| Get spawnflags |
|
||||
| *void* AddSpawnFlags(int *flags*)| Add spawnflag(s) |
|
||||
@ -241,6 +255,7 @@ The base class shared by players and NPCs.
|
||||
| *handle* GetActiveWeapon()| Get the character's active weapon entity. |
|
||||
| *handle* GetWeapon(int *index*)| Get a specific weapon in the character's inventory. |
|
||||
| *handle* FindWeapon(string *classname*)| Find a specific weapon in the character's inventory by its classname. |
|
||||
| *void* GetAllWeapons(*handle* table)| Get the character's weapon inventory. |
|
||||
| *Vector* ShootPosition()| Get the character's shoot position. |
|
||||
| *void* DropAllWeapons(bool *disallowWeaponPickup*)| Make the character drop all of its weapons. |
|
||||
| *void* EquipWeapon(handle *weapon*)| Make the character equip the specified weapon entity. If they don't already own the weapon, they will acquire it instantly. |
|
||||
@ -496,6 +511,25 @@ All-purpose Mapbase system primarily used for map-specific files. Can be accesse
|
||||
|
||||
***
|
||||
|
||||
### CAmmoDef
|
||||
The ammo type definition manager. Can be accessed through a global `AmmoDef` instance.
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
| *string* Name(*int* index)| Gets the name of the specified ammo type index. |
|
||||
| *int* Index(*string* name)| Gets the index of the specified ammo type name. |
|
||||
| *int* PlrDamage(*int* index)| Gets the damage players deal for the specified ammo type. |
|
||||
| *int* NPCDamage(*int* index)| Gets the damage NPCs deal for the specified ammo type. |
|
||||
| *int* MaxCarry(*int* index)| Gets the maximum amount of this ammo type which players should be able to carry. |
|
||||
| *int* DamageType(*int* index)| Gets the type of damage this ammo type deals. |
|
||||
| *int* TracerType(*int* index)| Gets the type of tracer this ammo type uses. |
|
||||
| *float* DamageForce(*int* index)| Gets the amount of force this ammo type deals. |
|
||||
| *int* MinSplashSize(*int* index)| Gets the minimum size of water splashes caused by impacts from this ammo type. |
|
||||
| *int* MaxSplashSize(*int* index)| Gets the maximum size of water splashes caused by impacts from this ammo type. |
|
||||
| *int* Flags(*int* index)| Gets the flags this ammo type uses. |
|
||||
|
||||
***
|
||||
|
||||
## Data Containers
|
||||
These are classes intended to contain and relay specific kinds of data.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user