#1
26th Jul 2020 at 10:33 PM
Getting access to TuningPlayAudio
Hey has anyone had any luck playing audio via play_tunable_audio function from the primitive.py file?
I have been trying to do that for a custom audio mod.
I tried to copy this into my script, but unfortunately I couldn't get the bills_paid_sfx to load because my script couldn't run the TunablePlayAudio constructor properly for some reason.
Code:
play_tunable_audio(self.AUDIO.bills_paid_sfx)
This is what the assignment for AUDIO looks like in the bills.py file (where I am trying to copy it from:
Code:
AUDIO = TunableTuple(description='Tuning for all the audio stings that will play as a part of bills.',
delinquency_warning_sfx=TunablePlayAudio(description='The sound to play when a delinquency warning is displayed. ')
...
Audio is a tuple that seems to contain other Objects.
So I tried to do something like:
Code:
play_tunable_audio(AUDIO.delinquency_warning_sfx)
after copying the code for AUDIO tuple initialization from bills.py but the code couldn't find delinquency_warning_sfx. I am guessing that it somehow gets injected dynamically based on some tuning file for that file (bills.py) but not for my mod.
Does anyone know where I can look at to figure this out?