• 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.

Time Delay error

AmethystRain

pixie-powered judgment!
253
Posts
12
Years
    • Seen Nov 28, 2022
    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:

    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):1: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?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    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.
     

    AmethystRain

    pixie-powered judgment!
    253
    Posts
    12
    Years
    • Seen Nov 28, 2022
    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.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    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 ([COLOR=Green]Action[/COLOR]):
    <blank>
    
    
    
    Page 2 ([COLOR=Green]Autorun[/COLOR]):
    Depends on Global Switch with name [COLOR=Red]s:expired?(25200)&&tsOff?("A")[/COLOR]
    
    @>Script: setTempSwitchOn("A")
    @>Script: pbSetEventTime
    [COLOR=Blue]@>Control Variables: [0042: Teh wetha!] += 1[/COLOR]
    
    
    
    Page 3 ([COLOR=Green]Autorun[/COLOR]):
    Depends on [COLOR=Red]Variable 0042 ==0[/COLOR]
    
    [COLOR=Blue]@>Control Variables: [0042: Teh wetha!] = 1[/COLOR]
    @>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.
     

    AmethystRain

    pixie-powered judgment!
    253
    Posts
    12
    Years
    • Seen Nov 28, 2022
    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~
     
    Back
    Top