<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Basic Artificial Intelligence</title>
	<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/</link>
	<description></description>
	<pubDate>Sun, 05 Jul 2009 03:32:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Tweety</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-30663</link>
		<dc:creator>Tweety</dc:creator>
		<pubDate>Sat, 30 May 2009 09:58:09 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-30663</guid>
		<description>do it with _xscale..... this is a little different code but i think it will help you:
onClipEvent (load) {
var scale:Number = _xscale;
var speed:Number = 10;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.hrac)) {
	this.gotoAndStop(4);
} else {
if (rx&gt;=50 &#038;&#038; rx&lt;350) {
	this.gotoAndStop(1);
	this._x -= speed;
	_xscale = -scale;
	}
if (rx&lt;=-50 &#038;&#038; rx&gt;-350){ 
this.gotoAndStop(1);
this._x  = speed;	
_xscale = scale;
}
}
}</description>
		<content:encoded><![CDATA[<p>do it with _xscale&#8230;.. this is a little different code but i think it will help you:<br />
onClipEvent (load) {<br />
var scale:Number = _xscale;<br />
var speed:Number = 10;<br />
}<br />
onClipEvent (enterFrame) {<br />
if (this.hitTest(_root.hrac)) {<br />
	this.gotoAndStop(4);<br />
} else {<br />
if (rx>=50 &#038;&#038; rx&lt;350) {<br />
	this.gotoAndStop(1);<br />
	this._x -= speed;<br />
	_xscale = -scale;<br />
	}<br />
if (rx< =-50 &#038;&#038; rx>-350){<br />
this.gotoAndStop(1);<br />
this._x  = speed;<br />
_xscale = scale;<br />
}<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Isaac</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-28607</link>
		<dc:creator>Isaac</dc:creator>
		<pubDate>Sun, 05 Apr 2009 22:03:22 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-28607</guid>
		<description>how do u make an enemy turn around if u go past him, not just backwards</description>
		<content:encoded><![CDATA[<p>how do u make an enemy turn around if u go past him, not just backwards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweety</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-27684</link>
		<dc:creator>Tweety</dc:creator>
		<pubDate>Tue, 10 Mar 2009 18:51:56 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-27684</guid>
		<description>Hi all...I'm making a game and i have problem. I will explain it on this tutorial. I want to enemy follow character only if camera see him. I was experimenting for hours and i didnt find a way to do it. Help me please. Thank you :)</description>
		<content:encoded><![CDATA[<p>Hi all&#8230;I&#8217;m making a game and i have problem. I will explain it on this tutorial. I want to enemy follow character only if camera see him. I was experimenting for hours and i didnt find a way to do it. Help me please. Thank you <img src='http://www.awestyproductions.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reece</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-27675</link>
		<dc:creator>reece</dc:creator>
		<pubDate>Tue, 10 Mar 2009 08:11:33 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-27675</guid>
		<description>i can make my enemy move up to follow using this code
onClipEvent(enterFrame){
    ty = this._y;
    mx = _root.man._y;
    ry = ty - mx;
    if(this.hitTest(_root.man)){
       _root.hp -= (random(5)+1);
    }else{
        if(ry &#62;= 1 &#38;&#38; ry&#60;300){
            this._y -= 1;
        }
        if(ry -300){
            this._x += 1;
        }
        this.gotoAndStop(1);
    }
}
but i cant figure out how to reverse it so he moves down with the enemy</description>
		<content:encoded><![CDATA[<p>i can make my enemy move up to follow using this code<br />
onClipEvent(enterFrame){<br />
    ty = this._y;<br />
    mx = _root.man._y;<br />
    ry = ty - mx;<br />
    if(this.hitTest(_root.man)){<br />
       _root.hp -= (random(5)+1);<br />
    }else{<br />
        if(ry &gt;= 1 &amp;&amp; ry&lt;300){<br />
            this._y -= 1;<br />
        }<br />
        if(ry -300){<br />
            this._x += 1;<br />
        }<br />
        this.gotoAndStop(1);<br />
    }<br />
}<br />
but i cant figure out how to reverse it so he moves down with the enemy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BO-dum</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-22185</link>
		<dc:creator>BO-dum</dc:creator>
		<pubDate>Thu, 04 Sep 2008 16:11:18 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-22185</guid>
		<description>how do i make the baddie go up and down aswell</description>
		<content:encoded><![CDATA[<p>how do i make the baddie go up and down aswell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ike</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-16338</link>
		<dc:creator>ike</dc:creator>
		<pubDate>Sat, 26 Apr 2008 18:49:09 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-16338</guid>
		<description>how to make the enemy turn around if you go past him, not just walk backwards?</description>
		<content:encoded><![CDATA[<p>how to make the enemy turn around if you go past him, not just walk backwards?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chikonatorr</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-8889</link>
		<dc:creator>chikonatorr</dc:creator>
		<pubDate>Wed, 19 Dec 2007 00:34:04 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-8889</guid>
		<description>I tried the code you posted above but it gave me the error message saying that it's waiting for a ) to end the "if(this._y &#62; (_root.man._y 25))" part</description>
		<content:encoded><![CDATA[<p>I tried the code you posted above but it gave me the error message saying that it&#8217;s waiting for a ) to end the &#8220;if(this._y &gt; (_root.man._y 25))&#8221; part</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hiutopor</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-7185</link>
		<dc:creator>hiutopor</dc:creator>
		<pubDate>Mon, 17 Sep 2007 14:18:55 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-7185</guid>
		<description>Hi 
 
Very interesting information! Thanks! 
 
Bye</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>Very interesting information! Thanks! </p>
<p>Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ISQ</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-6737</link>
		<dc:creator>ISQ</dc:creator>
		<pubDate>Wed, 22 Aug 2007 16:03:51 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-6737</guid>
		<description>great tutorial awesty!  Really enjoyed it.  but for those of you who were wondering how to get the enemy to chase you every were, here is a code that works.

onClipEvent(enterFrame){
        ty = this._y;
        my = _root.man._y;
        ry = ty - my;
        if(this.hitTest(_root.man)){
                this.gotoAndStop(2);
        }else{
                if(ry &#62;= 1 &#38;&#38; ry-300){
                        this._y += 6;
                }
                this.gotoAndStop(1);
        }
}
onClipEvent(enterFrame){
        tx = this._x;
        mx = _root.man._x;
        rx = tx - mx;
        if(this.hitTest(_root.man)){
                this.gotoAndStop(2);
        }else{
                if(rx &#62;= 1 &#38;&#38; rx-300){
                        this._x += 6;
                }
                this.gotoAndStop(1);
        }
}</description>
		<content:encoded><![CDATA[<p>great tutorial awesty!  Really enjoyed it.  but for those of you who were wondering how to get the enemy to chase you every were, here is a code that works.</p>
<p>onClipEvent(enterFrame){<br />
        ty = this._y;<br />
        my = _root.man._y;<br />
        ry = ty - my;<br />
        if(this.hitTest(_root.man)){<br />
                this.gotoAndStop(2);<br />
        }else{<br />
                if(ry &gt;= 1 &amp;&amp; ry-300){<br />
                        this._y += 6;<br />
                }<br />
                this.gotoAndStop(1);<br />
        }<br />
}<br />
onClipEvent(enterFrame){<br />
        tx = this._x;<br />
        mx = _root.man._x;<br />
        rx = tx - mx;<br />
        if(this.hitTest(_root.man)){<br />
                this.gotoAndStop(2);<br />
        }else{<br />
                if(rx &gt;= 1 &amp;&amp; rx-300){<br />
                        this._x += 6;<br />
                }<br />
                this.gotoAndStop(1);<br />
        }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Light (MasterMX'er</title>
		<link>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-5774</link>
		<dc:creator>Light (MasterMX'er</dc:creator>
		<pubDate>Wed, 27 Jun 2007 21:13:52 +0000</pubDate>
		<guid>http://www.awestyproductions.com/tutorials/flash-tutorials/basic-artificial-intelligence/#comment-5774</guid>
		<description>Greetings.
Oh and for the moving up and down, i'm afraid you'd be waisting time asking me lol...i'd have to dig up some pretty old archives just to find it, plus I see someone already covered it.
Well just wanted to come back and check on things. Like the site!!...lookin pretty damn good.

That's all.

-Light-

p.s.
Once again, Big Ups for all your tutorials...they're deff a big help for me.</description>
		<content:encoded><![CDATA[<p>Greetings.<br />
Oh and for the moving up and down, i&#8217;m afraid you&#8217;d be waisting time asking me lol&#8230;i&#8217;d have to dig up some pretty old archives just to find it, plus I see someone already covered it.<br />
Well just wanted to come back and check on things. Like the site!!&#8230;lookin pretty damn good.</p>
<p>That&#8217;s all.</p>
<p>-Light-</p>
<p>p.s.<br />
Once again, Big Ups for all your tutorials&#8230;they&#8217;re deff a big help for me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
