Skip to main content

func_physbox

Mesh Entity

A brush entity that's physically simulated.

Keyvalues

  • Skip pre-settle (skipPreSettle) <Boolean>
    If set this entity will not particpate in the physics pre-settle during compile, but will start awake in game.

  • Render Mode (rendermode) <Choices>
    Used to set a non-standard rendering mode on this entity. See also 'FX Amount' and 'FX Color'.

    • Normal
    • Color
    • Texture
    • Glow
    • Solid
    • Additive
    • Additive Fractional Frame
    • World Space Glow
    • Dont Render
    • Dev Visualizer
  • Render FX (renderfx) <Choices>

    • Normal
    • Slow Pulse
    • Fast Pulse
    • Slow Wide Pulse
    • Fast Wide Pulse
    • Slow Strobe
    • Fast Strobe
    • Faster Strobe
    • Slow Flicker
    • Fast Flicker
    • Slow Fade Away
    • Fast Fade Away
    • Slow Become Solid
    • Fast Become Solid
    • Constant Glow
    • Distort
    • Hologram (Distort + fade)
    • Cull By Distance (TEST)
    • Spotlight FX
    • Fade Near
  • FX Amount (0 - 255) (renderamt) <Integer>
    The FX amount is used by the selected Render Mode.

  • FX Color (R G B) (rendercolor) <Color255>
    The FX color is used by the selected Render Mode.

  • Disable Receiving Shadows (disablereceiveshadows) <Boolean>

  • Start Fade Dist (fademindist) <Float>
    Distance at which the overlay starts to fade (-1 = subtract from fademaxdist).

  • End Fade Dist (fademaxdist) <Float>
    Maximum distance at which the overlay is visible (0 = don't fade out).

  • Culling Behaviour (object_culling) <Choices>
    Modifies culling behaviour when the object is small / distant

    • Default
    • Smaller than default
    • Much smaller than default
    • When extremely small
  • Render to Cubemaps (rendertocubemaps) <Boolean>
    If true, this geometry renders into baked cube maps

  • Lightmap Static (lightmapstatic) <Choices>
    Determines if this geometry be considered static & cast shadows/bounce light when baking lightmaps?

    • No
    • Yes
    • Bounce Only
  • Global Entity Name (globalname) <String>
    Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.

  • Parent (parentname) <TargetDestination>
    The name of this entity's parent in the movement hierarchy. Entities with parents move with their parent.

  • Parent Bone/Attachment Name (parentAttachmentName) <ParentAttachment>
    The name of the bone or attachment to attach to on the entity's parent in the movement hierarchy. Use !bonemerge to use bone-merge style attachment. NOTE: If this is specified the Hammer transform will be disregarded, even if 'Use Local Transform' is NOT specified (in that case local transform will be identity)

  • Use Local Transform (useLocalOffset) <Boolean>
    Whether to respect the specified local offset when doing the initial hierarchical attachment to its parent.

  • Local Origin (local.origin) <Vector>
    Offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Local Angles (local.angles) <Angle>
    Angular offset in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Local Scale (local.scales) <Vector>
    Scale in the local space of the parent model's attachment/bone to use in hierarchy. Not used if you are not using parent attachment.

  • Cast Shadows (disableshadows) <Choices>
    Used to disable shadow casting from this entity.

    • Enabled
    • No Shadows
    • Only Realtime Shadows
    • Only Baked Shadows
  • Damage Filter (damagefilter) <TargetDestination>
    Name of the filter entity that controls which entities can damage us.

  • Entity Scripts (vscripts) <ScriptList>
    Name(s) of script files that are executed after all entities have spawned.

  • Name (targetname) <TargetSource>
    The name that other entities refer to this entity by.

  • Explosion Damage (ExplodeDamage) <Float>
    If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage. See also 'Explosion Radius'.

  • Explosion Radius (ExplodeRadius) <Float>
    If non-zero, when this entity breaks it will create an explosion with a radius of the specified amount. See also 'Explosion Damage'.

  • Performance Mode (PerformanceMode) <Choices>
    Used to limit the amount of gibs produced when this entity breaks, for performance reasons.

    • Normal
    • No Gibs
  • Disable Client-Side Interpolation (NoInterpolate) <Boolean>

  • Spawnflags (spawnflags) <Flags>

    • Only Break on Trigger
    • Break on Touch
    • Break on Pressure
    • Break immediately on Physics
    • Don't take physics damage
    • Don't allow bullet penetration
    • Don't allow hand physics damage
  • Prop Data (propdata) <Choices>
    Set to the best approximation of the size and material of this entity's brushes. If set, it will override this entity's health and damage taken from various weapons. See the propdata.txt file in the scripts directory of your MOD to get a detailed list of what each entry specifies.

    • None
    • Wooden.Tiny
    • Wooden.Small
    • Wooden.Medium
    • Wooden.Large
    • Wooden.Huge
    • Metal.Small
    • Metal.Medium
    • Metal.Large
    • Cardboard.Small
    • Cardboard.Medium
    • Cardboard.Large
    • Stone.Small
    • Stone.Medium
    • Stone.Large
    • Stone.Huge
    • Glass.Small
    • Plastic.Small
    • Plastic.Medium
    • Plastic.Large
    • Pottery.Small
    • Pottery.Medium
    • Pottery.Large
    • Pottery.Huge
    • Glass.Window
  • Strength (health) <Integer>
    Number of points of damage to take before breaking. 0 means don't break.

  • Material Type (material) <Choices>
    Set to the material type of the brush. Used to decide what sounds to make when damaged, and what gibs to produce when broken.

    • Glass
    • Wood
    • Metal
    • Flesh
    • CinderBlock
    • Ceiling Tile
    • Computer
    • Unbreakable Glass
    • Rocks
    • None
  • Gibs Direction (explosion) <Choices>
    Used to decide which direction to throw gibs when broken.

    • Random
    • Relative to Attack
    • Use Precise Gib Dir
  • Damaging it Doesn't Push It (nodamageforces) <Boolean>
    Used to determine whether or not damage should cause the brush to move.

  • Spawn On Break (spawnobject) <Choices>
    When broken, an entity of the selected type will be created.

    • item_battery
    • item_healthkit
    • item_ammo_pistol
    • item_ammo_pistol_large
    • item_ammo_smg1
    • item_ammo_smg1_large
    • item_ammo_ar2
    • item_ammo_ar2_large
    • item_box_buckshot
    • item_flare_round
    • item_box_flare_rounds
    • item_ml_grenade
    • item_smg1_grenade
    • item_box_sniper_rounds
    • unused1
    • weapon_stunstick
    • weapon_ar1
    • weapon_ar2
    • unused2
    • weapon_ml
    • weapon_smg1
    • weapon_smg2
    • weapon_slam
    • weapon_shotgun
    • weapon_molotov
    • item_dynamic_resupply
  • Explode Magnitude (explodemagnitude) <Integer>
    If non-zero, when this entity breaks it will create an explosion that causes the specified amount of damage.

  • Pressure Delay (pressuredelay) <Float>
    Delay, in seconds, after 'broken' by pressure before breaking apart (allows for sound to play before breaking apart).

  • Minimum Light Level (_minlight) <String>
    The minimum level of ambient light that hits this brush.

  • Spawnflags (spawnflags) <Flags>

    • Debris - Don't collide with the player or other debris
    • Motion Disabled
    • Start Asleep
    • Prevent motion enable on player bump
    • Force nav-ignore
  • Add Modifier (add_modifier) <String>
    Will add this modifier when the entity spawns.

  • Impact Damage Type (Damagetype) <Choices>

    • Disabled
    • Blunt
    • Sharp
  • Mass Override (gamemass) <Integer>
    Override the mass of the object instead of calculating it based on the size / shape and material.

  • Mass Scale (massScale) <Float>
    A scale multiplier for the object's mass. 0 = use auto-calculated mass based on the object's size / shape and material

  • Center of Mass Offset (masscenteroffset) <Vector>
    Offset in local space applied to the object's center of mass.

  • Buoyancy Scale (buoyancyscale) <Float>
    Scale on the buoyancy / fluid forces applied to this object

  • Health Level to Override Motion (damagetoenablemotion) <Integer>
    If specified, this object will start motion disabled. Once its health has dropped below this specified amount, it will enable motion.

  • Physics Impact Force to Override 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.

  • Enable +Use Output (enableuseoutput) <Boolean>
    Enables OnPlayerUse output being fired when this object is used

  • Strength (health) <Integer>
    Number of points of damage to take before breaking. 0 means don't break.

  • **** (hoverposeflags) <Flags>

    • Position
    • Angles
  • Player-carry Hover Position (hoverposeposition) <Vector>
    If the hoverposeflags Position flag is set, this position is the position which the object should move when the player picks it up, with the physgun or +USE.

  • Player-carry Hover Angles (hoverposeangles) <Vector>
    If the hoverposeflags Angles flag is set, this angle is the angle which the object should orient to when the player picks it up, with the physgun or +USE.

  • Not solid to world (notsolid) <Choices>

    • Solid to World
    • Passes through World
  • Start Touch Per Entity Refire Delay (touchoutputperentitydelay) <Float>
    When set to 0 OnStartTouch events are never sent. Otherwise it's a delay in seconds before another OnStartTouch is sent for the same entity.

Inputs

  • Alpha <Integer>
    Set the sprite's alpha (0 - 255).

  • Color <Color255>
    Set the sprite's color (R G B).

  • SetParent <TargetDestination>
    Changes the entity's parent in the movement hierarchy.

  • SetParentAttachment <String>
    Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.

  • SetParentAttachmentMaintainOffset <String>
    Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the parent at the time it is attached.

  • ClearParent <Void>
    Removes this entity from the the movement hierarchy, leaving it free to move independently.

  • FollowEntity <String>
    Bone merges this entity to a parent entity. Call again passing nothing to end the bone merge.

  • DisableShadow <Void>
    Turn shadow off.

  • EnableShadow <Void>
    Turn shadow on.

  • SetDamageFilter <String>
    Sets the entity to use as damage filter. Pass in an empty string to clear the damage filter.

  • RunScriptFile <String>
    Load and execute a script file

  • RunScriptCode <String>
    Execute a fragment of script code

  • CallScriptFunction <String>
    Call a script function

  • CallPrivateScriptFunction <String>
    Calls a script function from this entity's private script scope.

  • CallGlobalScriptFunction <String>
    Calls a script function in the global script scope.

  • Kill <Void>
    Removes this entity from the world.

  • KillHierarchy <Void>
    Removes this entity and all its children from the world.

  • KillConstrained <Void>
    Removes this entity, all its children, and anything constrained to it, from the world.

  • AddOutput <String>
    Adds an entity I/O connection to this entity. Parameter format: outputname>targetname>inputname>parameter>delay>max times to fire (-1 == infinite). Very dangerous, use with care.

  • FireUser1 <Void>
    Causes this entity's OnUser1 output to be fired.

  • FireUser2 <Void>
    Causes this entity's OnUser2 output to be fired.

  • FireUser3 <Void>
    Causes this entity's OnUser3 output to be fired.

  • FireUser4 <Void>
    Causes this entity's OnUser4 output to be fired.

  • Break <Void>
    Breaks the breakable.

  • SetHealth <Integer>
    Sets a new value for the breakable's health. If the breakable's health reaches zero it will break.

  • AddHealth <Integer>
    Adds health to the breakable. If the breakable's health reaches zero it will break.

  • RemoveHealth <Integer>
    Removes health from the breakable. If the breakable's health reaches zero it will break.

  • SetMass <Float>
    Set mass of this object.

  • EnableDamageForces <Void>
    Damaging the entity applies physics forces to it.

  • DisableDamageForces <Void>
    Damaging the entity does not apply physics forces to it.

  • Wake <Void>
    Wake up this physics object, if it is sleeping.

  • Sleep <Void>
    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 <Void>
    Enable physics motion/collision response.

  • DisableMotion <Void>
    Disable physics motion/collision response.

  • ForceDrop <Void>
    If this object is being carried by a player, with the physgun or +USE, force it to be dropped.

Outputs

  • OnUser1 <Void>
    Fired in response to FireUser1 input.

  • OnUser2 <Void>
    Fired in response to FireUser2 input.

  • OnUser3 <Void>
    Fired in response to FireUser3 input.

  • OnUser4 <Void>
    Fired in response to FireUser4 input.

  • OnKilled <Void>
    Fired when the entity is killed and removed from the game. Parameter is the inflictor.

  • OnStartDeath <Void>
    Fired when this prop has begun dying (breaking) before other death-related callbacks.

  • OnBreak <Void>
    Fired when this breakable breaks.

  • OnHealthChanged <Float>
    Fired when the health of this breakable changes, passing the new value of health as a percentage of max health, from [0..1].

  • OnDamaged <Void>
    Fired when this entity is damaged.

  • OnAwakened <Void>
    Fired when this entity becomes awake (collision/force is applied).

  • OnMotionEnabled <Void>
    Fired when motion is enabled due to damage/physcannon/force.

  • OnPlayerUse <Void>
    Fired when the player tries to +USE the physbox. This output will fire only if the Generate output on +USE spawnflag is set.

  • OnStartTouch <Void>
    Fired when it touches with another entity. Activator is the other entity.