For some reason the script below does not compile.
There could be something wrong with the script.
---------------------------------------------------------------------------------------
ScriptName _RBA_Main_2 extends ObjectReference
{Script attached to book forms to store audio file properties.}
;-- Properties --------------------------------------
String property BookName auto
{Name of the book.}
Sound property WavFile02 auto
_rba_quest property RBA auto
{Link to Controller Quest.}
Sound property WavFile01 auto
;-- Variables ---------------------------------------
;-- Functions ---------------------------------------
Function OnRead()
Bool isSKSELoaded = skse.GetVersion() as Bool
if !isSKSELoaded
debug.messagebox("Read Books Aloud could not find SKSE. Please make sure that it is properly installed. Otherwise, you should disable Read Books Aloud.")
return
endIf
if RBA.WavFile01 == none
RBA.WavFile01 = WavFile01
RBA.WavFile02 = WavFile02
else
sound.StopInstance(RBA.iCurrentSoundInstance)
RBA.iCurrentSoundInstance = 0
RBA.ClearAllAudioProperties()
RBA.WavFile01 = WavFile01
RBA.WavFile02 = WavFile02
endIf
RBA.sBookName = BookName
RBA.ExternalStart()
endFunction