- 189
- Posts
- 15
- Years
- Seen Jun 12, 2024
Hey all,
I've been working on an eventing system by which that little glowy arrow indicating a building's exit appears. To do so, I've made the exit event two pages, both Parallel Processed. The first page doesn't do much, it just checks the player's location and if it's the tile next to the exit then SelfSwitch A is turned on.
The second page is a tiny bit more complex. It runs a check for if the player is trying to move in the direction of the exit from the aforementioned location, and if true, enacts a series of commands to warp the player appropriately. Naturally this page has the glowing arrow as its sprite. Obviously, both pages loop, so I put a Wait: 1 frame at the end to throttle them.
Problem is, when I'm using this event, it still performs the checks and warps players even if the Pause Menu is open. I had a look in the scripts and found something in PokemonMessages and PokemonField called pbGlobal(Un)Lock, which appears to stop (and restart) the execution of events.
I hence tried to put that in PokemonPauseMenu, but whenever I do it chucks an error upon calling the menu. I assume my lack of coding experience is the source of the problem, so if someone could guide me to the correct way of implementing such a feature, I would be most thankful.
Cheers, Jim.
I've been working on an eventing system by which that little glowy arrow indicating a building's exit appears. To do so, I've made the exit event two pages, both Parallel Processed. The first page doesn't do much, it just checks the player's location and if it's the tile next to the exit then SelfSwitch A is turned on.
The second page is a tiny bit more complex. It runs a check for if the player is trying to move in the direction of the exit from the aforementioned location, and if true, enacts a series of commands to warp the player appropriately. Naturally this page has the glowing arrow as its sprite. Obviously, both pages loop, so I put a Wait: 1 frame at the end to throttle them.
Problem is, when I'm using this event, it still performs the checks and warps players even if the Pause Menu is open. I had a look in the scripts and found something in PokemonMessages and PokemonField called pbGlobal(Un)Lock, which appears to stop (and restart) the execution of events.
I hence tried to put that in PokemonPauseMenu, but whenever I do it chucks an error upon calling the menu. I assume my lack of coding experience is the source of the problem, so if someone could guide me to the correct way of implementing such a feature, I would be most thankful.
Cheers, Jim.