Start shooting when an opponent enters camera view

In case this helps someone. I am not sure it is efficient. I am a begintermediate developer, but I got it working as intended like this:

I would welcome a better approach.