How to Get Monsters Flying Overhead in Map?

Hey, so hopefully this is a small thing and honestly I don't even mind if it can't be figured out, but I'm using an outdoor area for my first 'dungeon' in my game and I wanted to have some bats occasionally fly across the screen whilst the player was roaming around.

Unfortunately I got frustrated and deleted the actual event so I'll have to sort of break it down in text form:

The event was located on the right edge of the map.

PAGE 1:
Graphic: Blank
Priority: Above Characters
Trigger: Parallel Process
Contents:
Wait 999 frames
Control Variable: RandomBat, Random Number (1...4)
Conditional: if Variable Random Bat =1 : Control Self Switch A on
Conditional: if Variable Random Bat =2 : Control Self Switch B on
Conditional: if Variable Random Bat =3 : Control Self Switch C on
Conditional: if Variable Random Bat =4 : Control Self Switch D on

PAGE 2:
Condition: Self Switch A is On
Graphic: Red Bat
Priority: Above Characters
Trigger: Parallel Process
Contents:
Set Move Route: Transparent OFF
Set Move Route: (Repeat, Skip) Move Left
Set Move Route: Transprant ON
Set Move Route: Jump: (back to start point)
Self Switch A OFF

The other pages were identical except for requiring switch B, C, or D and having a different colour bat for the graphic.

The way the event was supposed to work was that the event would wait a while and then using variables select a bat colour at random, flip the appropriate self switch and then they'd appear, fly across the map until they could no longer move left, at which point they'd go transparent, teleport back to where they started, and then turn off their current switch so that the event would go back to 'select a random bat' stage and then just loop through, however the bats would never appear at all.

I apologize profusely for the awkward way I displayed the info. I need to learn to control my emotions when things aren't working and not delete stuff, lol. Hopefully the general idea makes sense though.

I imagine I've just not used the process properly, like assuming that turning the self switches off would force the event to run the first page again.

Honestly it was just one of those "oh this would be cool" moments that's not necessary for my game to function so if you tell me to f**k off then that's fine, lol. I just thought I'd give it a chance before writing the idea off totally.
however the bats would never appear at all.
Wait 999 frames
No wonder I guess?
No wonder I guess?
LOL, the point was so it didn't happen too often. Is 999 that ridiculous? I figured that would barely be a minute.

The first thing I did when it didn't work was reduce it to 60 frames (the default which is usually like 1-2 seconds long) and then stood near the spot the bat should spawn and start flying and waited for like a whole minute for them to do so and they didn't so I figured it wasn't the frame choice but I could be wrong?
Before you outright start to make the bat event, first you need to verify IF it's works.
What you do? set something obvious like show text. Did it trigger the second page? Did the parallel process event executed in first page?
Your move route has repeat, skip... But does it have wait for completion?
Btw. Repeat,skip doesn't work like that as far as I know, so the bat should, if Im correct, be stuck on the left side anyway.
Your move route has repeat, skip... But does it have wait for completion?
Btw. Repeat,skip doesn't work like that as far as I know, so the bat should, if Im correct, be stuck on the left side anyway.
So I actually have to count how many 'Move Left's it would take to cross the whole map and then tell it to move that many? Ugh... not worth it for just a visual. The map's too long.

Not sure about wait for completion but I always thought 'wait' caused the whole game (player movement etc) to freeze until it was done
So I actually have to count how many 'Move Left's it would take to cross the whole map and then tell it to move that many? Ugh... not worth it for just a visual. The map's too long.

Not sure about wait for completion but I always thought 'wait' caused the whole game (player movement etc) to freeze until it was done

Since your event itself is parallel, wait for completion wont freeze your game. Also make sure that the location to the left of your bat is actually walkable since events even if set to above player still checks walkability iirc. and like someone before, Im not sure if your repeat + skip would actually achieve what you want, the skip might ignore the repeat or worse the repeat might never stop.

Your transparent commands are also pretty much worthless (as long as your first page doesnt have graphics and the others have) so better remove those, it might even help in troubleshooting this.
@Engr. Adiktuzmiko Actually it's exactly the transparency that causes this. Because the commands don't have wait for completion, the code continues to execute. And the moment you set a new move route, you overwrite the previous one. Meaning the bat appears, but then disappears in the same frame. He'd need tp wait for the bat to complete the movement, but you can never finish moving when the movement is in a loop.
First off, I wouldn't use a parallel process for this. I think these should be avoided where possible because of lag issues etc. Instead use the 'Custom move' in the 'Autonomous move' section. Custom move acts as a quasi-parallel process, giving you the benefits of a pp without the drawbacks.

Here is a move route I did for something similar (man appearing, walking from left edge to top edge, disappearing as if he had gone on to the next map, a little later 'another' man appears and repeats). I'll explain the commands below.
upload_2018-7-17_9-34-28.png


Starts off zero opacity, selects image turns in the correct direction, then 'appears' with the full opacity command.
Does the move, and the opacity returns to zero so that he 'disappears'.
That "moveto" command puts the event back where it started, followed by a wait.
I have the 'Repeat' box checked, so that after the wait he reappears and repeats the whole process.
I did 'repeat, skip' so that the bat would keep moving left until it reached the edge of the map (I didn't want to have to make a ridiculouslt long move route where I had to put 'move left' like 75 times) where I thought the 'skip if cannot move' would make it move on to the 'turn invisible and bounce back to starting point' would kick in but as usual something that looks obvious to me never is I'm just dumb.

First off, I wouldn't use a parallel process for this. I think these should be avoided where possible because of lag issues etc. Instead use the 'Custom move' in the 'Autonomous move' section. Custom move acts as a quasi-parallel process, giving you the benefits of a pp without the drawbacks.

Here is a move route I did for something similar (man appearing, walking from left edge to top edge, disappearing as if he had gone on to the next map, a little later 'another' man appears and repeats). I'll explain the commands below.
View attachment 94446

Starts off zero opacity, selects image turns in the correct direction, then 'appears' with the full opacity command.
Does the move, and the opacity returns to zero so that he 'disappears'.
That "moveto" command puts the event back where it started, followed by a wait.
I have the 'Repeat' box checked, so that after the wait he reappears and repeats the whole process.
This definitely seems like what I need, though it looks like no matter what I'm going to have to count how many 'mov left's I need to get across the whole map which won't be fun.

The only thing I couldn't figure out from your example is how to make the graphic random? I have 4 different coloured bats that I want the event to choose at random before making them visible, so that each time there's a chance a different coloured bat will fly over.
variable operations: randomBat, random, 1-4

if randomBat is 1:
set movement route - change graphic
else if randomBat is 2:
set movement route - different bat graphic
élse for 3 and else for 4
also if you do the graphics chamge via move route instead of event pages, you'll save yourself some hassle, because this way you xan keep the entire event on one page.
variable operations: randomBat, random, 1-4

if randomBat is 1:
set movement route - change graphic
else if randomBat is 2:
set movement route - different bat graphic
élse for 3 and else for 4
also if you do the graphics chamge via move route instead of event pages, you'll save yourself some hassle, because this way you xan keep the entire event on one page.
Can I actually make it choose a random graphic during the autonomous movement in Kes's example though? Basically each time the bat reappears I want it to be one of 4 colours but I don't think it's possible to set that up in autonomous?

I decided to try Kes's example without bothering with any randomised graphics and it functioned except for the end where it didn't perform the repeat action. I stood in the area it's supposed to reappear and even got rid of the 'wait' part just to make sure that it wasn't just that. The weird part was that I walked all the way across the map and then back to the area and it suddenly appeared and did the movement. Tried a few more times and it seems the bat won't appear and start moving until I walk into an area of the screen where I'd be able to see it's start point, which is weird 'cause I certainly didn't set it to do anything like that.

To be honest this is becoming far too much work and stress for what was supposed to be a nice quick 5 minute job for a visual so I'm just gonna rage quit, stick a finger up at RPG maker and call it done.

Thanks for trying to help anyway guys.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-get-monsters-flying-overhead-in-map.97814/