Jump to content

how do i make a npc turn hostile through player dialogue?


dietplums

Recommended Posts

I want to make my npc turn hostile when the player selects an option from the dialogue phase.

 

i have tried setting it up so that one of the options leads to a quest stage (10), in that stage papyrus i have put npc.AddToFaction(playerenemy),

 

i have added the properties for the faction and the npc to the stage script fragment.

 

i copied the playerenemy faction template for my custom faction template which is the same.

 

This has not worked and i am kind of lost on what to do.

 

thank you.

Link to comment
Share on other sites

my bad, figured it out.

 

all i had to do was add npc.StartCombat(Game.GetPlayer()) to the quest stage script and add the npc to the properties.

 

thank you.

 

If it's a dialogue line (Topic Info) and you don't mind adding a Topic Info Script / Script Fragment to your mod:

 

You can also attach a Topic Info Script:

Scriptname YOURSCRIPTNAME extends TopicInfo Const

Event OnEnd(ObjectReference akSpeakerRef, bool abHasBeenSaid)		; Event sent when akSpeakerRef finishes a Response Text.
	(akSpeakerRef as Actor).StartCombat((akSpeakerRef as Actor).GetDialogueTarget())
EndEvent

Or a Topic Info Script Fragment:

(akSpeakerRef as Actor).StartCombat((akSpeakerRef as Actor).GetDialogueTarget())

to the Topic Info.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...