weapon_alyxgun

From Valve Developer Community
Jump to navigation Jump to search
Class hierarchy
CWeaponAlyxGun
CHLSelectFireMachineGun
CHLMachineGun
CBaseHLCombatWeapon
CBaseCombatWeapon
CBaseAnimating
CBaseEntity
weapon_alyxgun.cpp
W alyxgun.PNG

weapon_alyxgun is a point entity available in Half-Life 2 series Half-Life 2 series.

Entity description

Alyx's gun. It is not intended to be used; however, it can be used in Half-Life 2 single player by using the command give weapon_alyxgun with the convar sv_cheats set to 1. It is apparently a burst-fire pistol, capable of switching to single shot mode, with considerable strength.

There is no player view model. When used by the player, the weapon is capable of firing in a fully automatic mode. The model the player sees when wielding it is the worldmodel of the gun, hovering in front of them. Other instances result in a giant "ERROR" placeholder model hovering in front of the player, or the gun appearing in a vertical position next to the player's 'head'.

The Alyxgun has its own unique ammo type. It can be wielded both by Alyx, and by citizens. According the animations of its model, it also has the potential to be folded out into a submachine gun and a rifle. Do not use without altering the code to repair it.

Dedicated Console Variables

sk_plr_dmg_alyxgun <int>
Damage done to players.
sk_npc_dmg_alyxgun <int>
Damage done to NPCs.
sk_max_alyxgun <int>
Size of clip. By default in the game this is 30 rounds.

Flags

Start Constrained : [1]

Prevents the model from moving.

Deny player pickup (reserve for NPC) : [2]
Not puntable by Gravity Gun : [4]

Inputs

HideWeapon  !FGD
If this weapon is being held, hide the worldmodel and/or viewmodel via EF_NODRAW. Weapon will still be useable. The weapon will become visible again if the holder is to switch between weapons in their inventory.

Outputs

OnNPCPickup
Fires when an NPC picks up this weapon. (!activator is the NPC.)
OnPlayerUse
Fires when the player +uses this weapon. (!activator is the player.)
OnPlayerPickup
Fires when a player picks up this weapon. (!activator is the player.)
OnCacheInteraction
Fires when the player 'proves' they've found this weapon. Fires on: Player Touch, +USE pickup, Physcannon pickup, Physcannon punt.