Hello... I was wondering if it's possible to shake the screen vertically. Anyone have an idea how to accomplish this?
Shaking screen vertically?
RPG Maker MV SupportThrough javascript, you have to manually move SceneManager._scene.y. However, I'm not sure if it gives you the desired effect.
@Poryg I don't understand how to do it *sigh* I have no knowledge about programming. If you don't mind, can you tell me more elaborately?
Event, 3rd page, script, type in SceneManager._scene.y += a small number to move the scene down.
To move it back up, replace + with -
And what you will be doing is moving the scene up and down repeatedly, separated by wait commands.
To move it back up, replace + with -
And what you will be doing is moving the scene up and down repeatedly, separated by wait commands.
@Poryg Thanks! I understand now.
i did not know this. useful bit of information. thanks.
@dbchest If you want, I can cover SceneManager._scene more thoroughly in one of my pixi tutorials.
@Poryg
i am sure a lot of people, including myself, would find that information helpful! it made sense as a scene_base extends the core class stage, which is the base class for displaying and arranging objects to appear on the screen. it was a nice little tidbit to add to the well of knowledge.
i am sure a lot of people, including myself, would find that information helpful! it made sense as a scene_base extends the core class stage, which is the base class for displaying and arranging objects to appear on the screen. it was a nice little tidbit to add to the well of knowledge.
Code:
SceneManager._scene.y += Math.floor(Math.random());
@Rukiri That would not work.
Math.random() is a number between 0 and 1. Math.floor of it would always return 0.
The corrected line would be
SceneManager._scene.y += Math.randInt (1, x). No need to floor that, since the function itself has a Math.ceil inside it, so it is always an integer.
However, using this has two issues.
1. The random number generator can screw you over, creating weird shaking animations sometimes
2. It's kind of difficult to make it animate smoothly when you randomize moving from side to side
3. You also need to subtract to return the screen 😀
Math.random() is a number between 0 and 1. Math.floor of it would always return 0.
The corrected line would be
SceneManager._scene.y += Math.randInt (1, x). No need to floor that, since the function itself has a Math.ceil inside it, so it is always an integer.
However, using this has two issues.
1. The random number generator can screw you over, creating weird shaking animations sometimes
2. It's kind of difficult to make it animate smoothly when you randomize moving from side to side
3. You also need to subtract to return the screen 😀
Original thread: https://forums.rpgmakerweb.com/threads/shaking-screen-vertically.84954/