Moving picture with character

Discussion in 'RPG Maker VX Ace' started by Adorian, Aug 12, 2014.

  1. Adorian

    Adorian Tantalus' Thief Member

    Messages:
    9
    Likes Received:
    1
    Location:
    France
    First Language:
    French
    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 :)
     
    #1
  2. Kes

    Kes Global Moderators Global Mod

    Messages:
    19,430
    Likes Received:
    9,953
    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.
     
    #2
  3. Tommy Gun

    Tommy Gun ♩ ♪ ♫ ♬ Veteran

    Messages:
    385
    Likes Received:
    120
    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: Aug 12, 2014
    #3
    Pink Peach likes this.
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    19,430
    Likes Received:
    9,953
    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: Aug 12, 2014
    #4
  5. Adorian

    Adorian Tantalus' Thief Member

    Messages:
    9
    Likes Received:
    1
    Location:
    France
    First Language:
    French
    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 ?
     
    #5
  6. Wavelength

    Wavelength Pre-Merge Boot Veteran

    Messages:
    3,729
    Likes Received:
    3,029
    Location:
    Florida, USA
    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: Aug 12, 2014
    #6
  7. Tommy Gun

    Tommy Gun ♩ ♪ ♫ ♬ Veteran

    Messages:
    385
    Likes Received:
    120
    First Language:
    English
    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.

    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.

    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:

    [​IMG]
     
    #7
  8. Adorian

    Adorian Tantalus' Thief Member

    Messages:
    9
    Likes Received:
    1
    Location:
    France
    First Language:
    French
    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.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
    Last edited by a moderator: Aug 13, 2014
    #8
    Tommy Gun likes this.

Share This Page