RPG Maker Forums

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?

#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"

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top