Remember Event Position

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,079
Reaction score
13,695
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 :)
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,297
Reaction score
11,712
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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,079
Reaction score
13,695
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.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,297
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Here is the map, with the column in front of the switch.



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.



 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,079
Reaction score
13,695
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:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,297
Reaction score
11,712
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.
 

Dromundas

Warper
Member
Joined
Dec 2, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
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...
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,079
Reaction score
13,695
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.
 

Dromundas

Warper
Member
Joined
Dec 2, 2016
Messages
4
Reaction score
0
First Language
English
Primarily Uses
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
 

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

Latest Threads

Latest Profile Posts

Hope you are all fine today~
Moderators, you must have so much patience to be able to deal with everything. I mod in a server of sorts and today we just got a message, which, despite it's helpful constructive criticism, basically stated that all of the mods were jerks and that was the only reason our server was unlikeable. So, thank you, for having patience. You are appreciated! :kaoluv:
Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......
i love my game very much

Forum statistics

Threads
105,737
Messages
1,015,971
Members
137,415
Latest member
SMMR
Top