Pbodeh This is how i have managed to do this in one of my games
Add bullet behavior to the sprite you want to move in those 4 directions(set Bounce off solids Enable)
In event sheet try something like
Condition:
Every random(4,10) seconds
Action>Sprite
Set Bullet angle of motion 90 degrees
Condition:
Every random(4,10) seconds
Action>Sprite
Set Bullet angle of motion 180 degrees
Condition:
Every random(4,10) seconds
Action>Sprite
Set Bullet angle of motion 0 degrees
Condition:
Every random(4,10) seconds
Action>Sprite
Set Bullet angle of motion -90 degrees
Play around with it a little and hopefully you'll get the result you're looking for.