Npc citizen
Jump to navigation
Jump to search
Entity Description
The downtrodden citizens of City 17.
Dedicated Console Variables
- sk_citizen_health
- <integer> A citizen's spawn health
Keyvalues
- additionalequipment
- <choices> Weapons - Allows any weapon
- Pick one that is made to function for NPCs
Literal Value Description weapon_smg1 SMG1 weapon_ar2 AR2 weapon_stunstick Stun Stick weapon_crowbar Crow Bar weapon_shotgun Shotgun weapon_beerbottle Beer bottle (Not coded - Don't use) weapon_beerbottle2 Beer bottle2 (Not coded - Don't use) weapon_rpg RPG 0 Nothing
- ammosupply
- <choices> Ammo to Resupply (if spawnflag set)
Literal Value Description Pistol Pistol SMG1 SMG1 SMG1_Grenade SMG1 Grenade AR2 AR2 Buckshot Shotgun RPG_Round RPG Grenade Grenade XBowBolt Crossbow Bolt
- ammoamount
- <integer> Amount of ammo to give
- citizentype
- <choices>
Literal Value Description 0 Default 1 Downtrodden 2 Refugee 3 Rebel 4 Unique
- This variable affects the model used in-game. See model entry below.
- expressiontype
- <choices>
Literal Value Description 0 Random 1 Scared 2 Normal 3 Angry
- model
- <string/choices>
Literal Value Description models/humans/group01/male_01.mdl Male 1 models/humans/group01/male_02.mdl Male 2 models/humans/group01/male_03.mdl Male 3 models/humans/group01/male_07.mdl Male 4 models/humans/group01/male_08.mdl Male 5 models/humans/group01/male_09.mdl Male 6 models/humans/group01/female_01.mdl Female 1 models/humans/group01/female_02.mdl Female 2 models/humans/group01/female_03.mdl Female 3 models/humans/group01/female_04.mdl Female 4 models/humans/group01/female_06.mdl Female 5 models/humans/group01/female_07.mdl Female 6 models/humans/group01/male_cheaple.mdl Cheaple Male 1 models/odessa.mdl Odessa. DO NOT USE.
- If citizentype is set to 1 (downtrodden), these are the models used. Other values cause the equivalent models from models/humans/group02/ (for 2 - refugee) and models/humans/group03/ (for 3 - rebel) to be used. The changes appear only in-game and not in Hammer.
- If the Medic flag is set and the citizentype is set to 3 (rebel), the equivalent models from models/humans/group03m/ are used.
- ExpressionOverride
- <string> Facial expression override
- notifynavfailblocked
- <boolean> Fire output when Nav is blocked?
- <boolean> A permanent squad member cannot leave the player's squad unless killed or explicity removed by entity I/O. Only use this if you're sure you want to override the default AI.
- <string> If you want your citizens to squad with the player but not obey commands the player gives to move the squad, put a concept here and this citizen will speak the concept instead of obeying the order.
Flags
BaseNPC flags
- Wait Till Seen : [1]
- Prevents this NPC from seeing (or being seen) until it enters a player's viewcone.
- Gag : [2]
- Won't make IDLE sounds until it's angry.
- Fall to ground (unchecked means teleport to ground) : [4]
- Drop Healthkit : [8]
- Causes this NPC to drop an item_healthvial upon dying.
- Efficient : [16]
- Don't acquire enemies or avoid obstacles
- Wait For Script : [128]
- Forces this NPC to "wait" in an idle state until it finishes playing a scripted_sequence.
- Long Visibility/Shoot : [256]
- By default, increases a NPC's sight range to
6,000
units and allows it to attack from anywhere within that distance.
- Fade Corpse : [512]
- Think outside PVS : [1024]
- Allows this NPC to run its regular AI outside of any player's PVS.
- Template NPC : [2048]
- Marks this NPC as a template for entities like npc_template_maker. The NPC will not spawn on its own. This is not needed for point_template.
- Do Alternate collision for this NPC (player avoidance) : [4096]
- Don't drop weapons : [8192]
- Ignore player push : [16384] (in all games since
)
- Entity won't give way to player.
- 65536 : Follow player on spawn
- 131072 : Medic
- 262144 : Random Head
- 524288 : Ammo Resupplier
- 1048576 : Not Commandable
- 2097152 : Don't use speech semaphore. Template:Ep1 add
- 4194304 : Random male head
- 8388608 : Random female head
- 16777216 : Use RenderBox in ActBusies.
- This makes the collision hull surround the model rather than using the human hull. It's more computationally expensive, but necessary when ActBusies involve close proximity to other props/geometry or animate the citizens in a more dynamic way.
Inputs
- PlayerCompanion:
- OutsideTransition (in all games since
)
- Use this input to teleport the NPC to a hint node with the "Player Squad Transition Point" hint type.
- EnableAlwaysTransition (in all games since
)
- DisableAlwaysTransition (in all games since
)
- If enabled, this NPC will always teleport to a Player Squad Transition Point even if they're not within the trigger_transition.
- MakeGameEndAlly (in all games since
)
- MakeRegularAlly (in all games since
)
- Determines whether the game should end if this character dies.
- EnableWeaponPickup (in all games since
)
- DisableWeaponPickup (in all games since
)
- Enables/disables weapon pickup.
- SetExpressionOverride <string>
- Set facial expression override
- StartPatrolling
- Patrol whenever I'm idle or alert.
- StopPatrolling
- Stop patrolling when I'm idle or alert.
- SetCommandable
- Make a previously uncommandable citizen commandable
- SetMedicOn
- Set the medic flag on. Will not change the model or skin of the citizen.
- SetMedicOff
- Set the medic flag off. Will not change the model or skin of the citizen.
- SetAmmoResupplierOn
- Set the ammo-resupplier flag on. Will not change the model or skin of the citizen.
- SetAmmoResupplierOff
- Set the ammo-resupplier flag off. Will not change the model or skin of the citizen.
- SetReadinessLow
- Set readiness to calmest state (Bored)
- SetReadinessMedium
- Set readiness to moderate (Alert)
- SetReadinessHigh
- Set readiness to highest. (Combat imminent)
- LockReadiness <float>
- Lock readiness at current setting for x seconds -1 = forever, 0 = unlock now
- GiveWeapon <string>
- Gives the NPC the specified weapon - excluded from FGD
- SpeakIdleResponse
- Forces the NPC to speak an idle response - excluded from FGD
- RemoveFromPlayerSquad
- Remove from player squad, instantly.
- SetReadinessPanic
- Set readiness to panic state (Special)
Outputs
- PlayerCompanion:
- OnWeaponPickup
- Fires when this NPC picks a weapon off the ground or a gun rack.
- OnJoinedPlayerSquad
- Fires when joins player squad
- OnLeftPlayerSquad
- Fires when leaves player squad (doesn't include death or deletion)
- OnFollowOrder
- Fires when ordered to follow player
- OnStationOrder
- Fires when ordered to a location by player
- OnPlayerUse
- Fires when a player +USEs the citizen. Template:Plact
- OnNavFailBlocked
- Fires when this Citizen's movement fails because he/she is blocked by a dynamic object.