Garry's Mod Wiki

Revision Difference

Custom_Entity_Inputs_And_Outputs#554520

<cat>Dev.Map</cat> ## 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 <page>Entity:Fire</page> and <page>Entity:Input</page>. Key-values and spawnflags can be set via <page>Entity:SetKeyValue</page>. ## Entities ### All NPCs * Inputs * <page>number</page> SetMaxLookDistance - Sets the maximum distance the NPC can see at. Default is 2048, 6000 for long range NPCs. ### prop_dynamic * Key-values * <page>boolean</page> HoldAnimation - If set, the prop will not loop its animation, but hold the last frame. (Ported from CS:GO) * <page>boolean</page> AnimateEveryFrame - Force this prop to animate every frame. Usually this doesn't need to be touched. (Ported from CS:GO) * Inputs * <page>string</page> 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) * <page>nil</page> BecomeRagdoll - Kills the entity and creates a client-side ragdoll from the model if supported.(Ported from CS:GO) * <page>nil</page> FadeAndKill - Fade out and remove itself(Ported from CS:GO) ### beam_spotlight (Entity ported from CS:GO) * Inputs * <page>Color</page> SetColor - Sets the color of the beam effect ### point_spotlight * Inputs * <page>Color</page> SetColor - Sets the color of the beam effect (Ported from Alien Swarm) * <page>nil</page> ForceUpdate - Forces the spotlight to update (Ported from Alien Swarm) ### prop_door_rotating * Inputs * <page>number</page> MoveToRotationDistance - Opens the door to a specific angle (Ported from CS:GO) * Outputs * <page>nil</page> 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 * <page>number</page> SetDamage - Sets the damage for the bolt ## Sandbox specific ### All entities * Keyvalues * <page>boolean</page> gmod_allowphysgun - Allow or disallow Physics Gun on this entity * <page>string</page> gmod_allowtools - Comma separated list of tools and properties that are allowed to be used on this entity⤶ * <page>string</page> gmod_allowtools - Comma separated list of tools and properties that are allowed to be used on this entity