Weapon physcannon: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (spam revert & minor tidy)
(→‎Entity description: clean up & minor additions)
Line 4: Line 4:
[[Image:hammerphyscannon.jpg|thumb|right|250px|The Zero Point Energyfield Manipulator<br>(Gravity Gun)]]
[[Image:hammerphyscannon.jpg|thumb|right|250px|The Zero Point Energyfield Manipulator<br>(Gravity Gun)]]


A gravity gun, used to manipulate physics objects in the game world. (It was designed for handling hazardous materials, but the people at Eli's lab mainly used it for heavy lifting.)
A gravity gun, used to manipulate physics objects in the game world.  


Like all weapon entities, it follows all physics rules as if it were a [[prop_physics]].
{{HL2}} The [[wiki:Zero-Point_Energy_Field_Manipulator|Zero-Point Energy Field Manipulator]] was designed for handling hazardous materials, but the people at Eli's lab mainly used it for heavy lifting and playing "catch".


In [[Half-Life 2: Deathmatch]], the player spawns with a gravity gun by default.
* The [[weapon_physcannon]] does not require any ammunition or recharging. Special interactions between a physics prop and the gravity gun are defined by the [[physgun_interactions]] in the model's QC file.
{{clr}}{{tip|To upgrade the gravity gun to the blue ''super'' gravity gun, you will have to set up an [[env_global]] entity to look like this:}}


* The [[weapon_physcannon]] has two ''attacks'' : '''punt''' and '''grab'''. The effective range of each attack depends largely on the mass of the prop or item model. Some NPCs (antlions and headcrabs) are pushed back by the impact of a ''punt'' at close range.
* When placed as an entity the [[weapon_physcannon]]'s world model (<code>weapons/w_physics.mdl</code>) behaves like a [[prop_physics]] until 'picked-up' by a player. (In [[Half-Life 2: Deathmatch]], the player spawns with a gravity gun by default. See also [[game_player_equip]].)
{{clr}}
{{tip|To upgrade the gravity gun to the blue ''super'' gravity gun, you will have to set up an [[env_global]] entity to look like this:}}
{{entity-kvalue-start|[[env_global]]}}
{{entity-kvalue-start|[[env_global]]}}
{{entity-kvalue|Initial State|On|This entity can either be triggered by a ''TurnOn'' signal,}}
{{entity-kvalue|Initial State|On|This entity can either be triggered by a ''TurnOn'' signal,}}
{{entity-kvalue|Global State to Set|Super phys gun is enabled|or start on by setting its ''Set Initial State'' flag.}}
{{entity-kvalue|Global State to Set|Super phys gun is enabled|or start on by setting its ''Set Initial State'' flag.}}
{{entity-kvalue-end}}
{{entity-kvalue-end}}
{{tip|If you would prefer a ''subtle'' gravity gun to a ''super'' gravity gun, see [http://skew.telefragged.com/mods/hl2/ARGG/ Adnan's Rotational Grav Gun] - a 4MB single-player demo mod that simply allows the player to ''rotate'' objects held by the Gravgun.}}
{{clr}}


== Dedicated [[ConVar|console variables]] ==
== Dedicated [[ConVar|console variables]] ==

Revision as of 08:08, 1 April 2008

Template:Wrongtitle

Entity description

The Zero Point Energyfield Manipulator
(Gravity Gun)

A gravity gun, used to manipulate physics objects in the game world.

Half-Life 2 The Zero-Point Energy Field Manipulator was designed for handling hazardous materials, but the people at Eli's lab mainly used it for heavy lifting and playing "catch".

  • The weapon_physcannon does not require any ammunition or recharging. Special interactions between a physics prop and the gravity gun are defined by the physgun_interactions in the model's QC file.
  • The weapon_physcannon has two attacks : punt and grab. The effective range of each attack depends largely on the mass of the prop or item model. Some NPCs (antlions and headcrabs) are pushed back by the impact of a punt at close range.
Tip.pngTip:To upgrade the gravity gun to the blue super gravity gun, you will have to set up an env_global entity to look like this:
Class: env_global
Keyvalues Comments
Initial State On This entity can either be triggered by a TurnOn signal,
Global State to Set Super phys gun is enabled or start on by setting its Set Initial State flag.
Tip.pngTip:If you would prefer a subtle gravity gun to a super gravity gun, see Adnan's Rotational Grav Gun - a 4MB single-player demo mod that simply allows the player to rotate objects held by the Gravgun.

Dedicated console variables

  • g_debug_physcannon (Default: 0)
<boolean>
  • physcannon_cone (Default: 0.97)
<float>
  • physcannon_ball_cone (Default: 0.997)
<float>
  • physcannon_punt_cone (Default: 0.997)
<float>
  • physcannon_minforce (Default: 700.0)
<float>
  • physcannon_maxforce (Default: 1500.0)
<float>
  • physcannon_maxmass (Default: 250.0)
<float>
  • physcannon_pullforce (Default: 4000.0)
<float>
  • physcannon_tracelength (Default: 250.0)
<float>
  • physcannon_mega_pullforce (Default: 8000.0)
<float>
  • physcannon_mega_tracelength (Default: 850.0)
<float>
  • player_throwforce (Default: 1000.0)
<float>

Keyvalues

Flags

  • 1 : Start Constrained
Prevents the model from moving. Off by default.

Inputs

  • EnableGrab
Enable the grab functionality. Template:Ep1 add

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.
  • OnNPCPickup
Fires when an NPC picks up this weapon.