Limited support
This feature is only present in Portal 2: Community Edition.WeaponsAPI
Functions
CanSwitchToWeapon
WeaponsAPI.CanSwitchToWeapon(id: number): boolean
No description provided.
Parameter
Name | Type | Description |
id | number | No description provided. |
DropWeapon
WeaponsAPI.DropWeapon(id: number, throwVecX: number, throwVecY: number, throwVecZ: number): boolean
No description provided.
Parameters
Name | Type | Description |
id | number | No description provided. |
throwVecX | number | No description provided. |
throwVecY | number | No description provided. |
throwVecZ | number | No description provided. |
GetActiveWeapon
WeaponsAPI.GetActiveWeapon(): uint32
No description provided.
GetActiveWeaponInfo
WeaponsAPI.GetActiveWeaponInfo(): Weapon | null
No description provided.
GetWeaponCount
WeaponsAPI.GetWeaponCount(): uint32
No description provided.
GetWeaponIndexFromClass
WeaponsAPI.GetWeaponIndexFromClass(classname: string): uint32
No description provided.
Parameter
Name | Type | Description |
classname | string | No description provided. |
GetWeaponInfo
WeaponsAPI.GetWeaponInfo(id: number): Weapon | null
No description provided.
Parameter
Name | Type | Description |
id | number | No description provided. |
GetWeapons
WeaponsAPI.GetWeapons(): (Weapon | null)[]
No description provided.
HasWeapon
WeaponsAPI.HasWeapon(id: number): boolean
No description provided.
Parameter
Name | Type | Description |
id | number | No description provided. |
HasWeaponClass
WeaponsAPI.HasWeaponClass(classname: string): boolean
No description provided.
Parameter
Name | Type | Description |
classname | string | No description provided. |
SwitchToWeapon
WeaponsAPI.SwitchToWeapon(id: number): boolean
No description provided.
Parameter
Name | Type | Description |
id | number | No description provided. |