Hello!
Ruby just decided to do whatever it want and that brings me question:
How can I check if save file is present?
Other than 'if DataManager.load_game(0)', because putting that in conditional actually loads the game (for some mysterious reason). I was struggling with this for hours and when I located the problem I was really surprised how stupid it can be.
Short description:
I have a scene and if I click something, it forces the method.
def some_update_method if Input.trigger?🙂somebutton) if cursor_hit? # < this checks if the cursor is on clickable image RPG::SE.new(Fire9,100,100).play SceneManager.goto(Scene_Map) end endendHowever, I created sprites (these clickable images), that appear when a save file is present, hence the 'if DataManager.load_game(0)' is needed:
And how in the hoof the 'DataManager.load_gane(0)' is processing when I'll close the scene? I really cannot understand this.
The result is that, when I click an image, it loads the last save for no reason.
Reference image:
Any help appreciated.
Ruby just decided to do whatever it want and that brings me question:
How can I check if save file is present?
Other than 'if DataManager.load_game(0)', because putting that in conditional actually loads the game (for some mysterious reason). I was struggling with this for hours and when I located the problem I was really surprised how stupid it can be.
Short description:
I have a scene and if I click something, it forces the method.
def some_update_method if Input.trigger?🙂somebutton) if cursor_hit? # < this checks if the cursor is on clickable image RPG::SE.new(Fire9,100,100).play SceneManager.goto(Scene_Map) end endendHowever, I created sprites (these clickable images), that appear when a save file is present, hence the 'if DataManager.load_game(0)' is needed:
class Sprite_Clickable < Sprite def initialize(viewport,id,object = 0) super(viewport) @object = object setup_image initial_position end def initial_position okay, lets skip that part end def setup_image case @object when 0 self.bitmap = Cache.game("Chapter 0") when 1 if DataManager.load_game(0) # <<< WHY IS THIS PROCESSING? self.bitmap = Cache.game("Chapter 1") else self.bitmap = Cache.game("Chapter -") end when 2 etc. etc. end ...more stuff here...end
The result is that, when I click an image, it loads the last save for no reason.
Reference image: