I added some more comments to clarify how it all works (hopefully). You should probably read up on instance variables and booleans in the manual. 'For loops' as well, if you're not familiar with how loops work.
Anyway, if there's anything specific you need explained, just ask.
aahh ...sorry I am back ...I finally found time out of busy day job :)
@Nimitrix http://collegetomato.com/test4/freshStart2/ I was able to replicate BridgePatrol.but i see that (probably due to the math) after some time the enemy goes away from the bridges. I guess it's something to do with the accurate placement of the enemy on the bridges.