Shaking screen vertically?

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,212
First Language
Not English
Primarily Uses
RMMV
Hello... I was wondering if it's possible to shake the screen vertically. Anyone have an idea how to accomplish this?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
Through javascript, you have to manually move SceneManager._scene.y. However, I'm not sure if it gives you the desired effect.
 

Hyouryuu-Na

Sapphire Sodium
Veteran
Joined
Jun 15, 2017
Messages
947
Reaction score
2,212
First Language
Not English
Primarily Uses
RMMV
@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?
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
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.
 

dbchest

Beast Master
Veteran
Joined
Oct 1, 2013
Messages
434
Reaction score
306
First Language
English
Primarily Uses
RMMV
i did not know this. useful bit of information. thanks.
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
@dbchest If you want, I can cover SceneManager._scene more thoroughly in one of my pixi tutorials.
 

dbchest

Beast Master
Veteran
Joined
Oct 1, 2013
Messages
434
Reaction score
306
First Language
English
Primarily Uses
RMMV
@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.
 

Rukiri

I like to make Action-RPGs
Veteran
Joined
Jan 20, 2014
Messages
843
Reaction score
513
First Language
English
Primarily Uses
Other
Code:
SceneManager._scene.y += Math.floor(Math.random());
Put this in a scrip snippet inside an event :)
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,125
Reaction score
10,639
First Language
Czech
Primarily Uses
RMMV
@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 :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top