File: penwidth.txt

package info (click to toggle)
colobot 0.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 415,536 kB
  • sloc: cpp: 129,246; ansic: 8,872; python: 2,158; sh: 672; awk: 91; xml: 35; makefile: 31
file content (15 lines) | stat: -rw-r--r-- 893 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
\b;Instruction \c;penwidth\n;
Syntax:
\s;\c;penwidth ( color );\n;
The instruction \c;penwidth();\n; instructs the bot to change the width of the pencil.

\t;width: \c;\l;float\u cbot\float;\n;
Width of the pen. The width cannot be higher than \c;1.0\n; and cannot be lower than \c;0.0\n;. 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.

\t;Return value: \c;\l;int\u cbot\int;\n;
Normally an error stops the program. You can prevent the program from stopping on errors by using the \c;\l;errmode\u cbot\errmode;(0)\n; instruction. A value different from zero if an error occurred is then returned by \c;penwidth();\n;.
\c;== 0 \n;The width was changed
\c;!= 0 \n;The instruction did not work

\t;See also
\l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.