Func physbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(stub)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=func_physbox}}
{{wrongtitle|title=func_physbox}}
{{stub}}
==Entity Description==
==Entity Description==
A physically simulated brush.
A brush entity that's physically simulated.
 
==Keyvalues==
The overall weight of the [[func_physbox]] can be changed by changing the Mass Scale key.
* {{kv breakablebrush}}
Numbers larger than one will make it heavier and numbers smaller than one will make it lighter. If set to 0 it will behave as if it were set to 1.
* '''_minlight'''
 
: <integer> The minimum level of ambient light that hits this brush.
Constraints, such as [[phys_lengthconstraint]] can be applied to [[func_physbox]]es.
* '''Damagetype'''
 
: {{boolean}} If set, damage type is sharp, otherwise blunt
* '''massScale'''
: <(float> A scale multiplier for the object's mass.
* '''overridescript'''
: <string> A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'.
* '''damagetoenablemotion'''
: <integer> If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
* '''forcetoenablemotion'''
: <float> If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion.
* '''preferredcarryangles'''
: <vector> If the 'Use Preferred Carry Angles' spawnflag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE.
* '''notsolid'''
: {{boolean}} Not solid to world
==Flags==
* {{fl breakablebrush}}
* 4096 : Start Asleep
* 8192 : Ignore +USE for Pickup
* 16384 : Debris - Don't collide with the player or other debris
* 32768 : Motion Disabled
* 65536 : Use Preferred Carry Angles
* 131072 : Enable motion on Physcannon grab
* 262144 : Not affected by rotor wash
* 524288 : Generate output on +USE
==Inputs==
* {{i breakablebrush}}
* '''Wake'''
: Wake up this physics object, if it is sleeping.
* '''Sleep'''
: Put this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this.
* '''EnableMotion'''
: Enable physics motion/collision response.
* '''DisableMotion'''
: Disable physics motion/collision response.
* '''ForceDrop'''
: If this object is being carried by a player, with the physgun or +USE, force it to be dropped.
==Outputs==
* {{o breakablebrush}}
* '''OnDamaged'''
: Fired when this entity is damaged.
* '''OnAwakened'''
: Fired when this entity becomes awake (collision/force is applied).
* '''OnMotionEnabled'''
: Fired when motion is enabled due to damage/physcannon/force.
* '''OnPhysGunPickup'''
: Fired when a player picks this object up, either with the physgun or +USE.
* '''OnPhysGunDrop'''
: Fired when a player drops this object.
* '''OnPlayerUse'''
: Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.
==See Also==
* [[Prop Type Overview]]
[[Category:Entities]]
[[Category:Entities]]
----
===See Also===
[[List of entities]]
[[Overview of Prop Types - Description of the various model prop entities.|Overview of Prop Types]]

Revision as of 23:58, 17 August 2005

Template:Wrongtitle

Entity Description

A brush entity that's physically simulated.

Keyvalues

<integer> The minimum level of ambient light that hits this brush.
  • Damagetype
<boolean> If set, damage type is sharp, otherwise blunt
  • massScale
<(float> A scale multiplier for the object's mass.
  • overridescript
<string> A list of physics key/value pairs that are usually in a physics prop .qc file. Format is 'key,value,key,value,etc'.
  • damagetoenablemotion
<integer> If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.
  • forcetoenablemotion
<float> If specified, this object will start motion disabled. Any impact that imparts a force greater than this value on the physbox will enable motion.
  • preferredcarryangles
<vector> If the 'Use Preferred Carry Angles' spawnflag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE.
  • notsolid
<boolean> Not solid to world

Flags

  • Breakable (brush):
Only Break on Trigger : [1]
Break on Touch : [2]
Break on Pressure : [4]
Break immediately on Physics : [512]
Don't take physics damage : [1024]
Don't allow bullet penetration : [2048]
  • 4096 : Start Asleep
  • 8192 : Ignore +USE for Pickup
  • 16384 : Debris - Don't collide with the player or other debris
  • 32768 : Motion Disabled
  • 65536 : Use Preferred Carry Angles
  • 131072 : Enable motion on Physcannon grab
  • 262144 : Not affected by rotor wash
  • 524288 : Generate output on +USE

Inputs

  • BreakableBrush:
Break
Breaks the breakable.
SetHealth <integerRedirectInput/integer>
Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.
AddHealth <integerRedirectInput/integer>
Adds health to the breakable.
RemoveHealth <integerRedirectInput/integer>
Removes health from the breakable.
SetMass <floatRedirectInput/float>
Damaging the entity applies physics forces to it.
  • Wake
Wake up this physics object, if it is sleeping.
  • Sleep
Put this physics object to sleep. It will wake if given the Wake input, or if force is applied to it. Note that physics objects go to sleep automatically after coming to rest for a while, so you don't really need to use this.
  • EnableMotion
Enable physics motion/collision response.
  • DisableMotion
Disable physics motion/collision response.
  • ForceDrop
If this object is being carried by a player, with the physgun or +USE, force it to be dropped.

Outputs

  • BreakableBrush:
OnBreak
!activator = entity that breaks the object
!caller = this entity
Fired when this object breaks.
OnHealthChanged <floatRedirectOutput/float>
!activator = entity that caused the health change
!caller = this entity
Fired whenever the health of the breakable has increased or decreased. This output automatically puts the new health amount as a decimal percent (e.g. 45% = 0.45) into the parameter box for inputs, if the mapper does not override the parameter with something else.
  • OnDamaged
Fired when this entity is damaged.
  • OnAwakened
Fired when this entity becomes awake (collision/force is applied).
  • OnMotionEnabled
Fired when motion is enabled due to damage/physcannon/force.
  • OnPhysGunPickup
Fired when a player picks this object up, either with the physgun or +USE.
  • OnPhysGunDrop
Fired when a player drops this object.
  • OnPlayerUse
Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.

See Also