Skip to content

[NPCs] Player Squad add\remove related response concepts for allied npc_citizen #349

@Gil-dun

Description

@Gil-dun

Is your feature request related to a problem? Please describe.

I want to make a rebel protagonist that's capable of commanding a rebel squad. [Like Base HL2]
But I stumbled upon a problem with response system when making player be able to manually add a squad member.
I used combination of 2 console commands to make citizen's behave similiar to combine soldiers\assassins(No auto-join the player's squad): npc_citizen_auto_player_squad 0 npc_citizen_auto_player_squad_allow_use 1.
After that was done, I noticed that the response concepts for adding to player squad[TLK_COMMAND_ADD] and removing from it [TLK_COMMAND_REMOVE] are not fired when npc_citizen is added or removed from the squad.(While Combine Soldiers\Assassins work as inteded)

Describe the solution you'd like

When player adds\removes npc_citizen manually [Pressing +USE on them, like soldiers\assassins] to their squad, the player entity tries to speak response concepts TLK_COMMAND_REMOVE & TLK_COMMAND_ADD

Describe alternatives you've considered

When making a workaround for this issue I used TLK_USE concept with criteria "speechtarget_inplayersquad" to check that NPC who's being ordered to join player's squad is in fact in it or not.
Example:

rule TylerFollowCommandWorkaround
{
	criteria		IsTyler ConceptTalkUse SpeechTargetInPlayerSquad SpeechTargetIsCitizen NotUsedCit
	applyContext "UsedCit:1:5"
	response		TylerIssueFollowCommand
}

rule TylerStayCommandWorkaround
{
	criteria		IsTyler ConceptTalkUse SpeechTargetIsCitizen NotUsedCit
	speechtarget_inplayersquad 0 required
	applyContext "UsedCitstay:1:5" // used to make delay between responses
	response		TylerIssueStayCommand
}


Additional context

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions