[Help!]Events when returning to the map

Wawa

Villager
Member
Joined
Jul 21, 2013
Messages
16
Reaction score
0
Primarily Uses
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
 
Last edited by a moderator:

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
123
First Language
English
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
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.
 

Hollow

(◡‿◡✿)
Veteran
Joined
Jul 14, 2012
Messages
519
Reaction score
439
First Language
English
Primarily Uses
RMMV
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.
 
Last edited by a moderator:

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
123
First Language
English
Last edited by a moderator:

Wawa

Villager
Member
Joined
Jul 21, 2013
Messages
16
Reaction score
0
Primarily Uses
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!
 

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
123
First Language
English
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. 
 

Wawa

Villager
Member
Joined
Jul 21, 2013
Messages
16
Reaction score
0
Primarily Uses
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!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

Wawa

Villager
Member
Joined
Jul 21, 2013
Messages
16
Reaction score
0
Primarily Uses
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!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top