Jump to content

Moving an NPC to a piece of furniture


Recommended Posts

Posted

Help please! I'm trying to move an NPC to a particular piece of furniture during a scene, and he won't go.

 

The furniture is an instance of NPCMapStand. He will use it during sandboxing, so that works.

 

I created a package with the Sit template, pointed the sit target to the marker in his cell.  It has a condition attached: (quest level) = 52.  I added the package to the NPC.

 

Then in the scene, I attached this script fragment to some of his dialog:

 

GetOwningQuest().SetStage(52) ; to trigger the sit package

theMarker.Enable()   ; to turn the marker on

theCaptor.GetActorRef().EvaluatePackage()   ; to make him check the package conditions

 

where theMarker is of course a property referring to the marker, theCaptor to the NPC.  Everything compiles OK.

 

But he doesn't go to the location.  Can anyone see what I'm doing wrong?

 

 

(I also tried using a Package Action in the scene, but that doesn't work either.)

 

 

Posted

Be sure your package has an higher priority than the other ones.

And maybe add a Debug.wait(0.5) before evaluating the package to give the game to recognize the item.

 

Posted

On the plus side, I found my package works between scenes.  So I can enable the package at the end of a scene, set the stage, and the NPC will mosey on over to the marker.

 

Now, is there a way to test if he made it?  That is, a condition I can use on dialog based on whether the NPC is using the furniture, or the furniture is being used, or the package has been completed?  I don't want to continue the dialog if he's not in place.

 

(I thought IsSeatOccupied would do it, but it doesn't seem to work; apparently it's for furniture with multiple slots.)

Posted

I am not sure for FO4.

If you need a condition function you can try the isSitting. Usually it returns true if a furniture is used (not in 100% of cases but pretty often, for Skyrim.)

 

Just discovered that the Creation Kit web page is not shoing the values for FO4 only, also if they are not existing for Skyrim.

And some "deprecated" functions are now no more deprecated.

 

Posted

This seems similar to an issue I'm having. I don't know if i need to make a separate topic since i just want my character to move but I will if I am supposed to. Basically I got a npc I'm trying to escort the player character to the outside of Diamond City. I thought it would be as simple as
 
step one: create scene with npc
step two: add dialog to scene asking to take player to destination x
step three: run escort package linking to a custom marker at destination x

Now when that didn't work I fiddled around with it and added stuff and found that as long as I'm still considered in dialog he follows the package, sort of. What he does is he starts causally walking towards the marker outside of diamond city but if either one of us gets too far away from each other that it breaks the dialogue (like walking away from a npc while they are talking to you) then he just stands there.

I'm new to all of this and I feel there must be something simple I'm over looking, or not getting.

Posted

Are you using a Package Action within the dialog?  I couldn't get that to work.  If you are, that would explain why the NPC abandons it when the dialog exits.

 

I created a special package and added it to the NPC (first in his list), with a condition tying it to a particular stage in the quest. 

Posted

Are you using a Package Action within the dialog?  I couldn't get that to work.  If you are, that would explain why the NPC abandons it when the dialog exits.

 

I created a special package and added it to the NPC (first in his list), with a condition tying it to a particular stage in the quest. 

 

yes I am actually and thank you for getting back to me so quickly! I thought that was how it was done when i was reviewing the quest where Danse escorts the player to Arc Jet, and comparing it to the quest where the little boy in vault 81 gives you the tour.

 

This seems to have fixed the issue I had completely thank you! I owe you a place in the credits of the mod for helping me with this as I've been stuck for over a week on this issue hahaha.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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