| Attachment | Size |
|---|---|
| MWBardSongsScript.txt | 8.77 KB |
Hey folks. I figured I had my solution, making Bards play seemingly consistently and without prompting by creating a rest scene that switches from singing to resting and then back to singing, sort of like a big scene semi-random loop, and it works, the first time. I couldn't figure out why it would only run the rest scene once, until I found this:
Repeating scenes
If the "Repeat while true" flag is checked on a scene, the "Repeat" conditions are checked when the scene ends - if true, the scene restarts. Note that the scene's Begin and End script fragments run only once each - Begin when the scene first starts, and the End when the scene actually ends. They do NOT run each time the scene loops.
http://www.creationkit.com/Category:Scenes#Repeating_scenes
BUT, I found when I talked to the bard he would all the sudden click into the rest scene, as if it reset it and allowed it to play again. The snippet in the script that seems to be responsible is this:
While MWBard.IsInDialogueWithPlayer()
if Changesettings == False && (Stopsong == True || SavedPlayContinuous == False)
Return
endif
Utility.Wait(1)
Debug.Trace("Playsongs is waiting...")
EndWhile
So I figure since I switched packages at the end of the singing scene, I could call on a package check like this:
While (MWBard.GetCurrentPackage() == MWBardBreakPackage)
if Changesettings == False && (Stopsong == True || SavedPlayContinuous == False)
Return
endif
Utility.Wait(1)
Debug.Trace("Playsongs is waiting...")
EndWhile
I get this warning, so it looks like that won't work.
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\MorrowindBardsSongsScript.psc(181,15): GetCurrentPackage is not a function or does not exist
No output generated for MorrowindBardsSongsScript, compilation failed.
My goal is to activate the snippet that resets the NPC, somehow.
Do you have any ideas, full script attacted. (probably has a bunch of things I am not using anymore, but I stripped out a lot, so, it's easier to read that it was.
Any ideas would be helpful,

MWBard is objectreference in
MWBard is objectreference in your script but getcurrentpackage is actor function you need to cast it (MWBard as Actor).GetCurrentPackage() to solve error. But maybe this script can be made better it looks much more complicated than it should.