If I understand you right, I think you want your enemy to bounce off the walls of your layout. Am I right? If you use the bullet behavior, you can set the bullet angle of motion, with the bullet behavior "set angle" property turned off, to something down and to the right when the enemy goes past the left side of the screen and set the angle down and to the left when the enemy goes past the right side. You might try these events:
enemy.x < viewportleft(activelayer)
enemy set bullet angle of motion to 45
enemy.x > viewportright(activelayer)
enemy set bullet angle of motion to 135
Or you might have the bullet behavior moving the enemy straight down (or the player straight up) while the "sine" behavior controls side-to-side motion, but I don't have experience with that behavior. Hope that helps!