Sliders to control various volumes?

  • #1, by afrlmeTuesday, 09. October 2012, 02:33 13 years ago
    There has to be a simpler way to make volume sliders for voice, fx & music other than the method I've seen in "maniac mansion madness" ...

    I want to use a slider system similar to deponia ... can't see how to do this within V.S so I'm guessing it needs to be done with LUA?

    I've been looking at the scripting/data structure wiki pages but all I'm seeing is a load of text & bright colors roll

    Could anyone please tell me how to achieve this or give me some examples of LUA Script with detailed comments?

    Much appreciated. Cheers wink

    Imperator

    7286 Posts


  • #2, by EinzelkämpferTuesday, 09. October 2012, 14:07 13 years ago

    Newbie

    81 Posts

  • #3, by afrlmeTuesday, 09. October 2012, 14:44 13 years ago
    cheers man smile

    I used to be quite proficient at German many a blue moon ago (10+ years ago) but I haven't used it since I finished high-school & I have really bad memory for things I haven't used in a while.

    I'm sure I can work from the example mind as code is universally in english smile

    *yeah I can use that seeing as it's only the code I needed!

    Imperator

    7286 Posts

  • #4, by EinzelkämpferTuesday, 09. October 2012, 21:49 13 years ago
    It's been a while since I made the slider demo. But I remember that there is an annoying behaviour of the slider when dragging the cursor out of the "sliding area" while keeping the mouse button pressed. The slider will then continue sliding.

    If you want the slider to stop when dragging the cursor away, you should take the action parts that can be found in the "Left mouse button hold (button released)" action and copy them into the three "Cursor leaves object area" actions for the scene objects "Musik - Regler", "Sound - Regler", and "Sprache - Regler" in the "Lautstärke" scene.

    Hope this makes sense. :-)

    Newbie

    81 Posts

  • #5, by afrlmeWednesday, 10. October 2012, 01:01 13 years ago
    yeah I can figure it out & I noticed the drag bug too wink (even does it on deponia - oh dear)

    I've been changing it into English too so I will upload it when I'm done with comments of what I changed etc - rough though as some words didn't translate perfectly so I changed them to what I think fits best ...

    btw you misspelled Schrieben? as Schieben which wouldn't translate obviously I figured it meant to write/draw so I did a reverse English to German & it said Schrieben ...

    Cheers again grin

    Imperator

    7286 Posts

  • #6, by afrlmeWednesday, 10. October 2012, 04:48 13 years ago
    it's coming along quite well now ... changed it all into english apart from the comments thus far & adapted it a wee bit so it plays a sound when you let go of mouse button after dragging (sfx) & plays voice sound with text hidden on voice slider.

    also the vol - (minus) + (plus) buttons play sound/voice each time you click them.

    I added the quit actions like you said to the mouse out bits & some other bits & bats ...

    I will have a look at the config ini thing the morrow wink

    Imperator

    7286 Posts

  • #7, by EinzelkämpferWednesday, 10. October 2012, 13:44 13 years ago
    If you need help with the translation, just ask me. My English is not that good, but translating the function and variable names in the LUA code as well as the comments should not be a problem.

    "Schieben" means "to push / to slide". (http://dict.leo.org/?lp=ende&from=fx3&search=schieben)

    Newbie

    81 Posts

  • #8, by afrlmeWednesday, 10. October 2012, 14:11 13 years ago
    ahh cheers ... it didn't come up with anything on the translator smile

    your English is about infinity % better than my German - haha.

    I got the variable & function names sorted apart from the "schieben" obviously & one other "GehaltenStandard" but gehalten translated as held/hold so I presume it's to do with delay time of mouse button held before it registers as it's being held !? (something along those lines anyway)

    Imperator

    7286 Posts

  • #9, by EinzelkämpferWednesday, 10. October 2012, 14:55 13 years ago
    I just translated the ved file for you: http://home.arcor.de/thoroe/slider_script_en.zip

    Make good use of it. smile

    Newbie

    81 Posts

  • #10, by afrlmeWednesday, 10. October 2012, 15:02 13 years ago
    much appreciated man smile

    I will do!

    Imperator

    7286 Posts

  • #11, by NigecWednesday, 10. October 2012, 16:12 13 years ago
    Fantastic job! thank you smile

    Key Killer

    640 Posts