Moving picture with character

Adorian

Tantalus' Thief
Member
Joined
Jul 30, 2014
Messages
9
Reaction score
1
First Language
French
Primarily Uses
Hello everybody,

I was wondering if it was possible to move a picture that you've inserted with "show picture" beforehand along with the character. The aim is to create some sort of parallax foreground to give more depth to the game.

For example, you're in a forest and you have tree branches in the foreground that move in the opposite direction of your character. Let's say, you're walking from right to left. You walk on a event that makes a branch appear in the bottom left corner. Then you continue moving in the same direction and the branch goes from left to right until it disappears.

You can have the same example in a cavern with stalactite or stalagmite.

Let me know if it's not clear.

Do you know guys how I could do that ? I guess a script is needed but I've not found any on the subject.

Thank you :)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,116
Reaction score
11,466
First Language
English
Primarily Uses
RMVXA
Do you want to have the branches showing over your character?  I assume you do.  So, you have a picture which is the exact size of your map.  Using the 'show picture' command, position it Upper left.  Using something like Modern Algebra's Fix Picture to Map will 'anchor' it in place so that as you move you "meet" the items in the picture.  If you use his script you simply have to put [FIXED] at the beginning of the file's name.  You can specify the 'z' value (which enables you to show the picture above your characters) as per the script's instructions.

You can get the script here: http://rmrk.net/index.php?topic=44837.0  There are other scripts which do the same sort of thing, but this is the one I know about because I use it.
 

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
122
First Language
English
ksjp17, aren't you just describing normal parallaxing? OP wants, uh, "real" parallaxing where the foreground will slowly move over the map background, not stay locked to it. It sounds like the OP wants something pretty specific, where the branches would only appear at the top/bottom of the screen when the player is walking through the forest (so you can't just cover the entire map with them, like clouds).

Off the top of my head, you could maybe do something with "move picture" while checking the X/Y position of the player, and adjusting variables, but that seems pretty messy.
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,116
Reaction score
11,466
First Language
English
Primarily Uses
RMVXA
@Tommy Gun

the op asked about how to do this using the 'show picture' command,  Sure, you create your image as if you were doing a parallax map, but if you want it to have the branches appearing above the actors, then you cannot just insert it as if it were a parallax.

Next, if the picture moves with the actors, as you suggest, then it will not meet the op's criterion of moving in the opposite direction of your character

Neither is it necessary to cover everything as if it were clouds, as you stated.  The picture could easily just be the branches - as long as the whole image, including the blank areas is the size of the map, it works as s/he requested.
 
Last edited by a moderator:

Adorian

Tantalus' Thief
Member
Joined
Jul 30, 2014
Messages
9
Reaction score
1
First Language
French
Primarily Uses
Well, I tried it with the script you gave me ksjp17, I didn't think about it that way but that works out pretty well, thank you. The only problem is that, as it is a foreground, it should move at a higher speed than the tilemap :s.

 

At first, I was trying to move the picture as Tommy Gun said but I didn't know how to check character's position so it wasn't optimal, and as you said pretty messy.

 

Maybe I can use the "Fix Picture to Map" script and create a parallel process event using "Move Picture" when the player moves but how can I check when the character moves and in which direction ?

With the character coordinates I could do x2-x1 and y2-y1 when the character is moving to tile 1 to tile 2 and see where he is moving, is that a good way to do it ?

Also how can I get the character coordinates ?
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
5,407
Reaction score
4,807
First Language
English
Primarily Uses
RMVXA
If you're willing to go through the effort of converting the graphics into tilesets (or just want to use tile graphics in the first place for your branches, etc.), then this Overlay script from Hime should be right up your alley.  You can use the scroll rate option to make the foreground scroll faster than anything else as the player moves.
 
Last edited by a moderator:

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
122
First Language
English
@Tommy Gun

the op asked about how to do this using the 'show picture' command,  Sure, you create your image as if you were doing a parallax map, but if you want it to have the branches appearing above the actors, then you cannot just insert it as if it were a parallax.
Sorry, by "normal parallaxing" I was referring to parallax locking. But the OP does NOT want the branches locked to the map, which is what you seemed to be suggesting. That's what I meant.

Next, if the picture moves with the actors, as you suggest, then it will not meet the op's criterion of moving in the opposite direction of your character
That's not what I said/meant. I said you could use the players position to set variables and "move picture" -- in the opposite direction. I didn't specifically say that because that's implied based on what the OP was asking for.

Neither is it necessary to cover everything as if it were clouds, as you stated.  The picture could easily just be the branches - as long as the whole image, including the blank areas is the size of the map, it works as s/he requested.
Again, that's not what the OP is asking for. Since the foreground has to move *across* the map at a different speed, and not be locked to it, the branches could move down over the play area if the player moves up. Something like clouds would be much easier to do because they're round, but the branches would look weird, probably, at least the way I'm imagining them (you could see the part where the branch cuts off).

This is getting pretty hard to describe in text, so there's probably just going to be more confusion. Here's a gif of "real" parallaxing:

 

Adorian

Tantalus' Thief
Member
Joined
Jul 30, 2014
Messages
9
Reaction score
1
First Language
French
Primarily Uses
The script link you gave me is awesome Wavelength ! That's exactly what I wanted as Tommy Gun described very well with his GIF.

The only problem, as you mentionned, is that you have to import your picture in tilesets folder and then use a custom tileset but that's not that long and that's worth the result ;) .

I really appreciate the help you gave me guys, thanks a lot.

EDIT : Here is what I came up with the Overlay Map script from Hime for those who are interested. I plan on modifying a lot of the graphics so that's why it's not very beautiful but that gives an insight at least.







 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

Currently without internet due to storm damage and most of our state is devastated. No idea how long I'll be unable to log onto here, but I'll answer questions as soon as I can.
This is supposed to be pso2 photon blast inspired animation
I'm sure this question's been asked before, but I can't find an answer: is there any way to run the Steam version of RPGMaker *without* being logged into Steam? It's a frustrating extra step sometimes.
Been seeing bright flashes in the sky for a while, and thought it was my eyes playing tricks on me. Nope! Lightning. Now it's raining heavily. Seeing lightning, but not hearing thunder, is weird.
Small Update for myself:
>Two Dungeon maps are done, Dungeon 3 is in progress. Dungeon 4 needs work.
>4 characters set up out of a possible 6 but those come later.
>Hub area needs work.
>Game completion..., 20-25% maybe?

Forum statistics

Threads
100,713
Messages
978,665
Members
132,328
Latest member
mdealba92
Top