Colobot Wiki
Advertisement

Syntax:

penwidth ( color );

The instruction penwidth(); instructs the bot to change the width of the pencil.

width: float[]

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 penwidth();.

== 0 The width was changed

!= 0 The instruction did not work

See also[]

Advertisement