I’ve run into a perplexing problem with a mod I’m working on and I’m wondering if it’s a bug or some sort of triggering limitation. Here’s what I’m trying to do:
Each player clicks an icon at the beginning of the game to initialize their clan. This updates a Global Property called ActivePlayerCount to count the number of active players. Once all players are initialized, a continue button is clicked.
This button grabs the first active clan at random, determines a region to occupy, places armies in that region, updates the number of units for that army, adjusts several global properties, and then repeats the process 3 more times so that the player ends up with a total of 4 controlled regions.
Then the process is supposed to go to the next active clan and repeat. This is where the trouble begins. It goes through the first clan perfectly and the only thing that changes before the next clan is started is a counter is updated and checked against the ActivePlayerCount. Beyond that, there is absolutely no difference in the process.
However, when setting up the second clan, I get an Infinite Loop error. I’ve been trying to resolve this problem for a week. I’ve thoroughly checked the process over and over again for duplicate commands, possible loops, etc. and I know there’s nothing wrong with it …especially considering that it sets up the first clan just fine. I’ve also restructured it to run in several different ways and I get same error.
The error I receive doesn’t help much either as it may reference things that would have nothing to do with the process itself. For example, it will name the layer for a graphic on a game piece which is controlled by a dynamic property and state this is the reason for the loop …which doesn’t make sense.
It appears that there’s a limitation in the number of triggers that can be executed in a routine. Regardless, of how I change the process, it always seems to fail at roughly the same point in the process and the error is detailing the last trigger in couldn’t complete as being responsible for the Infinite Loop.
Is there a limit to the number of triggers that you can execute in a routine?