<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Why isn't this clone script working?[solved]]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=922&amp;type=atom"/>
	<updated>2014-01-30T00:30:47Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=922</id>
		<entry>
			<title type="html"><![CDATA[Re: Why isn't this clone script working?[solved]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6286#p6286"/>
			<content type="html"><![CDATA[<p>This small script works very well. I can clone a bunch of objects and it still runs fast. Perhaps I will start posting some code snippets.</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2014-01-30T00:30:47Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6286#p6286</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Why isn't this clone script working?[solved]]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=6284#p6284"/>
			<content type="html"><![CDATA[<div class="codebox"><pre><code>man=getObject(&quot;Man&quot;)
manPosition = getPosition(&quot;Man&quot;)
marker = getObject(&quot;Marker&quot;)


function setMarker()
    if isKeyPressed(&quot;M&quot;) then
        markerClone = getClone(marker)
        setPosition(markerClone,{manPosition[1],manPosition[2] -10 ,manPosition[3]})
    end
end</code></pre></div><p>It keeps freezing. The setMarker() function is called under the onSceneUpdate() function.</p><p>Edit: Nevermind, I got it working:<br /></p><div class="codebox"><pre><code>function offsetClone(object,offset)
    if onKeyUp(&quot;O&quot;) then
        objectPosition = getPosition(object)
        objectClone = getClone(object)
        setPosition(objectClone,{objectPosition[1] ,objectPosition[2] + offset,objectPosition[3]})
    end
end</code></pre></div><p>This is also called under the onSceneUpdate() function. I changed it to onKeyUp() so that objects wouldn&#039;t be continuously spawning while the key is held.</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2014-01-29T23:58:50Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=6284#p6284</id>
		</entry>
</feed>
