<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic script controller, entering a longer script in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076364#M24531</link>
    <description>hi when I input a multiple line script into a script controller it only adds the last line. Ive tried many ways to make it return using the ¬ key with no success.&lt;BR /&gt;How do I get a multi line script to be accepted ?&lt;BR /&gt;thanks joe g&lt;BR /&gt;&lt;BR /&gt;cryshape.rotation.controller.Available.controller = rotation_script ()&lt;BR /&gt;    cryshape.rotation.controller.rotation_script.controller.script = (&lt;BR /&gt;    "theZ = normalize (" + num1 as string + "-" + objcen as string + ")"&lt;BR /&gt;    "theUp = "&lt;BR /&gt;    "theX = normalize (cross theUp theZ)"&lt;BR /&gt;    "theY = normalize (cross theZ theX)" &lt;BR /&gt;    "theTM = matrix3 theX theY theZ"+  num1 as string&lt;BR /&gt;    "$"+cryshape.name as string + ".transform = theTM"&lt;BR /&gt;    )</description>
    <pubDate>Sun, 19 Apr 2009 19:52:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-04-19T19:52:51Z</dc:date>
    <item>
      <title>script controller, entering a longer script</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076364#M24531</link>
      <description>hi when I input a multiple line script into a script controller it only adds the last line. Ive tried many ways to make it return using the ¬ key with no success.&lt;BR /&gt;How do I get a multi line script to be accepted ?&lt;BR /&gt;thanks joe g&lt;BR /&gt;&lt;BR /&gt;cryshape.rotation.controller.Available.controller = rotation_script ()&lt;BR /&gt;    cryshape.rotation.controller.rotation_script.controller.script = (&lt;BR /&gt;    "theZ = normalize (" + num1 as string + "-" + objcen as string + ")"&lt;BR /&gt;    "theUp = "&lt;BR /&gt;    "theX = normalize (cross theUp theZ)"&lt;BR /&gt;    "theY = normalize (cross theZ theX)" &lt;BR /&gt;    "theTM = matrix3 theX theY theZ"+  num1 as string&lt;BR /&gt;    "$"+cryshape.name as string + ".transform = theTM"&lt;BR /&gt;    )</description>
      <pubDate>Sun, 19 Apr 2009 19:52:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076364#M24531</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-19T19:52:51Z</dc:date>
    </item>
    <item>
      <title>Re: script controller, entering a longer script</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076365#M24532</link>
      <description>Just build a string variable and assign to the controller's .script property. Each line in the string should end with a New Line character \n&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;cryshape.rotation.controller.Available.controller = rotation_script ()&lt;BR /&gt;    txt = "theZ = normalize (" + num1 as string + "-" + objcen as string + ")\n"&lt;BR /&gt;    txt += "theUp = \n"&lt;BR /&gt;    txt += "theX = normalize (cross theUp theZ) \n"&lt;BR /&gt;    txt += "theY = normalize (cross theZ theX)\n" &lt;BR /&gt;    txt += "theTM = matrix3 theX theY theZ"+  num1 as string + "\n"&lt;BR /&gt;    txt += "$"+cryshape.name as string + ".transform = theTM\n"&lt;BR /&gt;cryshape.rotation.controller.rotation_script.controller.script = txt&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It is a good idea to avoid using $ names in a script controller though (unless you are running an ancient version of Max).</description>
      <pubDate>Sun, 19 Apr 2009 21:52:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076365#M24532</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-19T21:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: script controller, entering a longer script</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076366#M24533</link>
      <description>thanks a lot Bobo</description>
      <pubDate>Sun, 19 Apr 2009 21:59:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/script-controller-entering-a-longer-script/m-p/4076366#M24533</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-19T21:59:46Z</dc:date>
    </item>
  </channel>
</rss>

