I'm trying to make a system in which each "day" 1 randomly picked event of 7 is chosen and applied to the game. I also wanted to set it so that if a chosen event is picked 5 time or more it'll instead keeping choosing till it chooses something else. IE. if it's been foggy for 5 days and it picks fog again it'll keep rolling until it gets something that isn't fog. This applies to enemy and ally smoke and gas attacks and so it'll roll again if either have hit the 5 day limit and has picked either sides gas and smoke attacks again (2,3 and 4,5) respectively. Again I'm aiming to limit every event to a max of 5 days in a row and to pick another event if it picks those events.
So, I have copied this format 7 times, each corresponding to a "world event" (enemy smoke screen , ally smoke screen , Enemy poison Shelling , Ally poison Shelling , Fog , rain ,normal) Problem happens on the third "Event" generation, usually it gets poison gas and the text begins to keep looping "the enemy( or ally) is gassing the battlefield" But after going through my event scripting I can't for the life of me figure out why. Thanks in advance for the help!
I think it has something to do with the loop event since I'm not quite sure how to use it properly yet!

[Edit] adding more pictures to show easier [Edit]
[EDIT4] I THINK we've solved this issue, hard to tell with the way the system works but testing has shown promising results! Thanks again everyone for the amazing help!
[EDIT3] I've also ran into a issue where when I call common events (rain,fog,gas,ect) the rain event's weather event doesn't disable even though the other common events disable weather effects, not sure what I'm missing on this one!
Here's two events to compare, rain and enemy smoke respectively. I added this problem to the main post since I figured it had to do with the system as a whole but if not lemme know and I'll happily delete it! (Still not quite sure what double posting is but I'll try my best not to break any more rules!)
So, I have copied this format 7 times, each corresponding to a "world event" (enemy smoke screen , ally smoke screen , Enemy poison Shelling , Ally poison Shelling , Fog , rain ,normal) Problem happens on the third "Event" generation, usually it gets poison gas and the text begins to keep looping "the enemy( or ally) is gassing the battlefield" But after going through my event scripting I can't for the life of me figure out why. Thanks in advance for the help!
I think it has something to do with the loop event since I'm not quite sure how to use it properly yet!

[Edit] adding more pictures to show easier [Edit]
[EDIT4] I THINK we've solved this issue, hard to tell with the way the system works but testing has shown promising results! Thanks again everyone for the amazing help!
[EDIT3] I've also ran into a issue where when I call common events (rain,fog,gas,ect) the rain event's weather event doesn't disable even though the other common events disable weather effects, not sure what I'm missing on this one!
Here's two events to compare, rain and enemy smoke respectively. I added this problem to the main post since I figured it had to do with the system as a whole but if not lemme know and I'll happily delete it! (Still not quite sure what double posting is but I'll try my best not to break any more rules!)