Picture that Follows Player

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
Is there a non scripted way to have a picture follow a player's movement?

I'm trying to create dark dungeons similar to the way caves worked in Dragon Quest (NES, 1985) by having a black box granting the player 1 or 2 squares of vision but covering the rest of the screen.

 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,599
Reaction score
6,552
First Language
Indonesian
Primarily Uses
RMVXA
Is there a particular reason you don't want to use script?

I was going to recommend Galv's Limited Visibility Range but you replace the default limited vision picture with your own.
 

Sketchward

Veteran
Veteran
Joined
Jul 26, 2016
Messages
111
Reaction score
8
First Language
English
Primarily Uses
RMMV
Aah just because I couldn't find one and didn't want to ask for one to be made if there as a non-scripted way to do it. Thanks very much, I'll give this a try!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Pictures by default are glued to the screen position, not on tiles. Even if the screen moves, pictures will remain on that same spot in your game window.

So if you make the map have a number of extra spaces in all directions where the player cant actually go into so that he always stays on the center of the screen even as he moves near the end of the walkable areas, then a simple show picture for your black mask will do exactly what you want.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,108
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
You should be able to set up a parallel process event that gets the player's SCREEN coordinates, then moves the picture to those coordinates. Make sure you add a Wait as the first command, so it doesn't cause the game to lag (maybe a Wait 4 frames might be okay). You can get the player's screen coordinates using Control Variables > Game Data > Character (Player's) > Screen X and Screen Y into two different variables, then you can use those variables in a Move Picture or Show Picture command.

You need to set the center as origin in the Move/Show Picture command, and obviously make sure the picture is twice the size of your game window.
 

Halno

Villager
Member
Joined
Jul 11, 2018
Messages
22
Reaction score
2
First Language
Pt/Eng
Primarily Uses
RMVXA
Hey, i've done something pretty similar when doing a torch event!

The way i went above that road block is by making the image always appear locked to the screen, and have it be a looping map. that way the light is always centered on the player, since the player is always on the center of the screen in a looping map.


This is a pretty rudimentary example of what i've done, and all you have to do is add some 6-10 tiles to the bottom and right side of your map so the looping doesn't show the other side!

This method also saves a LOT of effort, since if you try to do the same on a non-looping map, you'd have to find a way to store the player's coordinates, make a image with 200% the size of the game screen so you could accurately scroll it around, and find a way to make your image be always accurately displayed on the location you want to, while in my method its simply a case of calling a image and tinting the screen.

If this was unsatisfactory, I could also try to make a demo event to your specifications, but only after i'm done with my current project, and trust me, it uses way too much math for my liking.

Hope I could be of help!
 

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

Latest Threads

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,454
Members
137,821
Latest member
Capterson
Top