License from €75 Log in
DE EN FR ES IT CZ

Load autosave using Lua

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 9 years ago
    Hi all,
    How can I implement this code in Lua script?


    Thanks.
    • Image in post
  2. Working on a game?

    The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license.

    See licenses Try it for free
  3. · 9 years ago
    Hi, 

    currently there is no possible way to load a savegame via lua directly.
    You may need to start the action via lua which contains your actionparts :

    startAction("Actions[name_of_action]") 
  4. · 9 years ago
    Thanks for the help.
    Sorry for the question but how do I know the 'name_of_action'?
    This Action (in the screenshot) is located under entry/button of menu called 'menuGameRestart'.

  5. · 9 years ago
    Rightclick on the action and select "copy Lua path". 
  6. · 9 years ago
    On RightClick I have only a view option...
    I am using visionaire v 4.2.5
    • Image in post
  7. · 9 years ago
    Ah sorry, this function must be new in Visionaire5.

    In your case the Lua path should be:

    Scenes.menuGameRestart.Objects.YesBttn.Actions["'Left click' executed"]

    (I filled in the bold parts according to your screenshot)
  8. · 9 years ago
    Thanks, 
    that one works like charm! smile
  9. · 9 years ago
    Out of curiosity why are you using Visionaire Studio 4.2.5 instead of 5.x?
  10. · 9 years ago
    I found it very herd to start learning Visionaire Studio and Lua. 
    All of the code, resources and tutorials that I'm using are on 4.2.5 so it was the obviously choice...
  11. · 9 years ago
    It doesn't matter. Old Lua scripts will still work in 5.x, but you now have some newer methods available too for extra shorthand.

    While 5.x might look a lot different to 4.2.5 & below, in large part due to the new GUI, it still more or less works the same. I recommend starting with 5.x for many reasons. 4.2.5 is outdated, has various unaddressed bugs & will not be getting any new updates to fix said bugs.

    Now in regards to Lua script... do you already know any scripting/programming languages or is this the first scripting language you are learning? if it is then I'd just focus on learning how to use Visionaire Studio itself first rather than diving ass first into the deep end (as I like to call it).
  12. · 9 years ago
    AFRLme, 
    first I like to say I am appreciate your commitment to every post, Thank you.

    Now I dive into Visionaire I do feel safe to upgrade my environment to 5.x, is thet change is straightforward?

    About the scripting, I am developer and using in my day job many scripting and programming languages, tell the truth, I am felling more comfortable will reading Lua code  smile


This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?