Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Execute code while switching a scene?

  • #1, by stothew 8 years ago Zitieren
    Hi there!

    i would love to execute code while switching the scene.

    An easy example would be playing the sound of an closing door.
    it should play at the time the screen is black, but if i just put it after "switching the scene" it plays to late. (i don´t want to make the fade longer with my own "black fade" after the transition.

    Any other idea how to solve this?

    Thanks!
  • #2, by afrlme 8 years ago Zitieren
    It should play instantly on the next scene change. Does the sound play instantly in the audio recording or is there a delay before it actually plays?
  • #3, by stothew 8 years ago Zitieren
    if the new scene is displayed the door is already closed.
    so it should play before the screen begins to fade to the new scene (while black).  i cut the sound so (at the moment) it plays instantly at play action. (but this happens after scene is fully loaded / visible, which is too late)
    it´s not that much delay, but noticeable because the the door in the new scene is already closed.
  • #4, by afrlme 8 years ago Zitieren
    Did you try adding a short pause in the action block before playing the sound?

    Also, quick note: scripts & actions & so on are paused when fading between scenes. They only carry on if scene is changed immediately.
  • #5, by stothew 8 years ago Zitieren
    Ah, got it!
    you can trigger another action this one goes on even when the scene is fading.

    Thanks.