Jump to content

[LE] In quest I can't get NPC to leave


flyddon

Recommended Posts

Hello All,

 

I have my NPC and a quest, she talks to player in this quest and at the end of dialog she is to leave, I can't seem to get her to either

 

a. walk to a patrol point or marker

b. walk out of the room

 

in fact once we finish talking... she just stands there.

 

this is the last papyrus fragment script I have in the quest, it runs fine I know, because I can see the items ref in BeforeMarker disappear.

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 0
Scriptname NGIJ_TIF__040E24F9 Extends TopicInfo Hidden

ObjectReference Property NGIJbeforeMarker Auto
ObjectReference Property NGIJafterMarker Auto

;BEGIN FRAGMENT Fragment_1
Function Fragment_1(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE

NGIJafterMarker.Enable()
Utility.Wait(0.5)
NGIJbeforeMarker.Disable()
getowningquest().setstage(20)

;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

I would like to have her move to an xmarker (down the hall and up the stairs) or to the door.

I had tried this script but no good.

Scriptname NGIJSpawnLeala extends ObjectReference 

ObjectReference Property NGIJLealaREF Auto
ObjectReference Property NGIJXmarkerLealaSpawn Auto

 
Event OnTriggerEnter(ObjectReference akActionRef)
	If akActionRef == Game.GetPlayer()
		NGIJLealaREF.MoveTo NGIJXmarkerLealaSpawn
		Debug.MessageBox("Spawn!")
			GoToState("Done")
	EndIf
EndEvent  

State Done
Event OnTriggerEnter(ObjectReference akActionRef)
EndEvent
EndState

So question is what command gets the NPC to move to a Xmarker or patrol point?

Link to comment
Share on other sites

The easiest way I can think would be to setup an AI package, either on the actor or on the actor's quest alias, that tells the character to Travel to your Xmarker. You setup the conditions on this AI Package to not run until this moment, looking at your script, probably GetStage QuestName 20. Then once the character reaches where they want to go, you want this AI Package to turn off, so you need to make sure the conditions are no longer met once that happens. Either add another condition for current cell, or maybe change the quest stage once they get there, etc.

 

I think the "correct" way would be to have this conversation via Scene. And during this scene you tell them what to do in a similar way. Here's a tutorial that shows how to set it up. It's a really long video and it's not brilliantly made, but it has some useful information once you get over how he pronounces "Papyrus."

Link to comment
Share on other sites

  • Recently Browsing   0 members

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