• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

various load screens based on variables

  • 67
    Posts
    13
    Years
    Hi, is it possible (bet it sure is) to have several load screens (loadbg in PScreen_Load) depending on a variable you can set in the game.
    Like:
    If VARIABLE[40] = 5
    addBackgroundOrColoredPlane(@sprites,"background","loadbg",
    If VARIABLE[40] = 10
    addBackgroundOrColoredPlane(@sprites,"background","loadbg2",
    etc.

    I am not a scripter, and I have tried playing around with it, but without much luck :-(
    any ideas?
     
    if $game_variables[x] = z
    -background script goes here-
    elsif $game_variables[x] = y
    -background script goes here-
    end

    You are on the good track! You can alternatively use $game_switches[x], just remember to use 'else' (for example, if no switch is on, to do the default bg) or 'elsif' (+ another condition) and to finish it with end. Every 'if' should finish with 'end'.
     
    It's a little bit more complicated than that actually, because at the load screen game variables haven't been loaded yet, it only loaded some basic player info. You'd have to change that first.
     
    You'd probably want to make it a piece of $PokemonSystem rather than a part of $game_variables. Since the former is loaded even before you enter the title screen (as is evidenced by the resizing of the screen) and the latter is loaded only when you open the game file.
     
    I was indeed trying the first option, using a variable, but I keep getting an undefined method error before showing any loading screen... So what are the options of using a $PokemonSystem?
     
    Back
    Top