Underhell: KeyValues And Inputs/Outputs

From Valve Developer Community
Jump to: navigation, search

This article will talk about the keyvalues and inputs/outputs that entities share within Underhell

SHARED NPCS

These values are shared with most NPCs, but depending on their coding, some of these inputs/outputs and keyvalues may not work for some NPCs like the generic_actor.

KEYVALUES

Uh_Fos (FGD Name: Field Of View) - This specifies the NPC's Field Of View, useful for stealth missions.

Uh_ViewDistance (FGD Name: View Distance) - This specifies the NPC's View Distance, useful for stealth missions.

Uh_SpotBodies (FGD Name: Spot Bodies) - This specifies if the NPC can spot bodies, if NPC is a npc_combine_s, it will speak a line and notify it's squad mates.

Uh_BodyGroups (FGD Name: NPC Body Groups) - This is a dangerous keyvalue, if used wrong, it can crash your game on load up of your map, so make sure that it is correct, you must put the name of your bodygroup in, and then the number of it with no spaces, in Underhell if you put Legs4Helmet2 in for models/combine_soldier.mdl, then it will spawn with heavy armored legs and a helmet with the visor raised.

Shield (FGD Name: Can Have Shield) - (Only Works With NPC_Combine_S Only) - If set to Yes (or 1) then the NPC will randomly spawn with a shield.

NumGrenades (FGD Name: Number Of Grenades) - (Only Works With NPC_Combine_S And NPC_Ace Only) - Number of grenades the NPC is allowed to throw.

OUTPUTS

OnKicked - This fires when the NPC gets kicked by a Player.

OnHearRadio - This fires when the NPC hears a item_radiocracker or item_fmradio playing.

OnSpotSoldierBody - This fires when the NPC sees a npc_combine_s corpse.

OnSpotInfectedBody - This fires when the NPC sees a npc_infected corpse.

OnSpotDefaultBody - This fires when the NPC sees a NPC body of any type.

OnPlayerUse - (Only Works With Prop_Dynamics, NPC_Citizens, And NPC_Alyx Only) This fires when the Player presses their +USE key on the NPC.

INPUTS

BecomeClientRagdoll - This is similar to BecomeRagdoll, only the NPC becomes a client intractable ragdoll that the player can pickup and gib.

ClearDecals - Makes the NPC's model clean all decals off of it. (E.g. Blood, Bullet Holes, Ect.)

GibHead - Gibs the NPC's head if the NPC and model supports it.

GibLeftArm - Gibs the NPC's left arm if the NPC and model supports it.

GibRightArm - Gibs the NPC's right arm if the NPC and model supports it.

GibLeftLeg - Gibs the NPC's left leg if the NPC and model supports it.

GibRightLeg - Gibs the NPC's right leg if the NPC and model supports it.

RushEntity - Makes the NPC run towards the specified entity.

WalkToEntity - Makes the NPC walk towards the specified entity.

SetFos - Sets the Field Of View of the NPC.

SetViewDistance - Sets the View Distance of the NPC.

SetSpotBodiesOn - Sets body spotting on.

SetSpotBodiesOff - Sets body spotting off.

SetSquadTemp - Set the NPC from going into temporary squads with friendly NPCs, 1 is to enable it and 0 disables it.

ThrowHealthkit - (Only Works With NPC_Citizens Only) Throws a item_healthkit at the player, if there are multiple players, the NPC will throw it at the host, This input only works with npc_citizens only and will through a item_healthkit regardless if they are a medic.



SHARED RENDERING

These values are shared with entities like props and NPCs.

KEYVALUES

Uh_RenderInMirrorsOnly (FGD Name: Render In Mirrors Only/Render In Mirrors And Monitors Only) - If set to Yes, the NPC will only render in mirrors and monitors.

OUTPUTS

OnPlayerUse (Only Works For Prop_Dynamics, NPC_Citizens, And NPC_Alyx) - Fires when the Player presses their +USE key on the hitbox, similar function to the one from NPC Shared.

INPUTS

ClearDecals - Makes the entity's model clean all decals off of it. (E.g. Blood, Bullet Holes, Ect.)

Glow - Makes the entity glow, useful for signaling the player about important NPCs and Objects, 1 turns on the glow, and 0 turns if off.

SetGlowColor - Sets the glow color of the prop or NPC, 255 0 0 makes it red