How can I get an NPC to use a specific dialogue?

Post » Sun Oct 24, 2010 5:53 am

I've created an NPC with a Patrol package, and set the Aggro Radius flag on it. With the Weapons Drawn flag set on the patrol package, it's behaviour works well. If I get too close it will aim the weapon at me in a threatening manner. But it doesn't say anything, it just stands there glaring at me. I'd like to make it so that it issues a warning, the same as it would if I were trespassing, but I'm not sure how to go about it. I'm not even sure if this character even has that kind of dialogue to use in fact. It was originally the Bandit/Smuggler NPC from Point Lookout which is a Very Aggressive NPC that will usually attack on sight. I know I can use the GetActorAggroRadiusViolated function in a script as the condition, but how would I go about attaching a specific dialogue to go along with it? Especially if I have to use some other NPC's voice, if that's even possible.
User avatar
Laura Tempel
 
Posts: 3484
Joined: Wed Oct 04, 2006 4:53 pm

Post » Sun Oct 24, 2010 9:14 am

Ok, so I found this in the Wiki:

StartConversation player, ForceGreetTopic

But what is the name of the topic that warns the player, like if I was trespassing?

Never mind, it's called TrespassNoCrime. Now let's see if I can get it to work.
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

Post » Sun Oct 24, 2010 3:07 pm

So this isn't working:

scn ForceWarnSCRIPTBegin GameMode	if GetActorAggroRadiusViolated		StartConversation player, ForceTrespassNoCrimeTopic	endifEnd


Any idea why not? I'm using the exact same syntax as was written in the Wiki but it won't recognize the "ForceTrespassNoCrimeTopic" part.
User avatar
Matthew Aaron Evans
 
Posts: 3361
Joined: Wed Jul 25, 2007 2:59 am

Post » Sun Oct 24, 2010 6:24 am

Oh hell, that was easy. I didn't realize I could just use a Dialogue Package. Piece of cake!
User avatar
MARLON JOHNSON
 
Posts: 3377
Joined: Sun May 20, 2007 7:12 pm

Post » Sun Oct 24, 2010 7:35 am

So now I have another problem. It looks like having the Aggro Radius triggered stops the NPC from resuming it's Patrol package. How do I get it to go back to following that behaviour?
User avatar
Harinder Ghag
 
Posts: 3405
Joined: Wed Jan 17, 2007 11:26 am


Return to Fallout 3