weapon_physcannon

From Valve Developer Community
Revision as of 11:58, 9 April 2023 by Lxm6 (talk | contribs)
Jump to navigation Jump to search
English (en)Translate (Translate)
Weapon physcannon.png

Template:Entity It's the Zero-Point Energy Field Manipulator (AKA Gravity Gun), used to manipulate physics objects in the game world. In Half-Life 2: Deathmatch Half-Life 2: Deathmatch, players spawn with a gravity gun by default. Before it is picked up, the gravity gun also follows all physics rules as if it were a prop_physics.

Tip.pngTip:To supercharge the Gravity Gun, use an env_global entity to enable the global state super_phys_gun. This does not work in Half-Life 2: Deathmatch or Portal.
Icon-Bug.pngBug:Sometimes the game may crash when the player is holding something at the moment they pick up the gravity gun.  [todo tested in ?]

Dedicated ConVars

g_debug_physcannon

g_debug_physcannon <bool>
Enables Gravity Gun debugging, which shows a wire frame outline around objects when picked up(Default: 0)

physcannon_cone

physcannon_cone <float>
Changes how wide the pickup range is, lower numbers are wider (Default: 0.97)

physcannon_ball_cone

physcannon_ball_cone <float>
Todo: Add a description for this variable.
(Default: 0.997)

physcannon_punt_cone

physcannon_punt_cone <float>
Todo: Add a description for this variable.
(Default: 0.997)

physcannon_minforce

physcannon_minforce <float>
Todo: Add a description for this variable.
(Default: 700.0)

physcannon_maxforce

physcannon_maxforce <float>
Todo: Add a description for this variable.
(Default: 1500.0)

physcannon_maxmass

physcannon_maxmass <float>
Sets the maximum mass at which an object can be picked up by the gravity gun(Default: 250.0)

physcannon_pullforce

physcannon_pullforce <float>
How much force to be used when pulling objects to the player(Default: 4000.0)

physcannon_tracelength

physcannon_tracelength <float>
How far an object can be pulled from(Default: 250.0)

physcannon_mega_enabled

physcannon_mega_enabled <bool>
Enables Dark Energy Field Manipulator(Default: 0).

physcannon_mega_pullforce

physcannon_mega_pullforce <float>
How much force the Dark Energy Field Manipulator (Default: 8000.0)

physcannon_mega_tracelength

physcannon_mega_tracelength <float>
The distance at which the Dark Energy Field Manipulator will be able to pull an object(Default: 850.0)

player_throwforce

player_throwforce <float>
Todo: Add a description for this variable.
(Default: 1000.0)

KeyValues

BaseFadeProp:

Start Fade Dist (fademindist) <float>
Distance at which the entity starts to fade.
End Fade Dist (fademaxdist) <float>
Max fade distance at which the entity is visible.
  • If start fade is <0, the entity will disappear instantly when end fade is hit.
  • If end fade is <0, the entity won't disappear at all. (This is the default behavior.)
The values will scale appropriately if the entity is in a 3D Skybox.
Fade Scale (fadescale) <float>
If you specify so in worldspawn, or if the engine is running below DirectX 8 (DX7 in Source 2006), props will fade out even if the fade distances above aren't specified. This value gives you some control over when this happens: numbers smaller than 1 cause the prop to fade out at further distances, while those greater than 1 cause it to fade out at closer distances. Using 0 turns off the forced fade altogether. See also the QC command $noforcedfade.

Flags

Start Constrained : [1]
Prevents the model from moving. Off by default.
Start without grab functionality. : [2]
Obsolete (in all games since Half-Life 2: Episode One)
Deny player pickup (reserve for NPC) : [2] (in all games since Half-Life 2: Episode One)
Not puntable by Gravity Gun : [4] (in all games since Half-Life 2: Episode One)

Inputs

EnableGrab
Enable the grab functionality. Obsolete (in all games since Half-Life 2: Episode One)


Outputs

Weapon:

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