<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - access to the "Follow behavior" attributes]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=288</link>
		<description><![CDATA[The most recent posts in access to the "Follow behavior" attributes.]]></description>
		<lastBuildDate>Wed, 01 Feb 2012 06:41:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: access to the "Follow behavior" attributes]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=1362#p1362</link>
			<description><![CDATA[<p>Ok, thanks <img src="http://forum.maratis3d.com/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Alinor)]]></author>
			<pubDate>Wed, 01 Feb 2012 06:41:45 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=1362#p1362</guid>
		</item>
		<item>
			<title><![CDATA[Re: access to the "Follow behavior" attributes]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=1359#p1359</link>
			<description><![CDATA[<p>Hi,<br />yes, you don&#039;t have access to the MBFollow class from the SDK,<br />the generic system to access to behavior variables is this :</p><div class="codebox"><pre><code>MVariable variable = behavior-&gt;getVariable(0); // first variable (&quot;target&quot;)
MString * target = (MString *)variable.getPointer();

behavior-&gt;getVariable(1); // &quot;delay&quot;
float * delay = (float *)variable.getPointer();
...</code></pre></div><p>if you are not sure of the variable id, name or data type, you can scan the variables :</p><p>variables number :<br />unsigned int nbVar = behavior-&gt;getVariablesNumber();</p><p>name :<br />variable.getName();</p><p>type :<br />variable.getType();<br />(can be M_VARIABLE_BOOL, M_VARIABLE_INT, M_VARIABLE_VEC2, M_VARIABLE_VEC3...)</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Tue, 31 Jan 2012 19:12:07 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=1359#p1359</guid>
		</item>
		<item>
			<title><![CDATA[access to the "Follow behavior" attributes]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=1358#p1358</link>
			<description><![CDATA[<p>Hi, I have an another question about SDK, I try to attach a Follow behavior to a 3d Entity :</p><div class="codebox"><pre><code>MBehaviorManager * bManager = MEngine::getInstance()-&gt;getBehaviorManager();
MBehaviorCreator * bCreator = bManager-&gt;getBehaviorByName(&quot;Follow&quot;);
MBehavior * behavior = bCreator-&gt;getNewBehavior(object);
object-&gt;addBehavior(behavior);</code></pre></div><p>it work, but how can I change the &quot;delay&quot;, &quot;offset&quot; ... attributes of &quot;behavior&quot; ?<br />I try to convert &quot;behavior&quot; with an expression like &quot;(Follow *) behavior&quot; but it doesn&#039;t work ...</p>]]></description>
			<author><![CDATA[dummy@example.com (Alinor)]]></author>
			<pubDate>Tue, 31 Jan 2012 18:15:18 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=1358#p1358</guid>
		</item>
	</channel>
</rss>
