Graphics

 View Only
  • 1.  Setting Audio file via scripting

    Posted 03-02-2020 22:25

    We have several "Billboards" that we play during games that feature sponsorship elements and voiceovers. Sometimes these billboards are back to back. Up until now I would build the back to back billboards in one scene but this limits our flexibility. Using transition logic I have set up all our full screens so that all graphics are built on a single scene "SPONSOR FS" with a selector that sets the correct sponsor logo over our BG. I want to do the same with our billboards and this would include setting the "xpAudioFIle" object. Using if loops I was planning on something like:

    if index = "Ford" then

    'get the billboard audio object

    'set this object with the corresponding audio file "BB_Ford"

     

    Has anyone had any success setting this sort of thing up?

     

    Thanks in advance



  • 2.  RE: Setting Audio file via scripting

    Posted 03-02-2020 23:16

    looking through the SDK help file I have found "xpSceneDirectorClip" object that I think might be the way to go. Rather than replace the audio file, I can just select the appropriate Audio clip, or so I think.


    #XPression


  • 3.  RE: Setting Audio file via scripting

    Posted 03-05-2020 18:46

    Hi Malcolm

    If you have a fixed set of audio files, and know they don't need to change regularly (ie have a different filename), then I'd:

    • Make audio file clips for each one in the layout editor
    • Add each audio clip onto it's own audio track in your scene director
    • Then depending on which billboard you want, have a For Next loop that disables each audio track in the scene director, except for the one you want.  I'm assuming you only have a handful of different audio clips, not hundreds!

    If I've understood the problem correctly!

    Simon


    #XPression


  • 4.  RE: Setting Audio file via scripting

    Posted 03-05-2020 18:48

    Simon, that's an interesting way to come at it. KISS "Keep it simple, stupid". Thank you very much.


    #XPression


  • 5.  RE: Setting Audio file via scripting

    Posted 03-05-2020 23:33

    Simon, this works until I set up Transition Logic, then it looks like it breaks my if else loops and all clips roll. But I have made more progress today than in the last month

     


    #XPression