<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Problem in script]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=627</link>
		<description><![CDATA[The most recent posts in Problem in script.]]></description>
		<lastBuildDate>Mon, 22 Apr 2013 09:48:31 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4047#p4047</link>
			<description><![CDATA[<p>Thanks alot <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> again <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> </p><p>Ok, i did try that setParent, but apparently if I set parent in editor, it does not work (setParent to none)?&nbsp; (not problem for me tho <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /> ) <br />So for more info what i tried and did:<br />-I had a gun where it shoots bullets, bullet had gun as parent (set on editor) so it rotates..and then i cloned bullet..but setParent did not work..<br />-I then just added box in the gun where the bullet start (bullet had no parent) and then cloned the bullet. (alltho now that im writing, why not just use the gun as starting point &gt;.&lt; .....) </p><p>oh and just quick question, ( i did went for that wiki list of functions thru, did not see any function for this) but is there a way to draw a line in lua scripts? <br />I would like to draw line from a to b..<br />Or how to do it in lua script other ways of doing it, if there is not?</p>]]></description>
			<author><![CDATA[dummy@example.com (pleedian)]]></author>
			<pubDate>Mon, 22 Apr 2013 09:48:31 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4047#p4047</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4031#p4031</link>
			<description><![CDATA[<p>Hi,<br />in c++ you can delete yes, there is no restrictions as you get everything as-it.</p><p>- clone will get the position and parenting of reference object yes, it&#039;s an exact clone except for the name.<br />- you can modify the parenting in lua using &quot;setParent&quot; : <a href="http://wiki.maratis3d.org/index.php?title=SetParent">http://wiki.maratis3d.org/index.php?title=SetParent</a></p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Fri, 19 Apr 2013 14:01:32 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4031#p4031</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4026#p4026</link>
			<description><![CDATA[<div class="quotebox"><cite>anael wrote:</cite><blockquote><p>Hi, there is no delete as it can be a bit unsafe to deal with memory from lua (as getObject handle pointers),<br />deactivate will totally disable the object.</p><p>If your initial need is to clone / delete lot of objects, try to see it as a buffer to reuse the same objects a maximum.<br />Even getClone should on maximum be used out of the update loop (for better performance).</p></blockquote></div><p>Reason why I asked is that im doing FPS game, where i will make bullets (clone bullets) and if they are near object i would like to delete them.<br />But i think the bullets will go so fast that there would not be too much of them..so i can disable them and then use them again. <br />Is there delete in c++? <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> </p><p>well last night i tried coding and tested and made (cloned) about 2000 objects <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> and it still went smoothly..(very simple object)<br />(but also the all cloned ones rotated same time O.o cos did not have script done complete yet)<br />Thanks for tips <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> will help me out <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>EDIT:<br />Further questions: when i clone the object will get the position of reference object? <br />also the clone object will have same parent ( or then i got some error in my code <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> ) , so how i can just remove the parent of the object? <img src="http://forum.maratis3d.com/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[dummy@example.com (pleedian)]]></author>
			<pubDate>Fri, 19 Apr 2013 06:09:57 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4026#p4026</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4025#p4025</link>
			<description><![CDATA[<p>Hi, there is no delete as it can be a bit unsafe to deal with memory from lua (as getObject handle pointers),<br />deactivate will totally disable the object.</p><p>If your initial need is to clone / delete lot of objects, try to see it as a buffer to reuse the same objects a maximum.<br />Even getClone should on maximum be used out of the update loop (for better performance).</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Fri, 19 Apr 2013 04:40:26 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4025#p4025</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4022#p4022</link>
			<description><![CDATA[<p>Hm did not want to make new threat so..<br />is there function to delete object in LUA script..<br />I see deactivate but is there delete? <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> thanks for help in advance <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (pleedian)]]></author>
			<pubDate>Thu, 18 Apr 2013 15:36:01 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4022#p4022</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3906#p3906</link>
			<description><![CDATA[<p>That solved the problem <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> thanks <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> and thanks for the updateMatrix tip too <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> will come useful <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /> </p><p>i was looking that list of functions but somehow my eye did not catch those functions :-/ . (all tho im not suprised, i cant even see if my colleague is walking past me <img src="http://forum.maratis3d.com/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /> )</p>]]></description>
			<author><![CDATA[dummy@example.com (pleedian)]]></author>
			<pubDate>Tue, 02 Apr 2013 05:09:42 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3906#p3906</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3904#p3904</link>
			<description><![CDATA[<p>you can use : getTransformedPosition and getTransformedRotation<br />they return the world coordinates according to the matrix of the object</p><p>full list here : <a href="http://wiki.maratis3d.org/index.php?title=Lua_functions_list">http://wiki.maratis3d.org/index.php?tit &#133; tions_list</a></p><p>one thing to keep in mind, matrices are only updated frame by frame, or you need to call &quot;updateMatrix&quot; to force it<br />(in case you move an object and wants to get it&#039;s global position immediately after).</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Mon, 01 Apr 2013 10:06:16 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3904#p3904</guid>
		</item>
		<item>
			<title><![CDATA[Problem in script]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=3899#p3899</link>
			<description><![CDATA[<p>I got few objects map, and the problem comes when object has parent. If it has parent it seems i only get starting position or rotation (getposition etc), but the collision test of the object works fine... And if i try getting another object position it works (if has no parents)..</p><p>is this bug? And is there some way to get the position object which has parent?</p>]]></description>
			<author><![CDATA[dummy@example.com (pleedian)]]></author>
			<pubDate>Sun, 31 Mar 2013 06:13:45 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=3899#p3899</guid>
		</item>
	</channel>
</rss>
