- Joined
- Feb 5, 2015
- Messages
- 95
- Reaction score
- 6
- Primarily Uses
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?
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"
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"
Last edited by a moderator:
