LUA Script requests in here ...

  • #10, by afrlmeWednesday, 16. January 2013, 21:19 13 years ago
    https://love2d.org/wiki/Main_Page

    some of the modules & plug-ins of the open-source lua thing I linked above sound interesting ... maybe Alex can find something useful in it to integrate into the VS engine?

    Imperator

    7286 Posts


  • #11, by petemqWednesday, 16. January 2013, 22:48 13 years ago
    I'd love a script allowing to:

    1) play a sound (not bg-music) longer than a minute (the engine always breaks down... sad [alternative: a script to change the background music after it hasfinished for the first time, based on a value (if that value doesn't change, the music stays equal)]

    2) Display a text at a particular position, WITHOUT relating it to an object/character. Just a normal background text. Parameters should be: font, offset, line length

    If you manage to do ANY of these, you automatically earn my ador(n? as you're a native speaker: does it belong there? Or how is that noun written like?)ment and thanks! (You already earned thy, though. Nevertheless wink )

    Newbie

    5 Posts

  • #12, by afrlmeWednesday, 16. January 2013, 23:18 13 years ago
    well that sounds like proper & prim English the me mate smile

    Gratitude would be a much better word.

    the display/narration text is already in the wiki & is linked in the sticky topics wiki page under "narration text" ...

    it allows you to position display text (non speaker) anywhere on the screen ... currently it's set up so the x (horizontal) is center & y (vertical) is offset by -100 from the bottom of the screen.

    these values of course can be edited & with a bit of tweaking you could also position display text by x character also.

    currently there are not many options available for controlling sound.

    you can create actions inside of the editor to control sound to some degree but if you wanted to gradually fade a sound in or out / change balance then you would need to combine actions with a loop event or use a mainLoop event in lua.

    Imperator

    7286 Posts

  • #13, by petemqThursday, 17. January 2013, 15:44 13 years ago
    Well, that is actually what I do right now.

    I have an action called "background music selection", starting immediately at game start. By a value (background music) it calls further actions ("play theme one" if the value is one).

    These action parts continue three commands: -play sound xy -wait until sound xy is finished -call action [background music selection]

    By this I want to avoid sudden changes in the themes... all music composed uses the same scales and a similar bassline. This allows me to have a soft flow in the music, it is supposed to sound like it was composed like this. If during the scene e.g. a scary character appears I would just change the value and wait the time the current sound needs for finishing and then play the scary theme.

    This avoids this "ah! It's gettin scary! Feel scared in three, two, one, NOW!" -effect, which disturbs the flow and just doesn't fit to nothing. Difficult to compose for that, because sounds mustn't be longer than, like thirty seconds in particular moments, cause oherwise the scary moment might already passed before the sound starts.

    There are two problems, though. A minor one is, that only sounds of less than a minute can be played. Easy to solve, though, but nevertheless annoying. My solution is to cut the sound into pieces (I use cubase, but audacity works just as well) and then add an "set value [background music] z" as the second last line of the "play sound xy"-action.

    The other one is more severe, and I yet don't have a solution. The scene changes automatically stop the sound currently playing. Fortunately the action is called again and in the worst case just starts the sound from the beginning. The only way of maintaining that concept of flow is to add an "wait until sound xy is finished" line right before the "change scene". But this would make my char standing for a couple of seconds for no reason. Not a good choice.

    Background music can be kept. So my request means basically I want to be able to change the background music while still being in that scene. Cuz then my method would work wink

    Is that coming with the new sound engine?

    Thx for telling me bout the text script. I'll try it!

    Newbie

    5 Posts

  • #14, by afrlmeThursday, 17. January 2013, 16:12 13 years ago
    I do not know exactly what will be available in the new sound engine but a few more options are supposed to getting added to the editor.

    we'll just have to wait & see unless David let's me know wink

    Imperator

    7286 Posts

  • #15, by petemqThursday, 17. January 2013, 19:40 13 years ago
    As I see it isn't possible to play a sound along with the speaker text (unless you use the "play sound" option). Right? And if I don't set a pause time, will the text display forever?

    Newbie

    5 Posts

  • #16, by afrlmeThursday, 17. January 2013, 19:59 13 years ago
    nope it defaults to x seconds. something along the lines of 2 or 3 seconds I think ...

    only way to display speaker text for a long time is the add a large number like so: <p999...>

    there's no option to allow for "only skip on left click" currently, so maybe it would be a good idea to suggest it to be implemented into a future release - if enough people are interested.

    hmmm no you can only perform other actions / call other actions with dialogs. but as you said you can use playsound in the same block as display text or use a call by other action & control when to play the sound with pause by x time found in miscellaneous.

    Imperator

    7286 Posts

  • #17, by marvelFriday, 18. January 2013, 10:55 13 years ago
    I would like to see a script with a clock... corresponding with the REAL TIME! smile

    Key Killer

    603 Posts

  • #18, by divoFriday, 18. January 2013, 12:43 13 years ago
    Just adapt AFRLme's script for the 24 hour counter and use a = os.date("*t") to get the current date. a will be a table with the scructure {year = , month = , day = , yday =, wday = , hour = , min = , sec = , isdst = } so you can access the values by e.g. a.min and use this values to set the right animation frame.

    Newbie

    0 Posts

  • #19, by divoFriday, 18. January 2013, 22:59 13 years ago
    Sound Sound manipulation and everything that has to do with sounds would be possible by using an external library, which will be controlled by LUA. I think I will take a closer look to that and when it works, I will post it in the wiki.

    Global/local colour manipulation I'm not sure if that will ever be possible until you get access to the memory where the images/animations are loaded into. Currently the scripting interface isn't able to do that.

    360° This should be possible (as long as you just want to move horizontally). Imagine you have a scene background, where at the left is an area A and at the right an area B. A and B are equal and all objects in A will also be displayed in B. A and B must be wider than the horizontal resolution (otherwise the same object would be there twice). If the character (and therefore the scene) moves towards area B, all objects from A must be be moved in area B. Once the character totally reached B, all objects have to be moved back to A, the character's position must be adapted to the same as in B but now in A, .... In detail it is a little bit more complicated, because you have to reload the scene, take care of the characters walk animation, ....

    Newbie

    0 Posts

  • #20, by afrlmeFriday, 18. January 2013, 23:10 13 years ago
    http://www.willpearson.co.uk/virtual-tour/gigapixel-view-fro... 360 view thing that Nige linked me as an example ...

    it's comprised of loads and loads of photos to keep everything in the correct aspect ratio / proportion while rotating ... you could technically make it so you have 4 walls & switch from one to the other if you used a long single image but you wouldn't be able to rotate it smoothly.

    I was hoping that contrast, saturation for the window could be altered seeing as we can control the window brightness.

    sound will have to wait until next release of VS & see what can be done with the new sound engine (if all goes well)

    Imperator

    7286 Posts