How do I check if a save slot is already full?

From OHRRPGCE-Wiki
Jump to navigation Jump to search

So you have made your own save menu and you would like to add the message "There is already a saved game in this slot. Are you sure you want to save?" so that the player knows he/she will erase a previous save if he/she chooses yes .

This can be done with one script, one text box, and one tag.

The text box and tag[edit]

Make a text box.

 "There is already a saved game in this slot. Are you sure you want to save?"

Enable the choice for this text box. The choice will turn a tag ON if you pick "YES" and it will turn the same tag OFF if you pick "NO"

For the sake of this example, we will pretend that you are using text box 15 and tag 2.

The Script[edit]


plotscript, save slot, which, begin

  if (save slot used (which)) then( #check if save slot is filled or not

    show text box (15)
    wait for text box
    if(check tag(2)) then(
      save in slot(which)
    )

  ) else ( #if save slot is empty, there no need to ask. Game is saved automatically.
    save in slot (which)
  )

end

See Also[edit]