Jump to content

NPC's Going to a New Cell


ProjectEW

Recommended Posts

Hi, I've navmeshed a cell, and the exterior surrounding the cell, and I made an AI Package to sleep at a certain in that cell. But they just stand around when that time comes. Now, it feels like something's missing, because it seems like you would need to do something in order for them to know to use that door to go to the cell. Am I right?
Link to comment
Share on other sites

Yes - a travel package. And the destination of the package would be the bed to sleep in, with zero radius. Then when the travel package ends, you can enable the sleep package in the 'On End' result script.

 

Or the travel package will be enough, similar to the MegLucyWestSitsInMoriartys package.

Link to comment
Share on other sites

A sleep package on its own should work fine... Are there any unowned (or owned by the NPC) beds in the cell you chose? You need to choose the cell with the beds, not the cell your NPC is in necessarily.

Yes, there are 12 unowned beds, and 24 people who have 2 separate AI packages, so that they sleep in shifts. 12 people sleep, then they go eat, then shift 2 people come in to sleep. At least, that's how it's supposed to work. I'll try the travel packages now. Ummm, how exactly would you enable an AI package in the script? Sorry, I'm pretty noobish when it comes to scripting for Fallout 3.

Link to comment
Share on other sites

There are many ways, I'll give one example...

 

Attach a script to your NPC and define a variable, I'll call it 'Task' with a command line like this:

 

Short Task

You don't have to actually use that variable in the NPC script, you just have to define it. And the variable does not have to be defined on an NPC script, it can be defined on any script, really. Now add a condition to your AI Package(s) that reference this variable using the 'GetScriptVariable' condition and set it to evaluate true when Task = 1. Then from your controlling script (not the NPC script, though it could be) you would use these two commands together:

 

Set MyNPCRef.Task to 1
evp

The first line set the variable you defined to control your AI Packages to 1. The second forces the NPC to re-evaluate their AI Packages. Since Task now equals 1, your AI Package will now start. In this way you could have several AI packages each using a condition based on the value of Task and control what actions the NPC does by changing the value of Task explicitly and then calling evp.

Link to comment
Share on other sites

There are many ways, I'll give one example...

 

Attach a script to your NPC and define a variable, I'll call it 'Task' with a command line like this:

 

Short Task

You don't have to actually use that variable in the NPC script, you just have to define it. And the variable does not have to be defined on an NPC script, it can be defined on any script, really. Now add a condition to your AI Package(s) that reference this variable using the 'GetScriptVariable' condition and set it to evaluate true when Task = 1. Then from your controlling script (not the NPC script, though it could be) you would use these two commands together:

 

Set MyNPCRef.Task to 1
evp

The first line set the variable you defined to control your AI Packages to 1. The second forces the NPC to re-evaluate their AI Packages. Since Task now equals 1, your AI Package will now start. In this way you could have several AI packages each using a condition based on the value of Task and control what actions the NPC does by changing the value of Task explicitly and then calling evp.

OK, I'm sorry, but like I said, I positively am a NOOB at FO3 scripting. Could you please try to explain it a little better. Sorry.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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