Is there a way to load a game via event? (Continue After Defeat)

Allow me to preface this with, I know how to use scripting to save a game with
Code:
$gameSystem.onBeforeSave();
DataManager.saveGame(1);
I actually do use this to restrict player saving to a save point and a key item (The save point saves to slot 1, the item saves to slot 2. This keeps the game from being unwinnable due to player error.)
I want to implement a checkpoint system into the game where a checkpoint is placed before a boss fight that can end in game over, (therefore skipping most of a cutscene and just getting to the fight,) and thus to streamline the process, I need a script call that would allow me to load a save slot (saving the player a few extra key presses by having them answer yes on 'Do you wish to continue?').
On this note, would it also be possible to, via script call, delete a save file?
Thank you for your consideration and your time.
... load/delete a save file?
Load Save:
Code:
var saveId = 1; if (DataManager.loadGame(saveId)) {SceneManager._scene.fadeOutAll();if ($gameSystem.versionId() !== $dataSystem.versionId) {$gamePlayer.reserveTransfer($gameMap.mapId(), $gamePlayer.x, $gamePlayer.y);$gamePlayer.requestMapReload();}SceneManager.goto(Scene_Map);}
Delete Save:
Code:
var saveId = 1; StorageManager.remove(saveId);
Doing some quick testing with a test project, and it all works perfectly from what little I did.
Notes: Saving mid-cutscene keeps the positions of the events at that time upon load. Loading a save, whether manual or by script, shows no issue with mid-cutscene actions. Deleting a save does not result in any save file corruption. Therefore, this achieves exactly what I needed. Thank you, @ct_bolt, for the help.

EDIT: I was doing a little playing around with Yanfly's Save Core plugin. While it is an easily resolved issue, if you create a save on a slot that doesn't exist (by way of reducing the max number of save slots), and then delete it, it will cause the game to crash. If you use this in conjunction with a plugin that reduces the number of save slots, don't save to a file that doesn't exist and then delete it.
Doing some quick testing with a test project, and it all works perfectly from what little I did.
Notes: Saving mid-cutscene keeps the positions of the events at that time upon load. Loading a save, whether manual or by script, shows no issue with mid-cutscene actions. Deleting a save does not result in any save file corruption. Therefore, this achieves exactly what I needed. Thank you, @ct_bolt, for the help.
Yay! Glad to hear it! Happy Game Making!!!
EDIT: I was doing a little playing around with Yanfly's Save Core plugin. While it is an easily resolved issue, if you create a save on a slot that doesn't exist (by way of reducing the max number of save slots), and then delete it, it will cause the game to crash. If you use this in conjunction with a plugin that reduces the number of save slots, don't save to a file that doesn't exist and then delete it.
Ahh interesting good to know, maybe I'll look into that also 🙂

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-load-a-game-via-event-continue-after-defeat.120449/