Skip to content

Delete State

Delete State

Deletes a previously saved game state at the specified index.

Properties

System

Name Explanation Type
Result The switch to store whether the delete operation succeeded. Switch or Value
State Index The index of the saved state to delete. Variable or Value
Store Results When enabled, the result of the delete operation is stored in a switch. Toggle

Examples

Delete the Save State at Slot 1

This deletes the saved game state at slot index 1.

delete_state(1);
{"Data":{"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"StateIndex":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"1","VariableIndex":0,"Metadata":null},"StoreResults":false,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.StateData.DeleteStateCommand"}

Delete a Save State and Store the Result

This deletes the saved game state at the slot specified by Global Variable 0, storing whether the deletion succeeded in Global Switch 0.

$gs[0] = delete_state($gv[0]);
{"Data":{"Result":{"IsGlobalSwitch":true,"IsLocalSwitch":false,"IsValue":false,"Value":false,"SwitchIndex":0,"Metadata":null},"StateIndex":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"StoreResults":true,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.StateData.DeleteStateCommand"}