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.

problem with intro script.

hi, i have this intro script for my game:
Code:
#==============================================================================
# â–  Credits Script
#------------------------------------------------------------------------------
# By Team Genius for bLiTzZ
# It's the same as the logo script, but it just has more logo's
#==============================================================================
# How to Use 
# 1:Put the logo pictures in the Titles map 
# 2:Go to line 20 and fill in the name of the picture between the " " 
# 3:Do the same for the second logo but on line 54 
# 4:If you want to change the song played change what's between ""  on line 18
# 5:To skip the logo's press ESC or ENTER
class Credits
#--------------------------------------------------------------------------
# initialize
#--------------------------------------------------------------------------
  def initialize 
    @var = 0
  #here for audio
    Audio.bgm_play ("Audio/BGM/LODINTROshort", 85, 125)
  @sprite = Sprite.new
  #here for the first logo
  @sprite.bitmap = RPG::Cache.title("Back")
    $logo = true
  end
#--------------------------------------------------------------------------
# main
#--------------------------------------------------------------------------
  def main 
   Graphics.transition
    # loop
    loop do
      # update
      Graphics.update
      # input
      Input.update
      #update
      update
     @var = @var.to_i + 1 
     #break
  if $scene != self
    break
   end
    end
Graphics.freeze
# dispose
end
#--------------------------------------------------------------------------
# update
#--------------------------------------------------------------------------
def update 
  if Input.trigger?(Input::B) or Input.trigger?(Input::C)
    $logo = false 
    $scene = Scene_Title.new
  elsif @var == 1 
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title("Copyrights_2") 
    elsif @var == 291 
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title("Copyrights-start")
  elsif @var == 581 
    @sprite = Sprite.new  
    @sprite.bitmap = RPG::Cache.title("Copyrights_3")
  elsif @var == 871 
    @sprite = Sprite.new  
    @sprite.bitmap = RPG::Cache.title("back")
  elsif @var == 872
    $logo = false 
    $scene = Scene_Title.new
    end
    end
end

this is one of those splashscreens.
http://img54.imageshack.us/img54/5130/rmxpni5.jpg[/IMG]

everything works fine, but the problem is that you can see this screen behind every window in the game (like shops, mini games etc.) (that screen or another, its always the splashscreen from the moment you hit enter to go to the title screen.)

this is an example:

http://img482.imageshack.us/img482/1871/rmxp2wo0.jpg[/IMG]

can this be fixed so you don't see that background behind the windows anymore? because it's not "clean".

ty ^_^
 
theres a code in the Scene_Title (i think) that disposes of the screens to make way for the map. It should be the cause of your problem. just have it dispose of the splash screens and it should be fixed.

hope that helps
 
i see the problem in the code. Theres no dispose command. When the splash screen is done loading it still keeps the last pic on the screen

heres what you do:

do you see in the code where this is?:

Code:
#dispose

ok this is where you put the dispose command. It essentially clears the screen of whatever you tell it to.

so you would do something like this:
Code:
@sprite.dispose
 

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