unknown multi cmd updates from where?

this is the code


I'm trying to figure out why some of the methods are repeating even with a linear call setup


I just tried it with out the calls for post-terminate and terminate and it loops the update method so where is the repeats being built?

Spoiler
#msgbox(Graphics.methods)
class Scene_Splash < Scene_Base
  def start
                                                                p "Splash start-up"
    @@Pictures_To_Show = ["LeakyBrainstu"]
    super
    set_variables
    load_picture_index
                                                                p "start-up complete"
  end
#-----------------------------------------------------------------------
# == used to set variables for view settings
  def set_variables
#~     @background_viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
#~     @forground_viewport = Viewport.new(0,0,(Graphics.width - (Graphics.width / 4)),
#~                                            (Graphics.height - (Graphics.height / 4)))
#~     @background_viewport.z = 0
#~     @forground_viewport.z = 100


                                                              p "variables set"
  end
  def load_picture_index
    @p_index = picture_list
                                                              p "@p_index Loaded"
  end
  def picture_list
     return @@Pictures_To_Show
   end
  def post_start
                                                              p "beginning post-start"
    super
    @@id = 0
    create_sprites
    update
                                                              p "post-start complete"
  end
  def create_sprites
    @sprite = Sprite.new
    @sprite.bitmap = Cache.picture(@p_index[@@id])
    @sprite.opacity = 0
  end
  def update   
    super
    @updated = nil
    if @updated
      @updated = true
    else
      p "updating Scene...";
    end
    if @@id >= @@Pictures_To_Show.length
      then pre_terminate
    else if @@id < @@Pictures_To_Show.length
      then @@id += 1
    Graphics.wait(15)   
    Graphics.fadeout(1)  
    @sprite.opacity = 255
    Graphics.fadein(30)   
    Graphics.wait(130)  
    Graphics.fadeout(30)


      
    end
  end
  def pre_terminate
    super
                                                              p "beginning pre-terminate"
                                                              p "pre-terminate complete"
    terminate
  end
  def terminate
    super
                                                              p "beginning terminate"
    SceneManager.goto(Scene_Title)
                                                              p "terminate complete"
  end
end end


and this is the cmd response



 



"Splash start-up"


"variables set"


"@p_index Loaded"


"start-up complete"


"beginning post-start"


"updating Scene..."


"post-start complete"


"updating Scene..."


"beginning pre-terminate"
 "pre-terminate complete"


"beginning terminate"


"terminate complete"


"beginning pre-terminate"
 "pre-terminate complete"


"beginning terminate"


"terminate complete"


"beginning terminate"


"terminate complete"
I've moved this thread to Script Support. Please be sure to post your threads in the correct forum next time. Thank you.



This is about RGSS3/Ace
Take a look at the SceneManager class and the Scene_Base class. Between the two of them whenever you change the scene, they automatically call pre-terminate and terminate for you. So you call pre-terminate which calls terminate (those are the first two print statements or "cmd responses" as you called them). Then SceneManager/Scene_Base calls your pre-terminate which calls terminate (those are the third and fourth print statements). Finally, SceneManager/Scene_Base calls your terminate (that's the last print statement).


To fix this, move "SceneManager.goto(Scene_Title)" from your terminate function and place it in your update function where "pre_terminate" is right now.

Original thread: https://forums.rpgmakerweb.com/threads/unknown-multi-cmd-updates-from-where.62239/