MV How to make event bouncing effect

I made another thread kinda about this but then realized what I asked about wouldn't even accomplish what I want to do.

Basically, I want to set an event to bounce around an enclosed room using diagonal movements and play a sound and shake the screen every time it hits a wall. (think the classic DVD logo screensaver)



It seems like it should be easy to make, but I for the life of me can't figure it out.
Hi!

I will answer you here then. Why do you need to use an event for that? Can you not use a picture?
It is a boss enemy event. One of its attacks is to go into its shell and bouncing around the area, damaging the player on contact.
Understood. Well, with only the move route, I think I would do something like that.

When the event will start the attack:
1 - Determine what diagonal direction it will start. You can use a variable with 4 random numbers. Each one representing a diagonal direction.
2 - After it starts moving diagonally, you can check if it can move on that diagonal direction(with the script call I gave you on the other thread)
3 - If it can, you use one move route command to move into diagonally. basically check if it can move diagonally every time before a movement.
4 - If he cannot move diagonally, then you have to choose another diagonal direction. Just as an example:
If he was moving Upper Left(7) then now, it can go either lower left(1) or upper right(9)
5 - repeat the process of movement until the event finishes the attack

That is the main logic I can think of.
I am kinda confused and have resorted to the noob method (jumping the event to one of 4 specific tiles and performing 4 preset move routes, instead of an advanced method the event could do starting anywhere)

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-event-bouncing-effect.183832/