<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Keeping the code &quot;active&quot;]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 18/02/2011 at 07:38, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Hi folks,</p>
<p dir="auto">I was wondering how to keep the code active, so to say.</p>
<p dir="auto">Means that it does not only initialize but is active every frame.</p>
<p dir="auto">I just want a random movement over time for one particle.</p>
<p dir="auto">Here is the Code (sorry it's in german for personal learning purposes)</p>
<blockquote>
<p dir="auto">import c4d<br />
import random</p>
<p dir="auto">stepSize = 5<br />
tp.AllocParticles(1)</p>
<p dir="auto">v_vector = c4d.Vector()</p>
<p dir="auto">v_vector.x = float(0)<br />
v_vector.y = float(0)<br />
v_vector.z = float(0)</p>
<p dir="auto">z=0</p>
<p dir="auto">def haupt(z,v_vector) :<br />
  while z&lt;10000 :<br />
      direction = random.randrange (0,8,1)<br />
      zufallsrichtung (direction)<br />
      tp.SetPosition(0, v_vector)<br />
      z += 1<br />
      print direction<br />
  return direction</p>
<p dir="auto">def zufallsrichtung (direction) :</p>
<p dir="auto">if direction == 0:  # Norden<br />
      v_vector.y += stepSize</p>
<p dir="auto">elif direction == 1: # Nordost<br />
      v_vector.x += stepSize<br />
      v_vector.y += stepSize<br />
   <br />
  elif direction == 2: # Ost<br />
      v_vector.x += stepSize</p>
<p dir="auto">elif direction == 3: # Südost<br />
      v_vector.x += stepSize<br />
      v_vector.y -= stepSize</p>
<p dir="auto">elif direction == 4: # Süd<br />
        v_vector.y += stepSize</p>
<p dir="auto">elif direction == 5: # Südwest<br />
      v_vector.x -= stepSize<br />
      v_vector.y -= stepSize</p>
<p dir="auto">elif direction == 6: # West<br />
        v_vector.x -= stepSize;</p>
<p dir="auto">elif direction == 7: # Nordwest<br />
        v_vector.x -= stepSize;<br />
        v_vector.y += stepSize;</p>
<p dir="auto">def main() :<br />
  pass</p>
<p dir="auto">haupt(z,v_vector)</p>
</blockquote>
<p dir="auto">Hope someone can help me out of this tiny problem</p>
]]></description><link>http://developers.maxon.net/forum/topic/5510/5529_keeping-the-code-active</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 08:53:00 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/5510.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 May 2018 17:51:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Keeping the code &quot;active&quot; on Wed, 09 May 2018 17:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 22/02/2011 at 02:32, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Yes that was the problem, thank you very much <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f603.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--smiley" style="height:23px;width:auto;vertical-align:middle" title="=)" alt="😃" /></p>
]]></description><link>http://developers.maxon.net/forum/post/25648</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25648</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:28 GMT</pubDate></item><item><title><![CDATA[Reply to Keeping the code &quot;active&quot; on Wed, 09 May 2018 17:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><em><strong>THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED</strong></em></p>
<p dir="auto"><em>On 19/02/2011 at 15:37, <strong>xxxxxxxx</strong> wrote:</em></p>
<p dir="auto">Haha, I've already replied you at <a href="http://tutorials.de" target="_blank" rel="noopener noreferrer nofollow ugc">tutorials.de</a>. <img src="http://developers.maxon.net/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=0b8ddba251d" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";-)" alt="😉" /><br />
You passed the main-function</p>
]]></description><link>http://developers.maxon.net/forum/post/25647</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/25647</guid><dc:creator><![CDATA[Helper]]></dc:creator><pubDate>Wed, 09 May 2018 17:51:28 GMT</pubDate></item></channel></rss>