Lpgfinmarkus, what method did you use?
I would like to suggest adding the bullet behavior to your AI sprite. Then, in the event sheet, create a condition that says System."Every X seconds". Then create an action that changes the sprite's bullet angle of motion.
That will allow your sprite to wander around aimlessly.
There are many methods of handling the sprite going off the screen:
1. Destroy the sprite. Either in the event sheet or using the specific behavior for that.
2. Use the "Wrap" behavior for the object.
3. Create a border around the layout so that the bullet sprites would bounce off them. This can be done by using sprites and adding the "Solid" behavior to them.
I hope this helps.