There are a number of ways you can complete a level in World of Goo, but by far the commonest is the pipe. see also Ending Levels without a pipe
However it's not the pipe that actually ends the level, it's a levelexit item, but you'll need both.

At it's simplest...

When the Editor creates a new level it includes a levelexit
Move this to where you want it and click the AutoPipe button on the toolbar, and you're almost done!
You just need to set how many balls are required to complete the level... see [ballsrequired]

If you want a little more than the "simplest"...

Pipes in detail

A pipe item is purely visual, it doesn't actually DO anything to the Goo Balls. A pipe just shows the player where they are aiming for, and becomes animated when the exit is open and Goo Balls are collected.
They have a type attibute which controls the colour of the pipe, but it does not affect what types of Goo Balls can or cannot be collected.

Pipes have child vertexes

The vertex items tell the game where to place the mouth of the pipe, where the bends are and where the pipe ends. You can have as many vertexes (bends) in the pipe as you like. However, pipes can only ever run horizontally or vertically and if there is a bend they MUST turn, if they go straight on (or turn back on themselves) the game crashes. The Editor will help you with this.

The first vertex listed is the mouth, it can be moved freely and should be positioned at (or close to) the centre of the levelexit. You should always position this first. Any other vertexes will "snap" into allowed positions as you drag. [Video that shows all of the above stuff about vertexes]

The levelexit

As mentioned above pipes are just visual items, it's levelexits that do all the real work. They control the opening / closing of the pipe, they suck Goo Balls towards their centre when the exit it open, and they allow balls into the pipe (or not). They also display the small puffs of air sucking towards the centre.
The radius attribute affects two functions of the pipe. It sets the detection distance for opening the pipe, if there is an attached Goo Ball within the radius, then the exit and pipe open. It also sets the suction range, (almost*) all Goo Balls within the radius are sucked towards the centre.
But not all Goo Balls will be collected.
Whether or not a Goo Ball is collected is controlled by two things. Some types of Goo Ball can never be collected (those tagged suckable=false; Pokey, Beauty, BlockHead etc). All other Goo Balls can be collected, and you can use the filter attribute to control which are "allowed" in this level.

If filter is empty or missing, then any "suckable" Goo Ball will be collected. Otherwise filter can be set to allow one (or more) specific types of Goo Ball into the exit. When more than one type of Goo Ball is allowed the types should be comma-seperated common,Ivy for example.


If I have a levelexit do I really need a pipe?
Yes you do. If you don't have a pipe the game crashes when you open the exit.
What does Autopipe do?
Autopipe is just a quick way of getting a simple pipe into your level. What it does is...
Add a pipe item - if there isn't one
Add a vertex exactly at the centre of the levelexit
Add another vertex outside the nearest edge of the level (calculated from scenebounds - link)
NB: Any existing vertexes will be removed, the Editor will warn you of this.
Pipes depth and id attributes
Pipes have a depth attribute, however it appears to be completely ignored by the game. Despite the fact that several pipes in the original levels have non-zero depths, testing reveals that pipes are always drawn at depth=0
Pipes also have an id attribute which has no effect or function on the game.
Given this, both depth and id will be removed in future versions of the Editor.
* About sucked balls
Goo Balls with stacking=true (BlockHead, RectHead, WindowSquare, WindowRect) are immune to the suction of the pipe. And strangely, lose all solidity and cannot be stacked when they are within the radius of an open pipe.
antigrav balls, like balloon, are also immune to the suction when attached. This can make them difficult to get into the pipe.
About the suction
The suction from the levelexit is equivalent to a radialforcefield set to type=gravity with forceatcenter=-40 and forceatedge=-40 and with a high dampening factor. [Link to RadialForceField] Note: this forcefield is set to antigrav=true, which produces odd effects if an antigrav-enabled ball has suckable