Hyouryuu-Na

Very very lazy
Veteran
Joined
Jun 15, 2017
Messages
1,101
Reaction score
2,857
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,147
Reaction score
10,708
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

Very very lazy
Veteran
Joined
Jun 15, 2017
Messages
1,101
Reaction score
2,857
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,147
Reaction score
10,708
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
308
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,147
Reaction score
10,708
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
308
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
514
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,147
Reaction score
10,708
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
 

Latest Threads

Latest Posts

Latest Profile Posts

Lately I have been taking a break from game and resource making so I won't get burnt out. But I am also interested in the Game Jams this site periodically holds. It'd be great if I knew when the next one, if any, is planned.
elexy 1.2.pngSome bust art to be cropped and cleaned. May use in special decision moments. Depending on how it looks in game I may cut it.
Tiamat-86 wrote on ATT_Turan's profile.
apparently since its turning 15 years old this year the ps3 is considered "retro". now how old do you feel?
guess that means im an "antique" gamer since ill still play games as old as i am.
"you know your getting old when your childhood console changes ethnicity" lol it turned yellow
I'm making Toilet in Wonderland 2. and tell vinny about it lol

Forum statistics

Threads
115,343
Messages
1,089,170
Members
150,020
Latest member
eungi
Top