Updated VScript in Mapbase (markdown)

Blixibon 2020-05-23 14:30:16 -05:00
parent 25efcee9e1
commit f979055875

@ -25,6 +25,7 @@ Mapbase's implementation of VScript does **not** use any leaked code whatsoever.
* [Global Functions](VScript-in-Mapbase#Global-Functions)
* [New VScript Classes](VScript-in-Mapbase#New-VScript-Classes)
* [CBaseCombatCharacter](VScript-in-Mapbase#CBaseCombatCharacter)
* [CBaseCombatWeapon](VScript-in-Mapbase#CBaseCombatWeapon)
* [CAI_BaseNPC](VScript-in-Mapbase#CAI_BaseNPC)
* [Hooks](VScript-in-Mapbase#Hooks)
* [CAI_BaseActor](VScript-in-Mapbase#CAI_BaseActor)
@ -102,8 +103,39 @@ The base class shared by players and NPCs.
***
### CBaseCombatWeapon
The base class all equippable weapons derive from.
| Signature | Description |
|:------------- | :-----|
| *int* Clip1()| Get the weapon's current primary ammo. |
| *int* Clip2()| Get the weapon's current secondary ammo. |
| *int* GetMaxClip1()| Get the weapon's maximum primary ammo. |
| *int* GetMaxClip2()| Get the weapon's maximum secondary ammo. |
| *int* GetDefaultClip1()| Get the weapon's default primary ammo. |
| *int* GetDefaultClip2()| Get the weapon's default secondary ammo. |
| *bool* HasAnyAmmo()| Check if the weapon currently has ammo or doesn't need ammo. |
| *bool* HasPrimaryAmmo()| Check if the weapon currently has ammo or doesn't need primary ammo. |
| *bool* HasSecondaryAmmo()| Check if the weapon currently has ammo or doesn't need secondary ammo. |
| *bool* UsesPrimaryAmmo()| Check if the weapon uses primary ammo. |
| *bool* UsesSecondaryAmmo()| Check if the weapon uses secondary ammo. |
| *void* GiveDefaultAmmo()| Fill the weapon back up to default ammo. |
| *bool* UsesClipsForAmmo1()| Check if the weapon uses clips for primary ammo. |
| *bool* UsesClipsForAmmo2()| Check if the weapon uses clips for secondary ammo. |
| *int* GetPrimaryAmmoType()| Get the weapon's primary ammo type. |
| *int* GetSecondaryAmmoType()| Get the weapon's secondary ammo type. |
| *int* GetSubType()| Get the weapon's subtype. |
| *void* SetSubType()| Set the weapon's subtype. |
| *int* GetFireRate()| Get the weapon's firing rate. |
| *string* GetWorldModel()| Get the weapon's world model. |
| *string* GetViewModel()| Get the weapon's view model. |
| *float* GetWeight()| Get the weapon's weight. |
| *bool* CanBePickedUpByNPCs()| Check if the weapon can be picked up by NPCs. |
***
### CAI_BaseNPC
The base class shared all NPCs derive from.
The base class all NPCs derive from.
| Signature | Description |
|:------------- | :-----|
@ -119,15 +151,15 @@ The base class shared all NPCs derive from.
| *void* CapabilitiesAdd(int *capabilities*)| Add capabilities to the NPC. |
| *void* CapabilitiesRemove(int *capabilities*)| Remove capabilities from the NPC. |
| *void* CapabilitiesClear()| Clear capabilities for the NPC. |
| *void* GetActivity()| Get the NPC's current activity. |
| *void* GetActivityID()| Get the NPC's current activity ID. |
| *void* SetActivity()| Set the NPC's current activity. |
| *void* SetActivityID()| Set the NPC's current activity ID. |
| *string* GetActivity()| Get the NPC's current activity. |
| *int* GetActivityID()| Get the NPC's current activity ID. |
| *void* SetActivity(string *activity*)| Set the NPC's current activity. |
| *void* SetActivityID(int *activity*)| Set the NPC's current activity ID. |
| *void* ResetActivity()| Reset the NPC's current activity. |
| *string* GetSchedule()| Get the NPC's current schedule. |
| *int* GetScheduleID()| Get the NPC's current schedule ID. |
| *void* SetSchedule(string *schedule*)| Set the NPC's current schedule. |
| *void* SetScheduleID(int *sched*)| Set the NPC's current schedule ID. |
| *void* SetScheduleID(int *schedule*)| Set the NPC's current schedule ID. |
| *string* GetTask()| Get the NPC's current task. |
| *int* GetTaskID()| Get the NPC's current task ID. |
| *void* ClearSchedule(string *reason*)| Clear the NPC's current schedule for the specified reason. |