Issue detecting breaches

I’ve read through this (Stuck attempting to advance my code!) and have tried to implement what I thought would be a simple working version of breach detection. However, only some of the breaches are actually printed out to the console and I’m unsure why.

Here is my code in

elif stateType == 1:

And in

def detect_breaches(self,breach):
gamelib.debug_write(“TEST BREACHES TEST”,breach)

Any help that could be given resolving this issue would be greatly appreciated.

when you do this: state[“events”][“breach”][0], it gives you only one breach when there could be much more potential breaches in the list: state[“events”][“breach”].
you should go over every breach in this list.

Thanks, this worked perfectly! I can’t believe I didn’t see/think of this.

1 Like