Garry's Mod Wiki

Custom Entity Inputs And Outputs

Description

This page describes Garry's Mod specific Hammer inputs and outputs for built-in Source Engine entities.

Some of the features are ported from newer Source Engine versions.

These inputs can be fired from Lua by the use of Entity:Fire and Entity:Input.

Key-values and spawnflags can be set via Entity:SetKeyValue.

Entities

All NPCs

  • Inputs
    • number SetMaxLookDistance - Sets the maximum distance the NPC can see at. Default is 2048, 6000 for long range NPCs.

prop_dynamic

  • Key-values
    • boolean HoldAnimation - If set, the prop will not loop its animation, but hold the last frame. (Ported from CS:GO)
    • boolean AnimateEveryFrame - Force this prop to animate every frame. Usually this doesn't need to be touched. (Ported from CS:GO)
  • Inputs
    • string SetAnimationNoReset - Force the prop to play an animation unless the prop is already playing the animation. The parameter should be the name of the animation.(Ported from CS:GO)
    • nil BecomeRagdoll - Kills the entity and creates a client-side ragdoll from the model if supported.(Ported from CS:GO)
    • nil FadeAndKill - Fade out and remove itself(Ported from CS:GO)

beam_spotlight (Entity ported from CS:GO)

  • Inputs
    • Color SetColor - Sets the color of the beam effect

point_spotlight

  • Inputs
    • Color SetColor - Sets the color of the beam effect (Ported from Alien Swarm)
    • nil ForceUpdate - Forces the spotlight to update (Ported from Alien Swarm)

prop_door_rotating

  • Inputs
    • number MoveToRotationDistance - Opens the door to a specific angle (Ported from CS:GO)
  • Outputs
    • nil OnRotationDone - Fired when the door stops moving (Ported from CS:GO)
  • Spawnflags
    • 524288 - Start breakable (unset by default) (Ported from CS:GO)

info_target

  • Spawnflags
    • 2 - Always transmit (unset by default) (Ported from Alien Swarm)

func_button

  • Spawnflags
    • 16384 - Non solid (unset by default) (Ported from CS:GO)

monster_nihilanth

  • Spawnflags
    • 262144 - Automatically enable attacks, don't wait for TurnBabyOn input (unset by default)

crossbow_bolt

  • Inputs
    • number SetDamage - Sets the damage for the bolt

Sandbox specific

All entities

  • Keyvalues
    • boolean gmod_allowphysgun - Allow or disallow Physics Gun on this entity
    • string gmod_allowtools - Comma separated list of tools and properties that are allowed to be used on this entity