Moving picture with character

● ARCHIVED · READ-ONLY
Started by Adorian 8 posts View original ↗
  1. 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 :)
  2. 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.
  3. 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.
  4. @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.
  5. 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 ?
  6. 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.
  7. ksjp17 said:
    @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.

    ksjp17 said:
    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.

    ksjp17 said:
    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:

    Parallax-scroll-example.gif
  8. 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.