mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-15 00:07:58 +03:00
Updated VScript in Mapbase (markdown)
parent
287fe35fe5
commit
e820632ca1
@ -30,7 +30,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft
|
||||
* [CBaseCombatCharacter](VScript-in-Mapbase#CBaseCombatCharacter)
|
||||
* [CBaseCombatWeapon](VScript-in-Mapbase#CBaseCombatWeapon)
|
||||
* [CAI_BaseNPC](VScript-in-Mapbase#CAI_BaseNPC)
|
||||
* [Hooks](VScript-in-Mapbase#Hooks)
|
||||
* [Hooks](VScript-in-Mapbase#CAI_BaseNPC-Hooks)
|
||||
* [CAI_BaseActor](VScript-in-Mapbase#CAI_BaseActor)
|
||||
* [CAI_Network](VScript-in-Mapbase#CAI_Network)
|
||||
* [CAI_Hint](VScript-in-Mapbase#CAI_Hint)
|
||||
@ -41,7 +41,7 @@ For more information on VScript itself, [click here](https://developer.valvesoft
|
||||
* [CLogicExternalData](VScript-in-Mapbase#CLogicExternalData)
|
||||
* [Modified VScript Classes](VScript-in-Mapbase#Modified-VScript-Classes)
|
||||
* [CBaseEntity](VScript-in-Mapbase#CBaseEntity)
|
||||
* [Hooks](VScript-in-Mapbase#Hooks_2)
|
||||
* [Hooks](VScript-in-Mapbase#CBaseEntity-Hooks)
|
||||
* [CBasePlayer](VScript-in-Mapbase#CBasePlayer)
|
||||
* [CScriptKeyValues](VScript-in-Mapbase#CScriptKeyValues)
|
||||
|
||||
@ -49,9 +49,6 @@ For more information on VScript itself, [click here](https://developer.valvesoft
|
||||
|
||||
# Known incompatibilities with Valve's VScript
|
||||
|
||||
#### [List of L4D2 Script Functions](https://developer.valvesoftware.com/wiki/List_of_L4D2_Script_Functions)
|
||||
#### [List of Portal 2 Script Functions](https://developer.valvesoftware.com/wiki/List_of_Portal_2_Script_Functions)
|
||||
|
||||
Some features from Valve's games are not available in Mapbase's implementation of VScript, although some may be available in the future.
|
||||
|
||||
* Most of the global functions are not yet available because many of them are game-specific and are not included in the Alien Swarm SDK.
|
||||
@ -75,6 +72,9 @@ A few tutorials are available for using VScript in Mapbase.
|
||||
|
||||
# Documentation
|
||||
|
||||
#### [List of L4D2 Script Functions](https://developer.valvesoftware.com/wiki/List_of_L4D2_Script_Functions)
|
||||
#### [List of Portal 2 Script Functions](https://developer.valvesoftware.com/wiki/List_of_Portal_2_Script_Functions)
|
||||
|
||||
A lot of the documentation for VScript on the VDC applies to Mapbase, but Mapbase also extends the VScript support in various ways, mostly to make it able to operate upon NPCs and other Source 2013/Half-Life 2 conventions.
|
||||
|
||||
In addition to the original VScript inputs, Mapbase introduces a new `RunScriptCodeQuotable` input. This operates the same way as `RunScriptCode`, but double apostrophes ('') are converted to quotation marks ("), allowing code with strings to be run from Hammer and in-game `ent_fire`.
|
||||
@ -104,8 +104,8 @@ The base class shared by players and NPCs.
|
||||
| *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. |
|
||||
| *Vector* ShootPosition()| Get the character's shoot position. |
|
||||
| *void* DropAllWeapons()| Make the character drop all of its weapons. |
|
||||
| *void* EquipWeapon()| Make the character equip the specified weapon. If they don't already own the weapon, they will acquire it instantly. |
|
||||
| *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* GetRelationship(handle *target*)| Get a character's relationship to a specific entity. |
|
||||
@ -201,7 +201,7 @@ The base class all NPCs derive from.
|
||||
|
||||
***
|
||||
|
||||
#### Hooks
|
||||
#### CAI_BaseNPC Hooks
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
@ -370,7 +370,7 @@ Root class of all server-side entities.
|
||||
|
||||
***
|
||||
|
||||
#### Hooks
|
||||
#### CBaseEntity Hooks
|
||||
|
||||
| Signature | Description |
|
||||
|:------------- | :-----|
|
||||
|
Loading…
x
Reference in New Issue
Block a user