Friction

Explanation
The friction variable indicates the friction to subtract from the absolute value of the speed each step. This should be set in the format pixels per step.

This means that the friction variable will make the speed variable closer to zero in each step.

Positive Speeds
In the create event, speed will be set to 5 and friction set to .5: speed=5; friction=.5; If we now evaluate the speed variable in each step, these will be the findings: After the speed variable reaches 0, it no longer changes.
 * 5
 * 4.5
 * 4
 * 3.5
 * 3
 * 2.5
 * 2
 * 1.5
 * 1
 * 0.5
 * 0

Negative Speeds
In the create event, speed will be set to -5 and friction set to .5: speed=-5; friction=.5; After the speed variable reaches 0, it no longer changes.
 * -5
 * 1) -4.5
 * -4
 * 1) -3.5
 * -3
 * 1) -2.5
 * -2
 * 1) -1.5
 * -1
 * 1) -0.5
 * 0

Acceleration
In order to actually speed up an object, making a negative friction will therefore increase the speed of an object each step.