[ News | About | Media | Downloads | Tutorials | Contact ]

Tutorials

Back to Tutorials

npc_metropolice

npc_metropolice are mostly like in HL2 except with few new variables and changes. Most notably the commandable squad stuff has been added from the npc_citizen.

Both healing and ammo supply work just like in HL2 with the addition of "Current Player Primary Weapon" as an option in Ammo Supply, which gives the player ammo for whatever weapon he has in his primary weapon slot.

Note that Noah, Anders, Larson, and Eloise are spawned to info_player_combine spawn points by the Director, and adding them to the map is not necessary.

Values

Spawn Flags:
  • Follow player
  • Medic
  • Ammo Supplier
  • Not commandable
Weapons
Obselete if the NPC is using a Dynamic NPC Spawner to spawn as the Director decides what weapon the metrocop has.

Ammo to Resupply
What type of ammo to give to the player. "Current" recomended. Choices: Pistol, SMG1, SMG1_Grenade, AR2, Buckshot, RPG_Round, Grenade, XBowBolt, Current.

Amount of ammo to give
How much ammo to give? Note: this doesn't take into account weapon clip sizes (SMG1 has a bigger clip than AR2 or Shotgun).

Can Recharge
Can this Metrocop run the Recharge AI Behavior?

Input functions

SetCommandable
Make a previously uncommandable metrocop commandable

SetNotCommandable
Make a previously commandable metrocop uncommandable

SetMedicOn
Set the medic flag on. Will not change the model or skin of the metrocop.

SetMedicOff
Set the medic flag off. Will not change the model or skin of the metrocop.

SetAmmoResupplierOn
Set the ammo-resupplier flag on. Will not change the model or skin of the metrocop.

SetAmmoResupplierOff
Set the ammo-resupplier flag off. Will not change the model or skin of the metrocop.

Back to Tutorials

[ News | About | Media | Downloads | Tutorials | Contact ]



Valve, the Valve logo, Half-Life, the Half-Life logo, the Lambda logo, Steam, the Steam logo, Source, and the Source logo are trademarks and/or registered trademarks of Valve Software. All information is copyright their respective authors. Website designed by Han Solo.