In The Burning Blue, there is a clock with counters for the two clock hands. I find their positions, and report the correct time of day, or if they are not set correctly, I report an error.
However, I have just realized that the counters may not yet exist, i.e. the player has not used a pre-defined scenario, and is setting up the game manually. In this case, my code crashes miserably.
How can I test for the existence of the counters before I find their location?
Could you just define the counters in an At-Start stack so they exist regardless of whether or not a predefined setup was chosen, and then make them incapable of being deleted (no Delete trait)?
Failing that, you could initiate your sequence with a Trigger and use the sum and count functions in the property match expression to avoid doing any of it if the requisite number of clock hand counters is wrong.
You could say that it would be silly not to have clock hands on the map with the clock, but the “Design Your Own” scenario was intended to be a scenario with no counters anywhere, so in order to maintain the full manual experience I went for the second solution: SumZone()
It works beautifully, thanks!