<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Controls</title><link>https://sourceforge.net/p/pybotwar/wiki/Controls/</link><description>Recent changes to Controls</description><atom:link href="https://sourceforge.net/p/pybotwar/wiki/Controls/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 18 Mar 2023 13:58:27 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/pybotwar/wiki/Controls/feed" rel="self" type="application/rss+xml"/><item><title>Controls modified by Lee Harr</title><link>https://sourceforge.net/p/pybotwar/wiki/Controls/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -10,8 +10,7 @@

 ### Force

-Move the robot straight forward or backward. Send a number between -100 and 100 indicating percent of full force straight forward or straight back
-ward.
+Move the robot straight forward or backward. Send a number between -100 and 100 indicating percent of full force straight forward or straight backward.

 Use the `.force()` method:

@@ -33,8 +32,7 @@

 ### Turret Aim

-There is a rotatable turret on the robot with a gun and radar emitter. Turn the turret clockwise or counter-clockwise by sending a number between 
--100 and 100. See the example robots for sample code on how to combine the turret control with the turret sensor for precise aiming.
+There is a rotatable turret on the robot with a gun and radar emitter. Turn the turret clockwise or counter-clockwise by sending a number between -100 and 100. See the example robots for sample code on how to combine the turret control with the turret sensor for precise aiming.

 Use the `.turret()` method:

@@ -45,8 +43,7 @@

 ### Fire

-Launch a shell in the direction the turret is pointing. You can launch it to fly as far as possible until it hits something, or set a fuse to go o
-ff after a certain distance and explode the shell.
+Launch a shell in the direction the turret is pointing. You can launch it to fly as far as possible until it hits something, or set a fuse to go off after a certain distance and explode the shell.

 Use the `.fire()` method:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lee Harr</dc:creator><pubDate>Sat, 18 Mar 2023 13:58:27 -0000</pubDate><guid>https://sourceforge.netc41aac18261e61828ea27c1f3191473ab49e5580</guid></item><item><title>Controls modified by Lee Harr</title><link>https://sourceforge.net/p/pybotwar/wiki/Controls/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;You can control your robot by sending certain action codes.&lt;/p&gt;
&lt;p&gt;Using the default &lt;code&gt;Robot&lt;/code&gt; class as a base, you can do that by calling methods.&lt;/p&gt;
&lt;h2 id="actions"&gt;Actions&lt;/h2&gt;
&lt;h3 id="force"&gt;Force&lt;/h3&gt;
&lt;p&gt;Move the robot straight forward or backward. Send a number between -100 and 100 indicating percent of full force straight forward or straight back&lt;br/&gt;
ward.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;.force()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.force(100) # Full speed ahead&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.force(-50) # Half speed backward&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="torque"&gt;Torque&lt;/h3&gt;
&lt;p&gt;Turn the robot left or right. Send a number between -100 and 100 indicating percent of full torque clockwise or counterclockwise.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;.torque()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.torque(100) # Turn clockwise as fast as possible&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.torque(-50) # Turn counterclockwise at half speed&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="turret-aim"&gt;Turret Aim&lt;/h3&gt;
&lt;p&gt;There is a rotatable turret on the robot with a gun and radar emitter. Turn the turret clockwise or counter-clockwise by sending a number between &lt;br/&gt;
-100 and 100. See the example robots for sample code on how to combine the turret control with the turret sensor for precise aiming.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;.turret()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.turret(100) # Rotate the turret clockwise as quickly as possible&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.turret(-50) # Rotate the turret counter-clockwise at half speed&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="fire"&gt;Fire&lt;/h3&gt;
&lt;p&gt;Launch a shell in the direction the turret is pointing. You can launch it to fly as far as possible until it hits something, or set a fuse to go o&lt;br/&gt;
ff after a certain distance and explode the shell.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;.fire()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.fire() # Launch the shell as far as posible&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.fire(10) # Explode after 10 meters&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Shells which hit something before reaching their fuse distance will still cause damage, but will not explode.&lt;/p&gt;
&lt;p&gt;The most damage is caused by a point-blank explosion.&lt;/p&gt;
&lt;h3 id="ping"&gt;Ping&lt;/h3&gt;
&lt;p&gt;Send out a radar pulse in the direction the turret is pointing. During the next tick, read the PING sensor to get the results.&lt;/p&gt;
&lt;p&gt;Use the radar with the &lt;code&gt;.ping()&lt;/code&gt; method:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.ping()&lt;/code&gt;&lt;/p&gt;
&lt;h3 id="log"&gt;Log&lt;/h3&gt;
&lt;p&gt;Send a statement to your robot's log file. Useful for figuring out what is happening when writing or debugging your program.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;self.log('test') # Send the word "test" to the log&lt;/code&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;self&lt;/span&gt;.&lt;span class="nv"&gt;log&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Health:'&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;self&lt;/span&gt;.&lt;span class="nv"&gt;sensors&lt;/span&gt;[&lt;span class="s1"&gt;'HEALTH'&lt;/span&gt;]&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;#&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;word&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'Health:'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;and&lt;/span&gt;
&lt;span class="w"&gt;                                            &lt;/span&gt;#&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;value&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;HEALTH&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;sensor&lt;/span&gt;
&lt;span class="w"&gt;                                            &lt;/span&gt;#&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;log&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lee Harr</dc:creator><pubDate>Sat, 18 Mar 2023 13:42:57 -0000</pubDate><guid>https://sourceforge.net0e85276d4712d3031484c6a2ddb2bf078830fd8c</guid></item></channel></rss>