Background music, Shader zoom

  • #1, by ke4Thursday, 05. March 2015, 14:10 6 years ago
    Hi,

    i have two questions.
    1. I have a scene and there is music in the background playing, the problem is that everytime i leave the scene and come back the song starts play always from the beggining and it doesn't sounds naturaly, can i set somehow to the song to start from random part or from the part when i was leaving the scene?

    2. I like to use the shader zoom effect ( or ShaderViewport ) in my minigames at the beggining of scene, cca 1.2 zoom,
    but it affect all features and when my character is talking, the text isn't visible, is there some better solution than setting different text position in that part?

    Thanks!

    Key Killer

    810 Posts


  • #2, by afrlmeThursday, 05. March 2015, 15:15 6 years ago
    1. Only the Lua script version of starting & controlling sounds has the option to store & set the current playtime. There's also a pause toggle & stop function for Lua started sounds.

    2. hmm not sure. If you include the shaderExclude option somewhere then you can have the shader ignore: text, cursors & interfaces etc.
    game.ShaderExclude = eShaderExcludeInterfaces -- excludes text, cursors & interfaces, or...
    game.ShaderExclude = eShaderExcludeTextsAndCursor -- excludes text & cursors, or...
    game.ShaderExclude = eShaderExcludeCursor -- excludes cursors.
    1
    2
    3
    4

    ...I can't really say anything much about the text, but it might be worth considering forcing the position of it with the setTextPosition hook function.

    Imperator

    6842 Posts

  • #3, by ke4Thursday, 05. March 2015, 15:32 6 years ago
    I actually forgot it hid the inventory too. Good thing i'll try the exclusion.
    Problem is that i have already one global setTextPosition hook function for positioning the text to the bottom of the screen.

    Are these global scripts like a loop? can i have condition there something like "if minigame"?

    Key Killer

    810 Posts

  • #4, by afrlmeThursday, 05. March 2015, 15:41 6 years ago
    sure. You can create if queries. So you could query inside if it's x scene, this condition, that condition etc. etc.

    It's a bit unfortunate that currently only multiple mainLoop handlers are allowed. The rest of the handlers / listeners & hooks are only allowed once, which means you need to add your actions / queries inside of the main function you assign to it, or have it call another function or start a called by other action.

    Imperator

    6842 Posts

  • #5, by ke4Thursday, 05. March 2015, 17:32 6 years ago
    Okey, i'm happy with the if query inside.
    thank you :-)

    Key Killer

    810 Posts

Write post