If you mean floating up and down in a wave motion? If so have his Y coordinate add a multiple of the 'sine' wave.
With enemies I would usually have a variable such as 'InRange'. Default set to '0'. Once the player gets within range of the enemy, the 'InRange' variable is set to '1'. If the 'InRange' variable is set to '1', then the enemy angles towards the player and begins shooting etc...
InRange = 0 Would therefore be in a passible mode
InRange = 1 Would therefore be in an aggressive attacking mode.
If the Global Attack range is not working. Instead either use a sprite as a hitbox (Big circule), so that when the player collides with it InRange is set to '1'. Alternatively have an event which checks the players distance such as the expression "distance(x1, y1, x2, y2)", if this number returns too low, then have InRange set to 1.