Custom_Scene Script Issues

I am planning on making a custom scene and am having some issues with my script.

I am supposed to have a black screen with a window at the top of the screen, but the project just freezes.

This is the script.

Spoiler
class MyCustomScene < Scene_Base #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start super() @my_window = Window_Help.new() end #-------------------------------------------------------------------------- # * Post-Start Processing #-------------------------------------------------------------------------- def post_start super() end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super() end #-------------------------------------------------------------------------- # * Pre-Termination Processing #-------------------------------------------------------------------------- def pre_terminate end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super() @my_window.dispose() endend#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------# This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # * For Adding Original Commands #-------------------------------------------------------------------------- alias dp3_custscene_windowmenucommand_addorigcomnd_023fj add_original_commands #-------------------------------------------------------------------------- def add_original_commands dp3_custscene_windowmenucommand_addorigcomnd_023fj() add_command("Custom Scene", :custscene, true) end end #==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------# This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- alias dp3_custscene_scenemenu_createcmmdwindow_023fj create_command_window #-------------------------------------------------------------------------- def create_command_window dp3_custscene_scenemenu_createcmmdwindow_023fj() @command_window.set_handler🙂custscene, method🙂command_customscene)) end SceneManager.call(MyCustomScene) def command_customscene end end
This is the tutorial I am following...
first of all never initialize a instance into a start method 

do this instead 

Code:
def startsetup_windowenddef setup_window@window_help = Window_Help.newend
first of all never initialize a instance into a start method 

do this instead 

def startsetup_windowenddef setup_window@window_help = Window_Help.newend
I have changed that, do you know why the black screen doesn't appear?  :blink:

It just kinda freezes the game....
you're last method in Scene_Menu is incorrect

def command_customscene SceneManager.call(MyCustomScene)endyou had the call placed above the method instead of inside it. so when that method was called it does nothing and that's while it would freeze.
you're last method in Scene_Menu is incorrect

def command_customscene SceneManager.call(MyCustomScene)endyou had the call placed above the method instead of inside it. so when that method was called it does nothing and that's while it would freeze.
Thank you very much my dear sir! 😀
Having another issue.

My scene won't terminate/return to the menu when "N" is pressed.

This is the new script.

Spoiler
Code:
class MyCustomScene < Scene_Base    #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  def start   @my_window = Window_Help.new   @my_window.activate endend  #--------------------------------------------------------------------------  # * Post-Start Processing  #--------------------------------------------------------------------------  def post_start    super()  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super()    return_scene() if Input.trigger?(:N)  end  #--------------------------------------------------------------------------  # * Pre-Termination Processing  #--------------------------------------------------------------------------  def pre_terminate  end  #--------------------------------------------------------------------------  # * Termination Processing  #--------------------------------------------------------------------------  def terminate    super()    @my_window.dispose()  end#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command  #--------------------------------------------------------------------------  # * For Adding Original Commands  #--------------------------------------------------------------------------  alias dp3_custscene_windowmenucommand_addorigcomnd_023fj add_original_commands  #--------------------------------------------------------------------------  def add_original_commands        dp3_custscene_windowmenucommand_addorigcomnd_023fj()        add_command("Custom Scene", :custscene, true)      end    end    #==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------   alias dp3_custscene_scenemenu_createcmmdwindow_023fj create_command_window  #--------------------------------------------------------------------------  def create_command_window           dp3_custscene_scenemenu_createcmmdwindow_023fj()    @command_window.set_handler(:custscene, method(:command_customscene))    end     def command_customscene     SceneManager.call(MyCustomScene)   end end
Are you using a full keyboard input? If not then it's because :N isn't a defined input. You can find the defined keys by pushing Help on the buttom of the script editor, click on Index and scroll down the Input, at the very bottom you'll see the default constants ( Those aren't the keys though, like A is shift I think? and B is back and C is enter, ect. )
Window_Help is not a selectable window, so it is kinda pointless to "activate" it.

The methods 'post_start', 'pre_terminate' and 'terminate' are not needed at all.

Any window created in a scene will get automatically disposed upon exiting the scene, unless the window is put into an array or hash, which is not the case here.

But the biggest issue is this:

class MyCustomScene < Scene_Base #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start @my_window = Window_Help.new @my_window.activate endend #<-- this line!This is your whole scene. You ended the class after defining the 'start' method.Anything after it is not inside your scene, and messes your whole script up.

You must properly format your scripts, so you can see easily where your classes/definitions start/end or else you risk these errors happening all the time.

Ohh, and you also left out the 'super' call in the start method. That is needed there.
Ran into another error. (I fixed the problems stated by Sixth and others.)

Error: Line 50 "class definition in method body"

Spoiler
Code:
class MyCustomScene < Scene_Base    #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  def start    super()   @my_window = Window_Help.new()   @my_array = []   @my_array[0] = "Text1"   @my_array[1] = "Text2"   @my_array[2] = "Text3"    end  #--------------------------------------------------------------------------  # * Post-Start Processing  #--------------------------------------------------------------------------  def post_start    super()  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super()    return_scene() if Input.trigger?(:A)        if Input.trigger?(:C)      @my_window.set_text(@my_array[rand (3)])  end  #--------------------------------------------------------------------------  # * Pre-Termination Processing  #--------------------------------------------------------------------------  def pre_terminate  end  #--------------------------------------------------------------------------  # * Termination Processing  #--------------------------------------------------------------------------  def terminate    super()    @my_window.dispose()  end#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#==============================================================================class Window_MenuCommand < Window_Command    #--------------------------------------------------------------------------  # * For Adding Original Commands  #--------------------------------------------------------------------------  alias dp3_custscene_windowmenucommand_addorigcommand_023fj add_original_commands  #--------------------------------------------------------------------------  def add_original_commands        dp3_custscene_windowmenucommand_addorigcomnd_023fj()        add_command("Custom Scene", :custscene, true)      end    end  #==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase  #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------   alias dp3_custscene_scenemenu_createcommandwindow_023fj create_command_window  #--------------------------------------------------------------------------  def create_command_window         dp3_custscene_scenemenu_createcmmdwindow_023fj()    @command_window.set_handler(:custscene, method(:command_customscene))    end     def command_customscene     SceneManager.call(MyCustomScene)   end endend
You didn't end MyCustomScene, and the if statement inside your update method, and you threw an extra end at the end of the script. Here's the fixed version (I fixed the tabbing because it was bugging me lol)

Spoiler
Code:
class MyCustomScene < Scene_Base  #--------------------------------------------------------------------------  # * Start Processing  #--------------------------------------------------------------------------  def start    super()    @my_window = Window_Help.new()    @my_array = []    @my_array[0] = "Text1"    @my_array[1] = "Text2"    @my_array[2] = "Text3"  end  #--------------------------------------------------------------------------  # * Post-Start Processing  #--------------------------------------------------------------------------  def post_start    super()  end  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    super()    return_scene() if Input.trigger?(:A)        if Input.trigger?(:C)      @my_window.set_text(@my_array[rand (3)])    end  end  #--------------------------------------------------------------------------  # * Pre-Termination Processing  #--------------------------------------------------------------------------  def pre_terminate  end  #--------------------------------------------------------------------------  # * Termination Processing  #--------------------------------------------------------------------------  def terminate    super()    @my_window.dispose()  endend#==============================================================================# ** Window_MenuCommand#------------------------------------------------------------------------------#  This command window appears on the menu screen.#============================================================================== class Window_MenuCommand < Window_Command    #--------------------------------------------------------------------------  # * For Adding Original Commands  #--------------------------------------------------------------------------  alias dp3_custscene_windowmenucommand_addorigcommand_023fj add_original_commands  #--------------------------------------------------------------------------  def add_original_commands    dp3_custscene_windowmenucommand_addorigcomnd_023fj()    add_command("Custom Scene", :custscene, true)  endend#==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs the menu screen processing.#============================================================================== class Scene_Menu < Scene_MenuBase    #--------------------------------------------------------------------------  # * Create Command Window  #--------------------------------------------------------------------------   alias dp3_custscene_scenemenu_createcommandwindow_023fj create_command_window  #--------------------------------------------------------------------------  def create_command_window       dp3_custscene_scenemenu_createcmmdwindow_023fj()    @command_window.set_handler(:custscene, method(:command_customscene))  end    def command_customscene    SceneManager.call(MyCustomScene)  endend 

Original thread: https://forums.rpgmakerweb.com/threads/custom_scene-script-issues.38310/