Skip to content

Commit

Permalink
Added "hostile" option to npc_citizen
Browse files Browse the repository at this point in the history
  • Loading branch information
robotboy655 committed Feb 13, 2025
1 parent 74b1588 commit 786b05b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions bin/halflife2.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,12 @@

denycommandconcept(string) : "Deny command speech concept" : "" : "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."

hostile(choices) : "Hostile" : 0 : "Will be considered a combine, will attack players and be friendly to combine units." =
[
0 : "No"
1 : "Yes"
]

//Inputs
input RemoveFromPlayerSquad(void) : "Remove from player squad, instantly."
input SetExpressionOverride(string) : "Set facial expression override"
Expand Down
9 changes: 8 additions & 1 deletion garrysmod/lua/autorun/base_npcs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ AddNPC( {
Class = "npc_citizen",
Category = Category,
KeyValues = { citizentype = CT_DOWNTRODDEN, SquadName = "resistance" },
Weapons = { "" } -- Tells the spawnmenu that this NPC can use weapons
Weapons = { "" } -- Tells the spawnmenu that this NPC can use weapons, but doesn't have any default ones
} )

AddNPC( {
Expand Down Expand Up @@ -112,6 +112,13 @@ AddNPC( {
Weapons = { "weapon_pistol", "weapon_smg1" }
}, "Refugee" )

AddNPC( {
Class = "npc_citizen",
Category = Category,
KeyValues = { citizentype = CT_REBEL, SquadName = "combine", Hostile = "1" },
Weapons = { "weapon_pistol", "weapon_smg1", "weapon_ar2", "weapon_shotgun" }
}, "npc_citizen_enemy" )

if ( IsMounted( "ep2" ) ) then
AddNPC( {
Name = "#npc_vortigaunt_uriah",
Expand Down

0 comments on commit 786b05b

Please sign in to comment.