Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Help me with this $scene = Scene_Battle.new

Status
Not open for further replies.

A J

Member

OK I've done some changing on some scripts and added some too all for to make a Scene_Menu for the battle system

anyway everthing in the menu is woking fine no I mean PERFECT but when I go back the battle the start from the beginning I know the problem is in this code ( $scene = Scene_Battle.new ) but what should I add to make continue
so please help.

This is the part I'm having problem with
Code:
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to Battle screen
      ######################################################
      $scene = Scene_Battle.new
      #####################################################
      return

NOTE: I know nothing about scripts so don't curse me coz I don't know what to write
 
Are you wanting to exit battle, and resume as it was?


Well, I cannot say for sure, but when you exit your scene, have something like

Code:
$old_scene = self.dup

Then, instead of $scene = Scene_Battle.new, use $scene = $old_scene.

No promises, but may work.
 
The huge problem there of course is that with two Scene_* objects initialized, the $old_scene is going to be initially visible, in addition to the new scene, and eventually be picked up by the garbage collector.
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top