Gunner bot programing
Your code handling the behaviours like "Shoot 3 times if the touch sensor is triggered" or "Shoot if the light sensor is triggered" should use 'if' statements.



Then, instead of always being called, the "shooting" code would append only on sensor events.  After shooting, the robot would then go back to the "Driving around" part of the code.

This page is a good visual reference for all the RCX programming components