<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - One function for all clones]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=515&amp;type=atom"/>
	<updated>2013-01-05T12:20:48Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=515</id>
		<entry>
			<title type="html"><![CDATA[Re: One function for all clones]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3219#p3219"/>
			<content type="html"><![CDATA[<p>send me an exemple as simple as possible and explain what behavior you expect.</p><p>but yes, for something like that, the best will be to use a metatable (that I&#039;m just starting to understand).</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-01-05T12:20:48Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3219#p3219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: One function for all clones]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3213#p3213"/>
			<content type="html"><![CDATA[<p>To resume, i&#039;m trying to make an AI that works more or less like a behavior ;<br />you spawn clones and they automatically receive the movements, animations, statistics etc, so you can spawn as many as you want and don&#039;t have to worry about anything</p><p>I think i&#039;m getting closer, however i just past 12 hours trying to get that thing working (which still doesn&#039;t..), i&#039;m out of juice. note that i&#039;m not using any local or metatables things, that might be the problem..</p><p>If you don&#039;t mind checking, i&#039;ll upload the project i&#039;m working on tomorrow</p>]]></content>
			<author>
				<name><![CDATA[Vegas]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=53</uri>
			</author>
			<updated>2013-01-04T23:51:19Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3213#p3213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: One function for all clones]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3212#p3212"/>
			<content type="html"><![CDATA[<p>Do you mean only one clone at a time should play an animation ? even if both are in collision ?<br />If yes, you can stop the test when you find the first collision :</p><div class="codebox"><pre><code>for clone in cloneList do

    if isCollisionBetween(clone, collisionMesh) then
        changeAnimation(clone, x)
        break -- break exit the for loop
    end
end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-01-04T15:30:44Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3212#p3212</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[One function for all clones]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3210#p3210"/>
			<content type="html"><![CDATA[<p>Hello, there&#039;s one thing that bugged me for quite some time, I want to make a single function working for all clones,<br />here&#039;s a simple picture to illustrate :</p><p><span class="postimg"><img src="https://dl.dropbox.com/u/19970067/Questions/clonefunct.png" alt="PunBB bbcode test" /></span></p><p>I want that when clone A or clone B collides with collision mesh, it start playing animation BUT :<br />1) not all clones at once (if clone A collides and play animation, clone B should not play)<br />2) without the need to copy &amp; paste the whole function for each clones using cloneList[1] cloneList[2] etc</p><p>Currently i&#039;m using method 2, but that&#039;s alot of trouble when i must tweak something</p><p>Hope i explained good enough, any tips on this ?</p>]]></content>
			<author>
				<name><![CDATA[Vegas]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=53</uri>
			</author>
			<updated>2013-01-04T14:58:33Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3210#p3210</id>
		</entry>
</feed>
