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

Undo condition

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

  1. · 10 years ago
    Hey, its me again.
    So i wanted to ask if theres a possibility of undo-ing all conditions and values without changing every single one. When you finish the game and get back to the start menu and then start the game again it starts with all conditions and outfits of the last playthrough.
    Last Problem till finishing the game i swear haha
  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. · 10 years ago
    There's multiple methods you can use for resetting all the data.

    1. manually, but as you said. That will take way too long.

    2. using the quicksave/autosave system. You need to create an autosave at the beginning of the game or after pressing the new game button during the initial scene or something. You need to wrap it inside of an if query like so...

    if autosave #1 exists
    else
     pause 500ms
     execute autosave #1
    end if


    Something along the lines of that.

    3. You can use the replaceGame() Lua function which will essentially restart the game from the beginning like how you used to be able to do on sega/snes games etc by holding down x buttons together on the gamepad.
    replaceGame("data.vis") -- replace data.vis with whatever you called the exported vis file when you compiled your game

    I think option 3 is only valid for exported games. I'm not sure if you can reload ved file from the editor. I think it's vis files only.
  4. · 10 years ago
    I need a reset too. Example Nr. 3 looks good. What happens if I build a reset button into the game with this Lua code line? I have to reset more than 50 values to zero and to make 25 objects visible. 
  5. · 10 years ago
    It's 4.25. 
  6. · 10 years ago
    Oh, shit, this autosave-thing works great! Trying 2 weeks with Lua was pointless. Thanks AFRLme for this stupid simple solution I never have had in my mind smile

    I hope it's possible on every pc, because you need to write into an user folder, mostly C:/eigene Dateien or s.th like that. 
  7. · 10 years ago
    replaceGame() is available since 4.1 or 4.2 I think. It basically reloads the main vis file. Think of it like pressing reset button on a playstation or something.

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?