• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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
12
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?
     
    59
    Posts
    8
    Years
    • Seen Aug 9, 2020
    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'.
     
    1,224
    Posts
    10
    Years
  • 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.
     
    824
    Posts
    8
    Years
  • 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.
     
    67
    Posts
    12
    Years
  • 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