<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Speedometer on another scene]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=459&amp;type=atom"/>
	<updated>2012-10-19T08:26:00Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=459</id>
		<entry>
			<title type="html"><![CDATA[Re: Speedometer on another scene]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2768#p2768"/>
			<content type="html"><![CDATA[<p>Thanks <img src="http://forum.maratis3d.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Almighty Laxz]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1037</uri>
			</author>
			<updated>2012-10-19T08:26:00Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2768#p2768</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Speedometer on another scene]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2767#p2767"/>
			<content type="html"><![CDATA[<p>Hi,</p><p>Maratis can only run one script at a time, from the current scene, for you the &quot;CarGame&quot; scene I think.</p><p>Just access directly your gui text from the main scene :</p><p>GuiScene = getScene(&quot;GuiScene&quot;)<br />GuiText = getObject(GuiScene, &quot;Text2&quot;)</p><p>and in the update :</p><p>setText(GuiText, string.format(&quot;%.1f&quot;, speed))</p>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2012-10-19T07:23:32Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2767#p2767</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Speedometer on another scene]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=2763#p2763"/>
			<content type="html"><![CDATA[<p>Hi,<br />I haven&#039;t worked on the car game in a while so I thought I would get back to it.<br />So I&#039;ve been trying to add a speedometer to my GUI scene. I have got a speedometer in my game scene which works, but I would prefer if it was stuck to the camera on the GUI scene. So far for my GUI scene i&#039;ve got:<br /></p><div class="quotebox"><blockquote><p>CarGame = getScene(&quot;CarGame&quot;)<br />Text2 = getObject(&quot;Text2&quot;)<br />Text0 = getObject(CarGame, &quot;Text0&quot;)<br />function onSceneUpdate()<br />speedometer = getText(CarGame, &quot;Text0&quot;)<br />setText(Text0, speedometer)<br />end</p></blockquote></div><p>And on my game scene i&#039;ve got:<br /></p><div class="quotebox"><blockquote><p>setText(Text0, string.format(&quot;%.1f&quot;, speed))</p></blockquote></div><p>The speed variable is included in the physics test demo already.<br />I feel like i&#039;m missing something obvious here, but could anyone please help?</p>]]></content>
			<author>
				<name><![CDATA[Almighty Laxz]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1037</uri>
			</author>
			<updated>2012-10-18T21:31:07Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=2763#p2763</id>
		</entry>
</feed>
