<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Move with the Keyboard, Aim with the Mouse</title>
	<atom:link href="http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/feed/" rel="self" type="application/rss+xml" />
	<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/</link>
	<description>I help people make Flash games</description>
	<lastBuildDate>Sat, 13 Mar 2010 00:13:50 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3504</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Thu, 28 Jan 2010 04:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3504</guid>
		<description>&lt;p&gt;Well, there&#039;s a very simple explanation for why the &quot;= distance =&quot; is there: it&#039;s a typo :P&lt;/p&gt;

&lt;p&gt;I&#039;ve corrected it now, thanks for pointing it out. But for the record, you can write code like that. Suppose I wrote:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;someVar = someOtherVar = aThirdVar;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;...then that&#039;s the same as writing:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;someOtherVar = aThirdVar;
someVar = someOtherVar;&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;...so that&#039;s a useful shortcut sometimes. In this case, though, I just copied and pasted something incorrectly.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Well, there&#8217;s a very simple explanation for why the &#8220;= distance =&#8221; is there: it&#8217;s a typo <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>

<p>I&#8217;ve corrected it now, thanks for pointing it out. But for the record, you can write code like that. Suppose I wrote:</p>

<p><pre>someVar = someOtherVar = aThirdVar;</pre></p>

<p>&#8230;then that&#8217;s the same as writing:</p>

<p><pre>someOtherVar = aThirdVar;
someVar = someOtherVar;</pre></p>

<p>&#8230;so that&#8217;s a useful shortcut sometimes. In this case, though, I just copied and pasted something incorrectly.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: DudexD</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3497</link>
		<dc:creator>DudexD</dc:creator>
		<pubDate>Tue, 26 Jan 2010 17:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3497</guid>
		<description>&lt;p&gt;I got rid of the Non-focusing game problem after i did this part too, since i&#039;m not using WASD anymore :P&lt;/p&gt;

&lt;p&gt;But i got a question about the&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;br /&gt;
var totalDist:number = distance = Math.sqrt( ( xDirection * xDirection ) + ( yDirection * yDirection ) );
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;the thing i don&#039;t understand is the = distance =, Since when i first added it i got a error, That i got rid of simply by 
making a Public var distance:Number&lt;/p&gt;

&lt;p&gt;But then the bullet disapeared :S...
And then suddenly in ur code up there you removed it again :P so i don&#039;t totlay understand the point of this little word... :D&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I got rid of the Non-focusing game problem after i did this part too, since i&#8217;m not using WASD anymore <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>

<p>But i got a question about the</p>

<p><pre><br />
var totalDist:number = distance = Math.sqrt( ( xDirection * xDirection ) + ( yDirection * yDirection ) );
</pre></p>

<p>the thing i don&#8217;t understand is the = distance =, Since when i first added it i got a error, That i got rid of simply by 
making a Public var distance:Number</p>

<p>But then the bullet disapeared :S&#8230;
And then suddenly in ur code up there you removed it again <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  so i don&#8217;t totlay understand the point of this little word&#8230; <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3373</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Mon, 28 Dec 2009 23:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3373</guid>
		<description>&lt;p&gt;Hey Queepo,&lt;/p&gt;

&lt;p&gt;Nice idea. How about this:&lt;/p&gt;

&lt;p&gt;Add a new &lt;code&gt;public var&lt;/code&gt; to the Enemy class -- something like, &lt;code&gt;public var health:int;&lt;/code&gt;. Then, in your constructor, set it to whatever value you like (best to test it out with something small, I reckon).&lt;/p&gt;

&lt;p&gt;Then, in your &lt;code&gt;if ( enemyHasBeenHit )&lt;/code&gt; section, you&#039;ll be able to see how much health that &lt;em&gt;particular&lt;/em&gt; enemy that&#039;s just been hit has left, via &lt;code&gt;enemy.health&lt;/code&gt;. So at that point you can subtract a health point, or destroy the enemy if it&#039;s out of health. And of course you can change the appearance of the enemy or &lt;a href=&quot;http://gamedev.michaeljameswilliams.com/2009/06/03/basic-animation-as3-divided-timeline/&quot; rel=&quot;nofollow&quot;&gt;make it play a different animation&lt;/a&gt; or whatever.&lt;/p&gt;

&lt;p&gt;Hope that helps!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Queepo,</p>

<p>Nice idea. How about this:</p>

<p>Add a new <code>public var</code> to the Enemy class &#8212; something like, <code>public var health:int;</code>. Then, in your constructor, set it to whatever value you like (best to test it out with something small, I reckon).</p>

<p>Then, in your <code>if ( enemyHasBeenHit )</code> section, you&#8217;ll be able to see how much health that <em>particular</em> enemy that&#8217;s just been hit has left, via <code>enemy.health</code>. So at that point you can subtract a health point, or destroy the enemy if it&#8217;s out of health. And of course you can change the appearance of the enemy or <a href="http://gamedev.michaeljameswilliams.com/2009/06/03/basic-animation-as3-divided-timeline/" rel="nofollow">make it play a different animation</a> or whatever.</p>

<p>Hope that helps!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Queepo</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3348</link>
		<dc:creator>Queepo</dc:creator>
		<pubDate>Mon, 21 Dec 2009 05:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3348</guid>
		<description>&lt;p&gt;Hey,
i was wondering if you could help me give the enemies health by making it take more than 1 shot to kill them. I tried many different ways but I was not able to set a variable to each enemy in the array.
Thanks&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey,
i was wondering if you could help me give the enemies health by making it take more than 1 shot to kill them. I tried many different ways but I was not able to set a variable to each enemy in the array.
Thanks</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3326</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Sun, 20 Dec 2009 02:39:32 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3326</guid>
		<description>&lt;p&gt;Thanks Alex! That is a really cool gameplay mechanic you&#039;ve got there. Having to decide whether to race towards the dodgeball to try to get it before the enemy, or to run away so that there&#039;s room to dodge -- great stuff!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks Alex! That is a really cool gameplay mechanic you&#8217;ve got there. Having to decide whether to race towards the dodgeball to try to get it before the enemy, or to run away so that there&#8217;s room to dodge &#8212; great stuff!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AlexB</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3318</link>
		<dc:creator>AlexB</dc:creator>
		<pubDate>Thu, 17 Dec 2009 17:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3318</guid>
		<description>&lt;p&gt;Hello,
i would like make a congratulation for your Tutorial. With this I learned the the basics of OOP.
If you like check my Dodgeball extreme Flash-Shooter: http://abahlk.de/projects/dodgeball/&lt;/p&gt;

&lt;p&gt;Bye Alex&lt;/p&gt;

&lt;p&gt;.-= AlexB´s last blog: &lt;a href=&quot;http://abahlk.de/allgemein/dodgeball-extreme-der-neue-flash-shooter/&quot; rel=&quot;nofollow&quot;&gt;Dodgeball extreme: Der neue Flash-Shooter&lt;/a&gt; =-.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello,
i would like make a congratulation for your Tutorial. With this I learned the the basics of OOP.
If you like check my Dodgeball extreme Flash-Shooter: <a href="http://abahlk.de/projects/dodgeball/" rel="nofollow">http://abahlk.de/projects/dodgeball/</a></p>

<p>Bye Alex</p>

<p><span class="cluv"> AlexB´s last blog: <a href="http://abahlk.de/allgemein/dodgeball-extreme-der-neue-flash-shooter/" rel="nofollow">Dodgeball extreme: Der neue Flash-Shooter</a> </span></p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3165</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Sat, 14 Nov 2009 19:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3165</guid>
		<description>&lt;p&gt;Hehe nice, well done :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hehe nice, well done <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: PLyczkowski</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3163</link>
		<dc:creator>PLyczkowski</dc:creator>
		<pubDate>Fri, 13 Nov 2009 21:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3163</guid>
		<description>&lt;p&gt;Thanks for checking my site.&lt;/p&gt;

&lt;p&gt;I noticed the = seconds after posting, I&#039;m so proud - I&#039;m a total beginner at programming.&lt;/p&gt;

&lt;p&gt;I&#039;ll try to implement this idea, cheers.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for checking my site.</p>

<p>I noticed the = seconds after posting, I&#8217;m so proud &#8211; I&#8217;m a total beginner at programming.</p>

<p>I&#8217;ll try to implement this idea, cheers.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Williams</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3162</link>
		<dc:creator>Michael Williams</dc:creator>
		<pubDate>Fri, 13 Nov 2009 20:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3162</guid>
		<description>&lt;p&gt;Hey PLyczkowski (cool site by the way),&lt;/p&gt;

&lt;p&gt;Yeah, that code looks like a good place to start (watch out though -- you&#039;ve got &quot;=&quot; instead of &quot;==&quot; inside your if statements).&lt;/p&gt;

&lt;p&gt;I can see a few interesting directions you could take this in; please let me know how you get on with it :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey PLyczkowski (cool site by the way),</p>

<p>Yeah, that code looks like a good place to start (watch out though &#8212; you&#8217;ve got &#8220;=&#8221; instead of &#8220;==&#8221; inside your if statements).</p>

<p>I can see a few interesting directions you could take this in; please let me know how you get on with it <img src='http://gamedev.michaeljameswilliams.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: PLyczkowski</title>
		<link>http://gamedev.michaeljameswilliams.com/2009/06/25/move-keyboard-aim-mouse/comment-page-1/#comment-3158</link>
		<dc:creator>PLyczkowski</dc:creator>
		<pubDate>Wed, 11 Nov 2009 20:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://gamedev.michaeljameswilliams.com/?p=850#comment-3158</guid>
		<description>&lt;p&gt;Hey there, I wanted to add a feature to choose bullet type to the code. At first I tried to use eval to dynamically place a bullet type according to a variable, but since eval is not available in AS3, I abandoned the idea. Then I tried to use conditions. Are conditions the proper way?&lt;/p&gt;

&lt;p&gt;Here is the idea (or part of it):&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;&lt;/p&gt;

&lt;p&gt;public function createNewBullet( startingXDirection:Number, startingYDirection:Number ):void {
            if (activeBullet=1){
                                var newBullet=new Bullet(startingXDirection, startingYDirection);
                }
            else if (activeBullet=2){
                var newBullet=new Bullet2(startingXDirection, startingYDirection);
            }&lt;/p&gt;

&lt;p&gt;&lt;/pre&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey there, I wanted to add a feature to choose bullet type to the code. At first I tried to use eval to dynamically place a bullet type according to a variable, but since eval is not available in <acronym title="ActionScript 3">AS3</acronym>, I abandoned the idea. Then I tried to use conditions. Are conditions the proper way?</p>

<p>Here is the idea (or part of it):</p>

<p><pre></pre></p>

<p>public function createNewBullet( startingXDirection:Number, startingYDirection:Number ):void {
            if (activeBullet=1){
                                var newBullet=new Bullet(startingXDirection, startingYDirection);
                }
            else if (activeBullet=2){
                var newBullet=new Bullet2(startingXDirection, startingYDirection);
            }</p>

<p></p>]]></content:encoded>
	</item>
</channel>
</rss>
