Remember Event Position

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by Shaz, May 8, 2012.

  1. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,817
    Likes Received:
    8,721
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thanks.
     
    #41
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    35,256
    Likes Received:
    9,807
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah, I think direction is ignored for tilesets. I haven't tested that, but if you do find something a bit funny, say so, and I'll experiment a bit and modify the script to cater for it :)
     
    #42
  3. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,817
    Likes Received:
    8,721
    First Language:
    English
    Primarily Uses:
    RMVXA
    There is something a bit odd, but I don't know if it's this script or something else.

    Full story.

    This column is 2 events high.  The upper event (id 8 for ease of identification) has to go on top of a switch event because this column is blocking access to the switch.  In order for that to happen, I have that event 8 tucked up in a corner and when the map is loaded there is a parallel process with a moveto(x,y) command so that I can have one event on top of another.

    Our intrepid heroes do their thing on another map which causes this column to move out of the way.   I move the parallel process to a new, blank page so it is no longer doing anything with event 8.  Using the script call, I tell event 8 and event 4 to move one tile sideways.  Event 4 dutifully obeys, event 8 is nowhere to be seen.  I have had to continue using a moveto command, though now to the new location, for event 8 to show up.

    I can't see logically why event 8 should act any differently from event 4.  The fact that the original position of event 8 was a long way from its destination should not make any difference, I would have thought.
     
    #43
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    35,256
    Likes Received:
    9,807
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    I think you need to provide screenshots of your map, showing where the events are, and of each event.
     
    #44
  5. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,817
    Likes Received:
    8,721
    First Language:
    English
    Primarily Uses:
    RMVXA
    Here is the map, with the column in front of the switch.

    [​IMG]

    The event of the column top - just a boring bit of graphic and nothing else, and the event with the script call moving both parts of the column one tile to the right..  It also shows the switch to move the parallel process on a page so that it sends the column top to the correct new position.

    [​IMG]

    [​IMG]
     
    Last edited by a moderator: Jun 21, 2015
    #45
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    35,256
    Likes Received:
    9,807
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    The Remember Event Position script is not a substitute for the Set Event Location or the Set Move Route commands. It does not actually MOVE the events - it just sets/remembers the position where they should be when the map is next loaded. You still have to make them move via the existing commands.

    I would do it like this:

    Code:
    Set Move Route (this event): Move Right                           : Script: save_posSet Move Route (EV008): Move Right                      : Script: save_pos
    Except, what I would really do if trying to achieve something like you are, is create a sprite in an actual character sheet, of the whole column (obviously the character sheet would have to be sized for 32x64 sprites) and just use a single event with direction fix on and walking animation off, and use a single Set Move Route to move the event and then call the save_pos command, rather than having two events that represent one object and trying to move them in sync.
     
    Last edited by a moderator: Jun 21, 2015
    #46
    Kes likes this.
  7. Kes

    Kes Global Moderators Global Mod

    Messages:
    16,817
    Likes Received:
    8,721
    First Language:
    English
    Primarily Uses:
    RMVXA
    Oops. I thought the way the instructions in the script were worded meant that it moved them as well.  Yet once you explain it I can see what a dumb assumption that was.

    Thanks for clearing that one up for me.
     
    #47
  8. Dromundas

    Dromundas Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Great scripting Shaz I got it working quickly,

    I tried using it on an NPC who walks around town in a loop and noticed that the custom route starts out of sync with any new position.

    Could I start the custom move route further along, if I count the steps taken perhaps? I'm new to RPG Maker and Ruby...
     
    #48
  9. Shaz

    Shaz Veteran Veteran

    Messages:
    35,256
    Likes Received:
    9,807
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Unfortunately move routes are meant to start from a certain position.  If you want him to start in one of a number of different places and follow a set path, I'd probably be more inclined to go with multiple events and switches or variables to make only one of them active.


    It'd be nice if there was a 'follow path' script that just let you use a move route (or regions to define a path), determined where you were along the path, and started you from half way through.  I don't think such a script exists.
     
    #49
  10. Dromundas

    Dromundas Warper Member

    Messages:
    4
    Likes Received:
    0
    First Language:
    English
    Thanks for a quick answer, that would be nice if there was such a script. I've setup the NPC to walk around randomly instead, thanks so much for sharing your script with us!  BD
     
    #50

Share This Page