Neverending scene.

Post » Sat Aug 10, 2013 12:35 am

Hi, I'm making a follower mod with a scene. The scene is relatively simple, 3 phases and 1 actor.

The background is that the player enters a dungeon, followed by the actor and another "bystander", and at the end of it when they reach the final chamber, a script enables all the NPCs in the chamber (since they would otherwise all attack the player when he enters combat with the first enemy of the dungeon) and sets their aggression to 0 to prevent them from immediately attacking upon entering the chamber. That script then starts the scene.

First phase is a simple timer, second phase is a dialogue action and the third and final phase is a Shout package aimed at a nearby NPC. At the start of the scene, the actor is given all the necessary shouts. At the end, the script fragment sets the aggression of the NPCs back to 2 and changes the quest stage.

The actor is set to D(E), C(N), PD(N), OC(N) and can't be activated by the player.

Even though all actions complete, with an additional IsSceneActionComplete for the Shout package in the third phase completion condition, the scene never ends and the actor remains in the "Busy" state. The end script fragment never runs and all actors remain as is except for the targeted and now attacking NPC who is meant to enter combat when hit by the shout.

Does anyone know why this scene never ends?

EDIT: Additionally, trying to stop the scene in-game fails when using the StopScene command.

EDIT2: More testing shows that changing target and flagging the scene to end on combat i.e. C(E) does not stop the scene.

EDIT3: Removing the Shout package along with phase 3 doesn't stop the scene.

End Script fragment:

ObjectReference TempRef = LinkedRefsWhile (TempRef)  (TempRef as Actor).SetAV("Aggression", 2)  TempRef.GetLinkedRef()EndWhileGetOwningQuest().SetStage(25)

I'm going to check to see if the while loop in the end fragment is causing it. (Infinite loop possibility)

EDIT4: It must be causing it. Removing TempRef and the while loop stops the scene. Now to fix it.

EDIT5:

ObjectReference TempRef = LinkedRefsWhile (TempRef != None)  (TempRef as Actor).SetAV("Aggression", 2)  TempRef = TempRef.GetLinkedRef()EndWhileGetOwningQuest().SetStage(25)

Fixed it! :D

User avatar
Ashley Tamen
 
Posts: 3477
Joined: Sun Apr 08, 2007 6:17 am

Return to V - Skyrim