Help with Moving NPCs.

Diskun

Villager
Member
Joined
Sep 9, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
I'm trying to move NPCs at almost the same time. I've set it up where they move once a switch turns on, and they're both supposed to leave the area by taking the same path. The problem is, only one NPC will move, while the other won't. Perhaps you all can shed some light on what I'm doing wrong?
 

hiromu656

Praise the Sun (Arcana)
Veteran
Joined
Mar 10, 2013
Messages
437
Reaction score
123
First Language
English
Primarily Uses
RMVXA
You could disable Wait For Completion (the check box in the Set Move Route tab), that way the events could move at the same time.
 
Last edited by a moderator:

Diskun

Villager
Member
Joined
Sep 9, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
You could disable Wait For Completion (the check box in the Set Move Route tab), that way the events could move at the same time.
Tried it. It still doesn't work.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
This can definitely be done. Please show us (with screenshots, if possible) the event setup that you're using to set the NPCs' movement, so we can diagnose what's going wrong.
 

Diskun

Villager
Member
Joined
Sep 9, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
This can definitely be done. Please show us (with screenshots, if possible) the event setup that you're using to set the NPCs' movement, so we can diagnose what's going wrong.
Sure. The setup is started through another event, where I have a switch turn on at the end of that event page, as shown below:



The first NPC moves once the switch turns on. This one works. Here is the NPC's event:



The second NPC, however, doesn't move at all, even though she's following a similar event pattern that the first NPC is using:



The reason the second NPC moves less steps than the first NPC is that the second NPC is below the first NPC, and should accomplish the event before the first NPC does.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
I thought it would be something more obvious, so I'm not sure whether what I'm about to say will work.  But it's worth a try.  It looks like you have two Autorun events trying to do things at the same time, which can get messy.  Try the following two solutions, one at a time:

1) Set the two NPCs' page 2 (where you set the Move Route) to Parallel Process instead of Autorun, and see if the second NPC will move.  (If this works, you'll probably have a problem where they keep moving forever.  We can correct this.  But for now I just need to know whether it works in getting both NPCs to move.)

2) Modify the first event that you've showed me the screenshot of (the initial "Isabella" event, I'm assuming) to add the two force move routes right after the final message, then use the "Wait" event command (NOT the "Wait" option inside Move Route) to add a 1-Frame Wait before you turn the Self Switch A on.  Make sure you change the target of the Move Route to the appropriate NPC event instead of "This Event" and turn OFF the "Wait" option for either the first NPC's Route or for both NPCs Route (to your preference).  Finally, completely remove Page 2 for both NPCs.

To be clear about #2, the event code for the Isabella event should be:

Fadein Screen

Play BGM

Set Move Route: This Event (Wait)

Text

Text

Set Move Route: EV003 (Do not Wait)

Set Move Route: EV004 (Wait OR Don't)

Wait: 1 Frame

Control Self Switch

Control Switches

(((Don't forget to remove Page 2 for the NPCs!!)))

One other thought: do you have any "Set Move Route" events on page 1 of your NPCs, or on page 2 of your initial "Isabella" event?  And is there anything on Page 2 of the Isabella event that might interrupt event processing (like an Erase Event command)?
 
Last edited by a moderator:

Diskun

Villager
Member
Joined
Sep 9, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
I thought it would be something more obvious, so I'm not sure whether what I'm about to say will work.  But it's worth a try.  It looks like you have two Autorun events trying to do things at the same time, which can get messy.  Try the following two solutions, one at a time:

1) Set the two NPCs' page 2 (where you set the Move Route) to Parallel Process instead of Autorun, and see if the second NPC will move.  (If this works, you'll probably have a problem where they keep moving forever.  We can correct this.  But for now I just need to know whether it works in getting both NPCs to move.)

2) Modify the first event that you've showed me the screenshot of (the initial "Isabella" event, I'm assuming) to add the two force move routes right after the final message, then use the "Wait" event command (NOT the "Wait" option inside Move Route) to add a 1-Frame Wait before you turn the Self Switch A on.  Make sure you change the target of the Move Route to the appropriate NPC event instead of "This Event" and turn OFF the "Wait" option for either the first NPC's Route or for both NPCs Route (to your preference).  Finally, completely remove Page 2 for both NPCs.

To be clear about #2, the event code for the Isabella event should be:

Fadein Screen

Play BGM

Set Move Route: This Event (Wait)

Text

Text

Set Move Route: EV003 (Do not Wait)

Set Move Route: EV004 (Wait OR Don't)

Wait: 1 Frame

Control Self Switch

Control Switches

(((Don't forget to remove Page 2 for the NPCs!!)))

One other thought: do you have any "Set Move Route" events on page 1 of your NPCs, or on page 2 of your initial "Isabella" event?  And is there anything on Page 2 of the Isabella event that might interrupt event processing (like an Erase Event command)?
Actually, I got it with the first solution. It worked exactly the way I wanted it to, with both NPCs moving off screen.

Many thanks, Wavelength!
 
Last edited by a moderator:

Tommy Gun

♩ ♪ ♫ ♬
Veteran
Joined
Jan 20, 2014
Messages
385
Reaction score
123
First Language
English
It's typically better to NOT even include those move routes inside the character events -- put both move routes into a separate, invisible autorun. But even if you are using the first character to control it, you shouldn't use the first method (one parallel and one autorun). It's much easier to "time" things, and keep things organized if you put them all in one event. You can still have them move at the same time.

Also, the reason your original method wasn't working is because you have it set to autorun and wait -- autoruns automatically loop, meaning it would never actually finish its route. You need to use a self-switch or something in an autorun.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Actually, I got it with the first solution. It worked exactly the way I wanted it to, with both NPCs moving off screen.


Many thanks, Wavelength!
That was actually one the worst solution you could have used concerning long time effects, both for lag (do not use parallel processes unless you really need them) and for logic debugging (NEVER control different cutscene events with switches, ALWAYS put all commands into a single controlling event).
What you should do is add set move route commands to your primary event (002) in the place where you currently have the "control switch dialogue = on".


The correct command sequence would be


1) set move route targeted on event003 (instead of "this event"), without wait command


2) set move route targeted on event004 (instead of "this event"), without wait command


3) activate self-switch A (the switch that is currently before the control switch dialogue command, self switches to change the event pages should always be last)


If you do not know how to target a set move route command - that is the drop-down-selection top left, that only reads "this event" by default.


Then remove all command from your third and fourth events (the moving NPCs)
 

Diskun

Villager
Member
Joined
Sep 9, 2014
Messages
5
Reaction score
0
First Language
English
Primarily Uses
That was actually one the worst solution you could have used concerning long time effects, both for lag (do not use parallel processes unless you really need them) and for logic debugging (NEVER control different cutscene events with switches, ALWAYS put all commands into a single controlling event).

What you should do is add set move route commands to your primary event (002) in the place where you currently have the "control switch dialogue = on".

The correct command sequence would be

1) set move route targeted on event003 (instead of "this event"), without wait command

2) set move route targeted on event004 (instead of "this event"), without wait command

3) activate self-switch A (the switch that is currently before the control switch dialogue command, self switches to change the event pages should always be last)

If you do not know how to target a set move route command - that is the drop-down-selection top left, that only reads "this event" by default.

Then remove all command from your third and fourth events (the moving NPCs)
I actually ran into issues using the first solution Wavelength ran into, but I'll give this a shot when I get off work.

Really though, thanks for all the help, guys. I was beating my head wall like crazy over this.
 

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Good, I'm glad we're making progress on fixing this bug.

Now, what Andar suggested was very close to the second method I offered, and I can't say in good faith that he's wrong about it being bad form to distribute the Move Route commands the way you did.  In the future you'll save yourself a lot of heartache by creating single events to control things like this.

But for a simple event like this, it should not be so bad to make it work with your current setup.  All we need to do is to add event commands to make sure the Parallel Process page is turned off.  So there are two ways to go about this, depending on what behavior you want from the NPCs after they move:

If you're happy with them returning to Page 1 of their Events after the Move Route: add a Wait to the second NPC so that the total time between her Move Route and Wait is greater than that of the first NPC's Move Route (90 frames should be more than enough).  At the end of the first NPC's Move Route, turn off the Isabella Dialogue switch.

If you want different behavior after they Move, or if you want them to disappear: After each NPC's Move Route, add a Self Switch ON event command.  Add a third page (do NOT use Autorun or Parallel Process) to each NPC that requires that Self Switch to be on, and design the page as you like it.  If you want them to disappear, don't give the third page any event graphic.

I think either of these should allow your event to work smoothly even if you don't use the "correct" solution of moving it all into one controlling event.  Please let me know if they don't!
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
There is a blog article under the Hints & Tips section, called "Events are Not NPCs: The Biggest Mistake in Cutscene Events"


Have a read through that, as it shows you how to do what Andar is describing. I also recommend it as a MUCH better way to have a cutscene (no matter how long or involved) where you want to choreograph the movement of several events at the same time.
 

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top