Joined
Jun 18, 2021
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello! I'm attempting to zoom in on the map, but here's what I'm ultimately trying to do: the room the player is currently in is a very small bedroom, but when running the game, there's to much blank space shown to the player and it's too far out. I'd like to zoom in to make the room closer to the screen. However, I'd also like the camera to lock in place so it doesn't follow the player around and it looks like the tiny room is moving around. So I've been avoiding using $gamePlayer.screenX(). Here's what I have:
eventWindow.JPG

What I tried to do was have it zoom in on wherever the event was placed, but that's not working. It seems to go into the upper left corner or move in that direction on a bigger map no matter what I input. I've also tried just using plain number in place of the x and y but get the same result. What I'm assuming is that I'm completely misunderstanding how this zoom actually works. Is there a different way I should be doing this or an easier way to go about zooming in and locking the camera?
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
6,079
Reaction score
5,741
First Language
English
Primarily Uses
RMVXA
I have moved this thread to JavaScript Plugin Requests as I believe there are camera/zoom plugins that will allow you to do this more easily, but I forget their names. Maybe someone can link you to them.

If you come up empty, you might be able to get help writing the correct syntax/logic in Learning JavaScript. Just report this post and ask for a move over there if you need it.
 

coucassi

Veteran
Veteran
Joined
Sep 23, 2019
Messages
127
Reaction score
185
First Language
German
Primarily Uses
RMMV
Here you go :) It's SRD Camera Core, which allows you to zoom in and out as well as lockong the camera on a certain tile and some other functions.
 

ct_bolt

Creator
Veteran
Joined
May 3, 2012
Messages
969
Reaction score
559
First Language
Javascript
Primarily Uses
RMMZ
I believe I had trouble in the past with other Zoom plugins and that's partly why I wrote one... honestly haven't revisited it in a while though...

well anyways if no others work for exactly what you need here is this also...
 

Latest Threads

Latest Profile Posts

Feel free to check out our "Touch the Stars" gamejam submission, "Starlight, Starbright!"
just finished playing one shot. im kinda disappointed with return the sun ending ngl. i was hoping there would be some after credits scene that would play with my emotions
So apparently the surprise Google Search page browser game saves your progress when you close the browser.

This really makes me miss the golden age of Flash gaming.
ohh man im ending oneshot now (im doing the last stepping puzzle rn) and the music is so...sad...like...ive been thinking recently about how fast moments pass and...my anxious thoughts combined with that music and nostalgia...like...im comfortably sad...and want to cry internally
We're playing one of the Touch the Stars game jam entries, come join us!

Forum statistics

Threads
113,557
Messages
1,075,814
Members
147,552
Latest member
Pliskin
Top