Behaviour when the Visionaire Player loses focus

  • #1, by chronologicFriday, 09. November 2018, 18:58 5 years ago
    Hi, I am trying to use VS to create the introduction scenes of my game...

    So this is largely based on specific timings to sync the music, speech, sound effects, movement of objects, and scrolling of scenes. However I am experiencing issues related to how VS behaves when it loses focus. (Alt-Tab to another application)

    It seems that some comands will continue to run in the backgound, while others will wait in the same place until regaining focus.

    For example, pause, moving objects, and non-audio dialogue will continue to run in the backgound, while background music, dialogue with audio, and scene scrolling will wait at the same place until the focus is regained.

    How can you ensure the sequence of events if commands are not consistent to eachother and the focus is lost?

    Newbie

    25 Posts


  • #2, by afrlmeFriday, 09. November 2018, 19:37 5 years ago
    Try inserting this inside of an execute a script action part in the game launch actions section...
    system.pauseOnFocusLost = true
    I found it in Simon's Luadocs, but there's no description or example on how to use it. Let me know if it works.

    Imperator

    7278 Posts

  • #3, by chronologicFriday, 09. November 2018, 20:16 5 years ago
    Unfortunately, it doesn't seem to make any difference.

    Newbie

    25 Posts

  • #4, by SimonSFriday, 09. November 2018, 20:39 5 years ago
    system.pauseOnFocusLost = false

    is what you're looking for.

    Thread Captain

    1580 Posts

  • #5, by chronologicFriday, 09. November 2018, 21:37 5 years ago
    Thanks, everything now runs together in the background. 
    Panic over :-)

    Newbie

    25 Posts

  • #6, by afrlmeFriday, 09. November 2018, 21:44 5 years ago
    system.pauseOnFocusLost = false

    is what you're looking for.

    Sorry. true seemed to make more sense to me as I thought you wanted to pause when focus was lost. oh well, at least you have sorted it out now. wink

    Imperator

    7278 Posts

  • #7, by chronologicFriday, 09. November 2018, 21:49 5 years ago
    Everything pausing when losing focus would have been better, but that doesn't seem to happen when set to true... But setting to false makes everything run in the background which is the next best thing. As long as it all does the same thing... Thanks

    Newbie

    25 Posts