From da9676b05403a0edf667bcebb5c7d4b475cb176b Mon Sep 17 00:00:00 2001 From: EthanWatkins1720 <70484753+EthanWatkins1720@users.noreply.github.com> Date: Mon, 22 Apr 2024 20:06:55 -0400 Subject: [PATCH] Fixed save game and pause screen bug Fixed bug where game would crash when trying to save due to wizard and mercenary no longer being objects in the save function. Fixed bug where game would crash when pressing P on pause screen. --- Turn-Based-RPG/rooms/rm_start/rm_start.yy | 11 +++-------- Turn-Based-RPG/scripts/Save/Save.gml | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Turn-Based-RPG/rooms/rm_start/rm_start.yy b/Turn-Based-RPG/rooms/rm_start/rm_start.yy index 5b9aaa8..5867d7b 100644 --- a/Turn-Based-RPG/rooms/rm_start/rm_start.yy +++ b/Turn-Based-RPG/rooms/rm_start/rm_start.yy @@ -9,20 +9,15 @@ "instanceCreationOrder": [ {"name":"inst_50414333_1","path":"rooms/rm_start/rm_start.yy",}, {"name":"inst_4EC5404E","path":"rooms/rm_start/rm_start.yy",}, - {"name":"inst_6D57FACC","path":"rooms/rm_start/rm_start.yy",}, - {"name":"inst_27FA8B2E","path":"rooms/rm_start/rm_start.yy",}, - {"name":"inst_5DED9CA7","path":"rooms/rm_start/rm_start.yy",}, ], "isDnd": false, "layers": [ - {"resourceType":"GMRInstanceLayer","resourceVersion":"1.0","name":"Instances","depth":0,"effectEnabled":true,"effectType":null,"gridX":1,"gridY":1,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"instances":[ + {"resourceType":"GMRLayer","resourceVersion":"1.0","name":"Folder_1","depth":0,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"properties":[],"userdefinedDepth":false,"visible":true,}, + {"resourceType":"GMRInstanceLayer","resourceVersion":"1.0","name":"Instances","depth":100,"effectEnabled":true,"effectType":null,"gridX":1,"gridY":1,"hierarchyFrozen":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"instances":[ {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_50414333_1","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"objectId":{"name":"obj_game","path":"objects/obj_game/obj_game.yy",},"properties":[],"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":0.0,"y":0.0,}, {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_4EC5404E","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"objectId":{"name":"obj_start_menu","path":"objects/obj_start_menu/obj_start_menu.yy",},"properties":[],"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":0.0,"y":1.0,}, - {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_6D57FACC","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"objectId":{"name":"obj_player","path":"objects/obj_player/obj_player.yy",},"properties":[],"rotation":0.0,"scaleX":-1.5625,"scaleY":1.2142856,"x":-12218.0,"y":-3805.0,}, - {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_27FA8B2E","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"objectId":{"name":"obj_cool_wizard","path":"objects/obj_cool_wizard/obj_cool_wizard.yy",},"properties":[],"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":-12013.0,"y":-3758.0,}, - {"resourceType":"GMRInstance","resourceVersion":"1.0","name":"inst_5DED9CA7","colour":4294967295,"frozen":false,"hasCreationCode":false,"ignore":false,"imageIndex":0,"imageSpeed":1.0,"inheritCode":false,"inheritedItemId":null,"inheritItemSettings":false,"isDnd":false,"objectId":{"name":"obj_mercenary","path":"objects/obj_mercenary/obj_mercenary.yy",},"properties":[],"rotation":0.0,"scaleX":1.0,"scaleY":1.0,"x":-11888.0,"y":-3583.0,}, ],"layers":[],"properties":[],"userdefinedDepth":false,"visible":true,}, - {"resourceType":"GMRBackgroundLayer","resourceVersion":"1.0","name":"Background","animationFPS":15.0,"animationSpeedType":0,"colour":4278190080,"depth":100,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"hspeed":0.0,"htiled":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"properties":[],"spriteId":null,"stretch":false,"userdefinedAnimFPS":false,"userdefinedDepth":false,"visible":true,"vspeed":0.0,"vtiled":false,"x":0,"y":0,}, + {"resourceType":"GMRBackgroundLayer","resourceVersion":"1.0","name":"Background","animationFPS":15.0,"animationSpeedType":0,"colour":4278190080,"depth":200,"effectEnabled":true,"effectType":null,"gridX":32,"gridY":32,"hierarchyFrozen":false,"hspeed":0.0,"htiled":false,"inheritLayerDepth":false,"inheritLayerSettings":false,"inheritSubLayers":true,"inheritVisibility":true,"layers":[],"properties":[],"spriteId":null,"stretch":false,"userdefinedAnimFPS":false,"userdefinedDepth":false,"visible":true,"vspeed":0.0,"vtiled":false,"x":0,"y":0,}, ], "parent": { "name": "Rooms", diff --git a/Turn-Based-RPG/scripts/Save/Save.gml b/Turn-Based-RPG/scripts/Save/Save.gml index e05b59c..1028baf 100644 --- a/Turn-Based-RPG/scripts/Save/Save.gml +++ b/Turn-Based-RPG/scripts/Save/Save.gml @@ -22,7 +22,7 @@ function Save(){ // y: obj_mercenary.y, // current_room: room, // } - //array_push(party_member_objects, player, cool, mercenary); + array_push(party_member_objects, player); party_info = [] // Stores player party information as an array of party member structs array_push(party_info, ds_list_size(global.party));