Thanks, Redeemer. I only use vec_dist to detect the player distance and activate the Attack or run mode of the enemy, ignoring walls . I have to fix it using c_trace to activate the enemy only when the player is visible for him. Or mix some options using distance and visibility, etcetera.
About the second questions , for now , it is shooting only one pellet.
The answer is that i dont know, for now, how to shoot more than one pellet at a time

I am beginning , and i know i have to improve it. In this momment i am concentrated in the enemies AI and fixing buggs.
thanks.