NPC Response Contexts (Help Me Tysn)

Need Help? The Day isnt going so well on the Mapping front?
Post Reply
shiftey
npc_combinegunship
npc_combinegunship
Posts: 705
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

NPC Response Contexts (Help Me Tysn)

Post by shiftey »

So I've been fiddling with NPC response contexts and such. But I am having no luck getting npc_citizens to respond and vocally interact the way I want them to.

I noticed they do what I need in oc_lobby. So how did you get it to work Tysn? Responding to thrown objects, chatting idly, etc.
User avatar
Tysn
Former Developer
Former Developer
Posts: 358
Joined: Thu Oct 26, 2006 1:57 am
Location: Minnesota, USA
Contact:

Post by Tysn »

The npcs in lobby are targeted by an ai_goal_actbusy, with a bunch of info_node_hint's around for them to interact with. Once they are Triggered to act busy they should respond the way you want them to.
Image
shiftey
npc_combinegunship
npc_combinegunship
Posts: 705
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

Post by shiftey »

I understand that much, but I'm having trouble with the npc_citizens talking. For instance, throwing an object at them doesn't get the "Hey! Stop that!" response.

EDIT: Is it possible that they aren't responding because they are in scripted sequences?
User avatar
Tysn
Former Developer
Former Developer
Posts: 358
Joined: Thu Oct 26, 2006 1:57 am
Location: Minnesota, USA
Contact:

Post by Tysn »

Is it an aiscripted_sequence or a regular scripted_sequence? Since if it's a regular one then they shouldn't respond. Then again the aiscripted_sequence may not have them respond either since scripted sequences seize contol of the npc so that is likely the problem.
Image
shiftey
npc_combinegunship
npc_combinegunship
Posts: 705
Joined: Thu Oct 09, 2008 4:45 pm
Contact:

Post by shiftey »

Ok. I thought up a solution and just found out that Valve actually used this for the trainstation citizens.

You place a scripted_sequence set to Instantaneous and "OnEndSequence ForceNPCtoActBusy". You then place an info_node_hint in the same spot and when the NPC spawns, they instantly go to the scripted_sequence then use the actbusy node. The only problem is that the npc will do the entry animation, which sucks because my citizens spawn in the same room as the player and they're supposed to already have been sitting. But I'll take what I can get.

At least I know what the problem was, the scripted_sequence, so thanks Tysn.
Post Reply