NPC stack

I do event in my game like every npc go to a stair and take it.


Basicly they go in the stair and because transparent and pass trought...


But I facing a problem. NPC seam do not want to stack.


First NPC go on the stair place, but after other NPC go on the stair place and then move on next dale.


I tryed to understand and i figure out that because i use parallele event inside each NPC for make them move their and desactivate paralele event after they


reach the place, that make them not passable and then other NPC cant go there...


Mak sense..


Any way for make an event preserve image, speed, transparency, etc while changing back to other tab?


Because it's can be really embarasing to handle.


Of course I can use parallele event outside of the evnt himself, but that will make my cod to hard to read.


I home im clear in my explanation.. Thanks
1) why don't you use autonomous movement instead of parallel processes for moving them? The parallel process is NOT intended for use with set move route command, that can create a lot of timing bugs - the autonomous movement is what should be used for independent NPC movement.


2) If this is for a cutscene, spreading the move commands all over the events is the worst way to handle this.


Instead you should have ONE event controlling all other events by remote targeted set move route - that way your stairs will be much less of a problem, because you can disable or move away the NPV-events after they turn invisible.


3) there can only be one active event on any given position - all others are required to be set to through. If an event needs to enter a place where other events have moved to, then all those other events need to have through ON (something that is simple to set remotely by the controlling event)


In total, I think you only have problems because you structured your events wrong - parallel processes should not be used for such cases. There are only extremely rare cases where special conditions on interaction would force that handling.


As soon as you use either autonomous movement (for independent movemtn) or remote set move routes (for cutscenes), you'll see that the entire sequence becomes muvch easier to handle
In a move route, you can use the command "Set Through ON" (The translation may be worded differently). This allows anything to be on the same time as that NPC. I believe this is what you're looking for. 
Thanks Andar. I think I need to explain it more clearly then.


Im y map I hav a varaible that go to 0 to 3. 0= daytime, 1=evening. 2= night, 3=morning.


I want that each time that this variabl chang to caracter to move to proper place.


For exemple, A child will be in classe for 0, playing outside for 1, in the bed for 2, eating for 3.


I want all these mouvement to happen even if the player is there.


Also, I will use so much event on map that I need to think about speed performance.


Curently, the exact way I handle it:


When it's time to change for day to evening for exemple, I change the variable from 0 to 1.


Then I activate switch DayNightChange to ON. 


That activate a commo vent that immediatly put it ok OFF.


In all NPV player of my game, I have a second tab that get activated by this switch.


The second tab was set tu automatic.


This pag activate auto_switch A of the event. I can't put code directly there because DayNightChange was immediatly putted OFF and will not execut more then one line of code nd also it's need to be in parralele.


So for the tab that get activate with auto_switch_a,(this tab is set to parappele) I put code with a conditional brench that check what is the value(0-3) and then


do corect action with a pathfinder script. After that turn off autoswtich A.


That make easy to fix NPC path because we only need to check inside his own code if we get trouble.


Im sure they have a way for do better.


Im not sur what you mean by  autonomous movement. 


Thanks if you can give me a better way, that will be really appreciate.


For the stair trouble... I figure out where my problem comming from. When I desactivate autoswtichA, that turn back to his default setting that did't have pass trought.


SO i activate another selfswitch_b when they need to be invisible.


Im really sur I do it wrong way, but I didt see any other possibility. Ideally, my npc will have 4 tab, one for each moment of the day, but if I do that, i got no idea how I can tell to go in their plac without having to creating a common event where I will need to put arrounf 10 000+ line of code for set everyone position on the map. That will make so hard to fix any issue.


Thanks for you help, I start to be a little desesperate of myself on this one lol.
Im not sur what you mean by  autonomous movement.



That is the event option named "Autonomous Movement" on every single event page in the editor.


Look at the area between the sprite and the content of the event.


Usually it is set to "fixed" by default because by default events do not move, but it can be changed to different ways to easily set certain types of movement.


And when using autonomous movement, the trigger does not matter - for example in a lot of games without schedules, the autonomous movement is set to random for simpe NPCs while the content remains action-triggered and contains some text of a conversation with that NPC - absolutely no need for a parallel process to have the NPC moving AND be able to talk to it when the player triggers the event.


If you didn't even know of that option, no wonder you're doing something that complex with lag and parallel processes from every NPC...


As for scheduling, yes, there is a better way - you need to use several event pages conditioned to a time variable.


That is more than a little bit tricky if you have dozens of NPCs, but if done correctly it lets the engine handle the entire scheduling without a single parallel process (or, if it gets really complex, you might need a single parallel to handle corrections when the events go wrong.


But unfortunately I don't have time to explain that in more detail.
Thanks for this info. I using plugging for movement and automovment didt provite option to set a distination dirctly. But someon help m


to find a script call inside auto movement and that make my code so more clean, thanks for this.


Now i just need to fix a small issue with the smart pathfindr pluggin and that will be fin =:0)

Original thread: https://forums.rpgmakerweb.com/threads/npc-stack.73600/