Colobot Wiki


pendown ( color, width );

The instruction pendown(); instructs the bot to have the pen down, so it starts drawing. To stop drawing use penup();.

color: int (default value: Black)[]

Color name

width: float (default value: 0.5)[]

Width of the pen. The width cannot be higher than 1.0 and cannot be lower than 0.0. Passing a higher value will result in the width being the highest possible and passing a lower value will result in the width being the lowest possible.

Return value: int[]

Normally an error stops the program. You can prevent the program from stopping on errors by using the errmode(0) instruction. A value different from zero if an error occurred is then returned by pendown();.

== 0 The pen is now down

!= 0 The instruction did not work

See also[]