[Help!]Events when returning to the map

Hello,

I have a noob question that might've been answered already but I couldn't find what I'm specifically looking for.

So I have events where after I talk to NPCs, they move to a spot and I assign them to stay in that spot.

When I return to the map, though, the NPC goes back to it's previous postion. 

My fix for this is I made it so that the NPC won't be there if you don't have a certain variable. Then, after the conversation, the variable is subtracted so that the NPC won't be there next time I go back to the map.

And then I just added another event with the NPC sprite where I want the NPC to be after the conversation.

Is there a more simpler way to do this? I think I made it more complicated than it should be. haha!

Thanks,

Wawa
That's basically how I did it (but with a switch). In some ways it's nice, because then the second event is clearly "after you talked to them," so you can kind of keep things organized that way if you have a lot of pages in the events. But I also wonder if there's a better way of doing this.
there is a script made by Shaz that gives you a better way.


Search this forum for "remember event position" and you should find that script, I don't have the link at the moment.
Personally, I would turn on a self switch in the NPC event. Then I'd have a parallel process with conditional branches that check if the event's self switch is turned on--if it is, I'd use the Set Event Location command to move the initial event to the new location. Since you can't check for self switches by default, put this in the Script part of a conditional branch:

$game_self_switches[[map_id, event_id, 'letter']] == true/false
Code:
example:$game_self_switches[[7, 10, 'A']] == true
 Also make sure to have an Erase Event command at the end of the parallel process so it doesn't lag.
there is a script made by Shaz that gives you a better way.

Search this forum for "remember event position" and you should find that script, I don't have the link at the moment.
Here it is:

http://forums.rpgmakerweb.com/index.php?/topic/1853-remember-event-position/

Just tested; works great! That's much easier.
Thank you for the tips, guys! I'm gonna try these out!
I'd rather not do scripts but I guess to make this thing easier, I have to.

Thanks!
The script definitely makes things simpler! You just use "save_pos()" at the end of the move, and you're done. 🙂 No parallel processes, second events, etc. Awesome script, Shaz. 
The script definitely makes things simpler! You just use "save_pos()" at the end of the move, and you're done. 🙂 No parallel processes, second events, etc. Awesome script, Shaz. 
Damn. Definitely gonna try this, then. Thanks!
Thanks Tommy Gun for adding the link.


You can do what you've done, but just use a switch instead of variables. On the original event, add a blank page conditioned by the switch, leaving all other values as default. And on the new event, condition the first page (which has the NPC sprite) by the same switch. Then when your NPC moves to the new location, wait for them to finish moving, and turn the switch on.
Thanks Tommy Gun for adding the link.

You can do what you've done, but just use a switch instead of variables. On the original event, add a blank page conditioned by the switch, leaving all other values as default. And on the new event, condition the first page (which has the NPC sprite) by the same switch. Then when your NPC moves to the new location, wait for them to finish moving, and turn the switch on.

Wow. Yeah that really seems much simpler.

I was thinking that at the beginning of the game, after the intro, I add all the variables i needed for every event that needs one. haha!

Thanks!
If you have half a dozen different NPCs who all need to be in different places after the same cutscene, you can use one switch for the whole lot. Switches and variables are global, so they can be used by multiple events. If you want one "action" to affect them all, you don't need to dedicate a different switch or variable to each one.

Original thread: https://forums.rpgmakerweb.com/threads/help-events-when-returning-to-the-map.23833/