you can use one of the expressions (ViewportRight, ViewportLeft, ViewportTop, ViewportBottem)
Example: say you need to spawn at the Right of the screen
System>>>Spawn object
Layer = your Layer
X = ViewportRight(0)+(Object.Width/2)
Y = choose the High where the object will be spawn
Note: the zero on "ViewportRight(0)" it refers to the layer where you gonna spawn the object