This consists of three sprites, based on the alarm system in Magna Centipede's stage from Mega Man X2.
The spotlights will travel left/right or up/down (depending on the extra bit) and optionally flash at 60 FPS (which makes them look transparent; the GIF is not smooth enough to show the real effect). When Mario touches one, it will set the On/Off switch to Off and optionally disappear. After about 3 seconds, the switch will be set back to on.
Also included is a turret, which will fall to the ground and shoot projectiles when Mario gets spotted. Make sure to specify the sprite number of the projectile in alarm_turret.asm!
Check the ASM files for customization options.
Usage with No More Sprite Tile Limits is recommended because the spotlights are 64x64 sprites.
Due to the locking system (which lets you put more than one spotlight on screen), the spotlights write values above 1 to $14AF (On/Off switch flag), which may cause issues with improperly coded ASM resources.
The code has been greatly simplified and optimized, especially the graphics routines. More features have been added to make it more similar to the system in Mega Man X2.
The spotlights now use their extra bit to determine their direction (before, the extra bit just broke them). A new locking system has been added to let you use more than one spotlight on screen (previously, the spotlights would overwrite the On/Off switch value). They can also optionally flash at 60 FPS. The GIF doesn't do it much justice but in game, they look transparent.