Hi, In my game I had time system that use 2 variables (hours+munites), I also have switches that define the time based on hours (midnight 0-3/ ealrymorning 3-6/ sunrise 6-9/ morning 9-12/ midday 12-15/ sunset 18-21/ evening 21-0).
I made movment system as parallel event in every map that controle the movment of the characters, but this have problems with it, for every npc I made a switch called "show [npc name]", in the characters controller event I controle the movments of the characters and show and hide them using the show npc switch, this worked well at the start but when I start to add more npc's, because in the character controller event when the movment of the npc start based on time I kep the wait movment active and I hide the npc after movment end, so npc will not be hided before the movment end, but with many npc's some characters movments will not start before someone esle movment start and that caused some problem and bugs in the game.
I have found some solutions but still not sure how good this solutions can be.
1st solution: use self switch in npc that controle movment.
I can make this work I think but the con of this that when npc going from area to another player can't interact with this npc and I want some of the npc to inform the player that they are leaving the area like for example a shop keeper will tell the player "It's late I closed my shop, I am going to hang out in the bar, come back tommorow, I will be open from 8am to 6pm", using this will inform the player about the npc.
2nd solution: do parallel event that controle the movment of each npc.
This also have big chance to work but having many parallel events in 1 map can cause frames problems and I want to avoid that.
3rd solution: using grid ID to confirm that the npc reached the location.
I done this with 1 npc, it worked fine but it hard to do, also could have problems if map is small and have many npc's but it hard to explain these problems without going much deeper on how I done this.
Overall I tried to give the overall idea about this system and I wanted to ask if there is better solutions?
I made movment system as parallel event in every map that controle the movment of the characters, but this have problems with it, for every npc I made a switch called "show [npc name]", in the characters controller event I controle the movments of the characters and show and hide them using the show npc switch, this worked well at the start but when I start to add more npc's, because in the character controller event when the movment of the npc start based on time I kep the wait movment active and I hide the npc after movment end, so npc will not be hided before the movment end, but with many npc's some characters movments will not start before someone esle movment start and that caused some problem and bugs in the game.
I have found some solutions but still not sure how good this solutions can be.
1st solution: use self switch in npc that controle movment.
I can make this work I think but the con of this that when npc going from area to another player can't interact with this npc and I want some of the npc to inform the player that they are leaving the area like for example a shop keeper will tell the player "It's late I closed my shop, I am going to hang out in the bar, come back tommorow, I will be open from 8am to 6pm", using this will inform the player about the npc.
2nd solution: do parallel event that controle the movment of each npc.
This also have big chance to work but having many parallel events in 1 map can cause frames problems and I want to avoid that.
3rd solution: using grid ID to confirm that the npc reached the location.
I done this with 1 npc, it worked fine but it hard to do, also could have problems if map is small and have many npc's but it hard to explain these problems without going much deeper on how I done this.
Overall I tried to give the overall idea about this system and I wanted to ask if there is better solutions?