Could do with some variable advice.

Discussion in 'RPG Maker MV' started by Alexander Hawksmoor, Sep 13, 2017.

  1. Alexander Hawksmoor

    Alexander Hawksmoor Veteran Veteran

    Messages:
    375
    Likes Received:
    1,953
    Location:
    England
    First Language:
    English
    Primarily Uses:
    RMMV
    So I had to leave this for a couple of days because it was giving me a headache. To start off, I'm making an evented title screen using hime's plugin, and what I'm trying to accomplish can be seen in pictures 1 and 2, basically, when a save file is present, all the options including continue adventure are available, and when a save file isn't present, the continue option is tinted grey and isn't available. To try and accomplish this I've created a conditional branch in a common event that you can see in picture 3 which uses the if DataManager.isAnySavefileExists() to change a variable depending on if the save file exists or not, if one exists, value = 1, if not then 0. Then in the next picture, I've called the common event and created a conditional branch that says if a save file isn't present, turn switch 1 on, and if it is present, turn switch 2 on. If no save file is present, switch one activates which tints the continue option grey and in the next picture you can see I've made the option unavailable. If a save file is present, the other switch activates which makes continue available. The problem is that regardless of whether a save file is present or not, the continue option is available and I'm not sure what im doing wrong, any help is appreciated.
     

    Attached Files:

    #1
  2. Zarsla

    Zarsla Veteran Veteran

    Messages:
    675
    Likes Received:
    190
    First Language:
    English
    The biggest problem with your title screen is the fact that using switches and variables is hard with using a Perstiant Switches & Variables plugin. It will allow you to make variables and switches that work between multiple saves. As to why to use this method, this is because when starting a new game, the variables and switches are reset. This inculdes Himeworks Pre-Title Events, the trick with this is to do what Echo607 did in her video that dealt with making a custom tile screen.

    So here's what you need:
    First get this plugin by Himeworks.
    Make a switch called " SaveFileExists"
    Then in your title event, make two separate pages, one where the "continue" option is grey out and the other where it is not. In the one where the
    "continue" option is not greyed out make sure that one of the page conditons is " SaveFileExist".

    Now make a common event:
    It's going to have a variable equal to the save count. It's then going to have a conditional branch checking if the variable is greater then or equal to 1. Under the control branch, turn on "SaveFileExists" and turn off the switch that makes this a parallel process. Make sure it's set up to be a parallel process.

    Now at the beginning of game make sure to turn on the switch that turns on the parallel process event.

    Your current event should looked like this:
    Screenshot (24).png
     
    #2

Share This Page