The PokéCommunity Forums Fan Games Game Development Pokémon Essentials
Time Delay error

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 September 5th, 2012 (9:06 AM).
AmethystRain's Avatar
AmethystRain AmethystRain is offline
pixie-powered judgment!
     
    Join Date: Apr 2012
    Gender: Female
    Posts: 243
    Oh look it's ame with more problems :c

    So last week I created a time-delay event according to the instructions here. The only difference would be that I made the first/third pages parallel because it's a control event rather than something that the player interacts with. So I set it for a week, blahblahblah.
    This week, this happens every time I step onto the map hosting that event:

    Quote:
    Exception: RuntimeError
    Message: Script error within map 37 (Lower Peridot Ward):
    Exception: NoMethodError
    Message: Section082:2065:in `setTempSwitchOn'undefined method `setTempSwitchOn' for nil:NilClass
    ***Full script:
    setTempSwitchOn("A")
    Interpreter:243:in `pbExecuteScript'
    (eval)in `pbExecuteScript'
    Interpreter:1599:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:1599:in `command_355'
    Interpreter:494:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Game_Event_:262:in `update'
    Interpreter:281:in `pbExecuteScript'
    Interpreter:1599:in `command_355'
    Interpreter:494:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Game_Event_:262:in `update'
    Game_Map_:336:in `update'
    Game_Map_:334:in `each'
    Game_Map_:334:in `update'
    I copied the the code aside from the actual content of the event exactly from the Wiki... could it be because it's parallel, or is the information of that page outdateed, or... am I just failing?
    __________________
    i'm a lover before a fighter, but a killer before a kisser
    also i made reborn or something
    Reply With Quote

    Relevant Advertising!

      #2    
    Old September 5th, 2012 (12:05 PM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,173
      Why are you changing something that already works? You don't need parallel processes.

      Every time you enter a map, the event in question will run page 3 once (assuming its Self Switch A is on), and then go to either page 1 or 2 depending on whether the time has elapsed. That is, it only checks the elapsed time once while you're on that map, at the start of it. That shouldn't be a problem, though.

      It would help if you told us what you were trying to do.
      __________________
      Go to the Pokémon Essentials Wiki

      | Downloads | Tutorials | Fangames |
      | All Animations Project |

      Follow me on Twitter: @maruno42


      Reply With Quote
        #3    
      Old September 5th, 2012 (3:56 PM).
      AmethystRain's Avatar
      AmethystRain AmethystRain is offline
      pixie-powered judgment!
         
        Join Date: Apr 2012
        Gender: Female
        Posts: 243
        So even with an Action Trigger, it runs when the map is entered? That's not how events usually work in RM, so I'm a little confused.

        Ame hurt herself in her confusion!

        Okay, so one quick test later, I guess having that third page on Parallel IS causing the crash. But when I set it to action button, it doesn't trigger by itself. I have to go and 'talk' to the event, which no actual player can do.

        The basic goal here is to create an event that, once a week, randomizes the overworld weather patterns for that week. Essentially all it does is define a set of variables. The weather itself is set by a common event called by other things (such as teleport events when exiting interiors). So the function of the delay event is pretty straight forward. I had to set it in the map rather than the ideal common event though, so I just chose a location that players should pass through often.
        __________________
        i'm a lover before a fighter, but a killer before a kisser
        also i made reborn or something
        Reply With Quote
          #4    
        Old September 5th, 2012 (4:42 PM).
        Maruno's Avatar
        Maruno Maruno is offline
        Lead Dev of Pokémon Essentials
           
          Join Date: Jan 2008
          Location: England
          Posts: 5,173
          Your event's page 3 should be set to Autorun, as the wiki states. The two commands that are in it make sure that it only runs once, not repeatedly.

          If all you want is to manipulate some switches and variables, then add those as event commands into page 3.

          Actually, try something like this:

          Code:
          Page 1 (Action):
          <blank>
          
          
          
          Page 2 (Autorun):
          Depends on Global Switch with name s:expired?(25200)&&tsOff?("A")
          
          @>Script: setTempSwitchOn("A")
          @>Script: pbSetEventTime
          @>Control Variables: [0042: Teh wetha!] += 1
          
          
          
          Page 3 (Autorun):
          Depends on Variable 0042 ==0
          
          @>Control Variables: [0042: Teh wetha!] = 1
          @>Script: pbSetEventTime
          It's a bit different. Basically, page 3 initialises the weather and never matters again. Page 2 happens and progresses the weather if the time has elapsed, and if not, page 1 happens (i.e. nothing).

          Of course, you'll have your own weather manipulation ideas. The above just shows where you'd put them. Make sure never to have a situation where page 3 would activate again.
          __________________
          Go to the Pokémon Essentials Wiki

          | Downloads | Tutorials | Fangames |
          | All Animations Project |

          Follow me on Twitter: @maruno42


          Reply With Quote
            #5    
          Old September 5th, 2012 (9:03 PM).
          AmethystRain's Avatar
          AmethystRain AmethystRain is offline
          pixie-powered judgment!
             
            Join Date: Apr 2012
            Gender: Female
            Posts: 243
            Oh goodness how did I miss that Autorun comment.
            Actually, I do know how. ._. When I finished the event I double checked against the screenshots of the event that are posted on the wiki page. The page 3 screenshot has it set to Action Button. Perhaps that should be fixed. ><
            Still, should've read, derp.

            Thanks for the tip about rearranging it though. I'll be trying that in the morning~
            __________________
            i'm a lover before a fighter, but a killer before a kisser
            also i made reborn or something
            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 11:58 PM.