Guest Messenjah Posted April 29, 2013 Share Posted April 29, 2013 Okay, so I have a major issue that won't go away. I have tried everything I can think of under the sun. Basically, I have an npc that uses 4 different AI packages. These packages depend on two script variables as conditions: NPCFlag (Used to tell the quest/script which npc to run the correct AI package) and Stage (To tell it what stage the npc is using. I'm useing these integers rather than quest stages so that they can repeat. What I need, is for the player to talk to the npc. The npc is at stage 0 and NPCFlag set to 0 as the default stage. Once the player talks to the npc, they ask the player to follow them to a location. The npc is now in Stage 1, and the script selects NPCFlag 1 if the npc is NPC01 for example. These are the conditons set forth to allow the npc to use the next AI package that travels to a room. When the npc reaches the room, a triggerbox sets the stage from 1 to 2, so now it is NPCFlag 1 and Stage 2. This allows the npc to use a forcegreet AI package, where the player will be greeted automatically by the npc if he/she is in range. If the player fails to walk into the room within 120 seconds, the npc is supposed to default back to NPCFlag 0 and Stage 0, where the npc will use it's default AI package and walk back into the main room. The same thing is to occur if the player talks to the npc and tells them nevermind (Thus resetting the npc for when the player returns). In order to perform the automatic timeout, I used an OnUpdate event and registered for a single update after 120 seconds. Then the event itself, I set it up to check if the stage is at stage 2 and tell it to reset both intigers and then evaluate packages for all NPC's involved. For the "nevermind" reset, I just used a script fragment doing the same as above... Here is what happens, everything basically works, until it resets. Now mind you, the reset works fine. I know this because there is some dialogue that involves those integers being set to 0, so that the npc can re-invite the player to follow them. All dialogue is perfectly fine. I do notice that the npc's feet try to move, but it appears to stutter? However, the NPC will not actually move out of the room or try to reach their distination. I can't seem to find any info on manually adding/removing AI packages from an NPC via papyrus script like you could with FO3/NV.... I hate to reset the npc for fear that they will vanish and appear in the main room in a very awkward manor..... None of the scripts or AI conflict from what I can tell. Link to comment Share on other sites More sharing options...
Recommended Posts