diff --git a/VScript-in-Mapbase.md b/VScript-in-Mapbase.md index 15dd7d3..e45a23a 100644 --- a/VScript-in-Mapbase.md +++ b/VScript-in-Mapbase.md @@ -18,6 +18,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft * [Entity Classes](VScript-in-Mapbase#Entity-Classes) * [CBaseEntity](VScript-in-Mapbase#CBaseEntity) * [Hooks](VScript-in-Mapbase#CBaseEntity-Hooks) + * [CBaseAnimating](VScript-in-Mapbase#CBaseAnimating) * [CBaseCombatWeapon](VScript-in-Mapbase#CBaseCombatWeapon) * [CBaseCombatCharacter](VScript-in-Mapbase#CBaseCombatCharacter) * [CBasePlayer](VScript-in-Mapbase#CBasePlayer) @@ -31,6 +32,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft * [CPropVehicle](VScript-in-Mapbase#CPropVehicle) * [CPropVehicleDriveable](VScript-in-Mapbase#CPropVehicleDriveable) * [CBaseFilter](VScript-in-Mapbase#CBaseFilter) + * [CSceneListManager](VScript-in-Mapbase#CSceneListManager) * [CLogicExternalData](VScript-in-Mapbase#CLogicExternalData) * [Singletons *(Game Systems)*](VScript-in-Mapbase#Singletons) * [CAI_Network](VScript-in-Mapbase#CAI_Network) @@ -176,9 +178,9 @@ Root class of all server-side entities. This class was already exposed to VScrip | Signature | Description | |:------------- | :-----| -| *bool* IsVisible(Vector *target*)| Check if the specified position can be visible to this entity. | -| *bool* IsEntVisible(handle *target*)| Check if the specified entity can be visible to this entity. | -| *bool* IsVisibleWithMask(Vector *target*, int *traceMask*)| Check if the specified position can be visible to this entity with a specific trace mask. | +| *bool* IsVisible(*Vector* target)| Check if the specified position can be visible to this entity. | +| *bool* IsEntVisible(*CBaseEntity* target)| Check if the specified entity can be visible to this entity. | +| *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 | @@ -191,12 +193,27 @@ Root class of all server-side entities. This class was already exposed to VScrip | *void* RemoveSpawnFlags(int *flags*)| Remove spawnflag(s) | | *void* ClearSpawnFlags()| Clear spawnflag(s) | | *bool* HasSpawnFlags(int *flags*)| Check if the entity has specific spawnflag(s) ticked | +| *Vector* GetColorVector()| Get the render color as a vector | +| *int* GetColorR()| Get the render color's R value | +| *int* GetColorG()| Get the render color's G value | +| *int* GetColorB()| Get the render color's B value | +| *int* GetAlpha()| Get the render color's alpha value | +| *void* SetColorVector(*Vector* value)| Set the render color as a vector | +| *void* SetColorR(*int* value)| Set the render color's R value | +| *void* SetColorG(*int* value)| Set the render color's G value | +| *void* SetColorB(*int* value)| Set the render color's B value | +| *void* SetAlpha(*int* value)| Set the render color's alpha value | | *int* GetEffects()| Get effects | -| *void* AddEffects(int *flags*)| Add effect(s) | -| *void* RemoveEffects(int *flags*)| Remove effect(s) | +| *void* AddEffects(*int* flags)| Add effect(s) | +| *void* RemoveEffects(*int* flags)| Remove effect(s) | | *void* ClearEffects()| Clear effect(s) | -| *void* SetEffects(int *flags*)| Set effect(s) | -| *void* IsEffectActive(int *flags*)| Check if an effect is active | +| *void* SetEffects(*int* flags)| Set effect(s) | +| *void* IsEffectActive(*int* flags)| Check if an effect is active | +| *void* SetAbsAngles(*Vector* value)| Set angles relative to world origin | +| *Vector* GetLocalOrigin()| Get origin relative to parent or world origin | +| *void* SetLocalOrigin(*Vector* value)| Set origin relative to parent or world origin | +| *Vector* GetLocalAngles()| Get angles relative to parent or world origin | +| *void* SetLocalAngles(*Vector* value)| Set angles relative to parent or world origin | | *Vector* EyeAngles()| Get eye pitch, yaw, roll as a vector | | *bool* IsPlayer()| Returns true if this entity is a player. | | *bool* IsNPC()| Returns true if this entity is a NPC. | @@ -214,6 +231,21 @@ Root class of all server-side entities. This class was already exposed to VScrip *** +### CBaseAnimating +Base class for model-based entities. This class was already exposed to VScript, but it has new features or changes included with Mapbase. + +| Signature | Description | +|:------------- | :-----| +| *matrix3x4_t* GetAttachmentMatrix(*int* attachment)| Get the attachment id's matrix transform | +| *float* GetPoseParameter(*string* name)| Get the specified pose parameter's value | +| *float* SetPoseParameter(*string* name, *float* value)| Set the specified pose parameter to the specified value | +| *int* LookupBone(*string* name)| Get the named bone id | +| *void* GetBoneTransform(*int* bone, *matrix3x4_t* matrix)| Get the transform for the specified bone | +| *void* Dissolve(*string* material, *float* startTime, *bool* npcOnly, *int* dissolveType, *Vector* dissolverOrigin, *int* magnitude)| Dissolve. Use `"sprites/blueglow1.vmt"` for the default material, `0` for the default start time, `false` for `npcOnly` if you don't want it to check if the entity is a NPC first, `0` for the default dissolve type, `Vector(0,0,0)` for the default dissolver origin, and `0` for the default magnitude. | +| *void* Scorch(*int* rate, *int* floor)| Makes the entity darker from scorching | + +*** + ### CBaseCombatWeapon The base class all equippable weapons derive from. @@ -259,8 +291,8 @@ The base class shared by players and NPCs. | *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. | -| *int* GetAmmoCount(string *type*)| Get the ammo count of the specified ammo type. | -| *void* SetAmmoCount(string *type*, int *count*)| Set the ammo count of the specified ammo type. | +| *int* GetAmmoCount(int *type*)| Get the ammo count of the specified ammo type. | +| *void* SetAmmoCount(int *type*, int *count*)| Set the ammo count of the specified ammo type. | | *int* GetRelationship(handle *target*)| Get a character's relationship to a specific entity. | | *int* GetRelationPriority(handle *target*)| Get a character's relationship priority for a specific entity. | | *void* SetRelationship(handle *target*, int *disposition*, int *priority*)| Set a character's relationship with a specific entity. | @@ -447,6 +479,15 @@ All entities which could be used as filters. *** +### CSceneListManager +Stores choreo scenes and cleans them up when a later scene in the list begins playing. + +| Signature | Description | +|:------------- | :-----| +| *CSceneEntity* GetScene(*int* index)| Gets the specified scene index from this manager. | + +*** + ### CLogicExternalData An entity which loads keyvalues from an external data file.