Jump to content
⚠ Known Issue: Media on User Profiles ×

SetPlayerAIDriven causing all NPCs to go brain-dead


Recommended Posts

I am using a scene to make the PC walk to a certain location. This only works to move the PC if you set Game.SetPlayerAIDriven()

 

I later stop the scene and run Game.SetPlayerAIDriven(False).

 

That returns the PC controls and I can trace the Scene.IsRunning() and it shows as false.

 

The problem though, is upon regaining controls, now the entire population of Fallout 4 is brain dead! They do kind of walk around and talk. But, you can attack enemies and they will not fight back.

 

It's like some aspect of the packages/scene that was running does not fully clean off.

 

Has anyone seen this before and know if there is a fix?

Edited by dagobaking
Link to comment
Share on other sites

I see. In that case it may have worked. But, stopping the quest did not resolve the problem symptom.

 

On top of that, the symptoms don't really match what the packages in the scene do. Those are just a simple travel phase and a wait phase. The symptom is that every NPC in the game will no longer fight back if you attack them, even creatures, etc. It looks like the whole package system, game-wide gets broken somehow by perhaps misuse of SetPlayerAIDriven...

 

I can run IsRunning on the scenes and confirm that the game thinks they have stopped.

Link to comment
Share on other sites

Well...Who knows...I used SetPlayerAiDriven ,but did not notice any problems. Though I did not try to test enemies behavior on purpose. But I remember I even got a couple of settlement attacks while testing the scene. Maybe that your scene was not finished properly has put the player in some weird state. I just tried to use SetPlayerAIDriven from console and it does not cause anything like this.

Try to type in console: tdetect

It toggles NPC player detection

Link to comment
Share on other sites

In what way did you use SetPayerAIDriven. I have seen that a common usage is to run it via snippets at beginning and ends of scenes. But, I'm running it from a Quest script. May have something to do with this...

I set it through quest stages. One stage runs on quest start and another on quest stop. I don't think there is any difference where you run it from.

Maybe the problem was caused by something else or was an accident bug not related to your scene or quest. Enemies do attack me even while I'm set AI driven and can't move. Just tried to use my test quest and spawned some raiders during the scene and after it.

Edited by kitcat81
Link to comment
Share on other sites

It seems like something must be wrong elsewhere in those scenes/packages. But, if I remove SetPlayerAIDriven I can start the scenes and end them and everything goes back to normal as expected.

 

Anyway, I think I am going to restructure it all so that the walk scenes are in their own quest and can be stopped. I there are some other good reasons to do that anyway.

Link to comment
Share on other sites

So I restructured the whole thing to use separate Quests instead of the multiple Scenes in one Quest that I had.

 

That made no difference. The behavior is exactly the same.

 

I did adjust some things so that I could do a better test. I can now test my entire process with or without SetPlayerAIDriven on. And sure enough, if it is on, NPCs go brain dead. If it is off, the exact same lines of code run and the NPCs retain their AI.

 

So, the question is a little more specific now, how does SetPlayerAIDriven need to be run or ordered in order for it to work with a simple travel scene without breaking the AI of the entire game?

Edited by dagobaking
Link to comment
Share on other sites

  • Recently Browsing   0 members

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