home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 51 / PCGamer51_17Demos.iso / games / colobotdemo / colobotdemo10e.exe / help / cbot / aim.txt next >
Text File  |  2001-06-29  |  1KB  |  22 lines

  1. \b;Instruction \c;aim\n;
  2. Syntax :
  3. \s;\c;aim ( angle );\n;
  4.  
  5. This instruction sets the vertical angle of the cannon. The following robots are equipped with a cannon: 
  6. o  \l;Shooter\u object\botfr;
  7. o  \l;Orga shooter\u object\botor;
  8. o  \l;Phazer shooter\u object\botphaz;
  9.  
  10. When controlling the robot through programming, the only way to turn the gun left or right is to turn the whole robot with the instruction \c;\l;turn\u cbot\turn;\n;.
  11.  
  12. \t;angle: \c;\l;float\u cbot\float;\n;
  13. Angle in degrees of the gun relative to the robot. A positive value orients the gun upward. For shooters and orga shooters, the angle must range from \c;-20\n; to \c;+20\n; degrees. For phazer shooters, the angle must range from \c;-20\n; to \c;45\n; degrees.
  14.  
  15. \t;Return value: \c;\l;int\u cbot\int;\n;
  16. Zero if everything is OK, a value different from zero if the rotation could not be performed: 
  17. \c;== 0 \n;The gun has now got the desired orientation
  18. \c;!= 0 \n;rotation impossible
  19.  
  20. \t;See also
  21. \l;Programming\u cbot;, \l;types\u cbot\type; and \l;categories\u cbot\category;.
  22.