Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old April 1st, 2013 (7:37 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
     
    Join Date: Dec 2011
    Gender: Male
    Posts: 647
    I want to set a global variable to 1 whenever the game is loaded/new game is started. I have tried adding

    $game_variables[100]=1

    to multiple places in PokemonLoad but I keep getting syntax errors and such. Is there an easy way to do this? I only want it set when the game is loaded/started, and can be changed like normal, but is always at 1 when the game starts. This doesn't have to do with events. I am making a script that needs to have a variable set to 1 when the game is loaded
    __________________
    Reply With Quote

    Relevant Advertising!

      #2    
    Old April 2nd, 2013 (12:45 AM).
    Littleroot's Avatar
    Littleroot Littleroot is offline
    ...
       
      Join Date: Jul 2012
      Gender: Male
      Nature: Adamant
      Posts: 32
      I hope that i understood you right.
      if you want to do this when the game loads, go to the script "PokemonLoad" and add it behind line 427, for example, change this:
      Quote:
      $game_variables = Marshal.load(f)
      to this:
      Quote:
      $game_variables = Marshal.load(f)
      $game_variables[X] = Y;
      while X is the variable id and Y is the number.

      for a new game, go to the map "Intro" and just add this in event "Intro" somewhere.

      sry for my english, and good luck in your game
      Reply With Quote
        #3    
      Old April 2nd, 2013 (9:51 AM).
      Rayd12smitty's Avatar
      Rayd12smitty Rayd12smitty is offline
      Shadow Maker
         
        Join Date: Dec 2011
        Gender: Male
        Posts: 647
        Thank you! I figured out for new game to just use Intro but I couldn't get Load. Thanks!!!
        __________________
        Reply With Quote
        Reply
        Quick Reply

        Sponsored Links
        Thread Tools

        Posting Rules
        You may not post new threads
        You may not post replies
        You may not post attachments
        You may not edit your posts

        BB code is On
        Smilies are On
        [IMG] code is On
        HTML code is Off

        Forum Jump


        All times are GMT -8. The time now is 9:56 AM.