<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - A few questions]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=1106</link>
		<description><![CDATA[The most recent posts in A few questions.]]></description>
		<lastBuildDate>Sat, 13 Dec 2014 20:40:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: A few questions]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7445#p7445</link>
			<description><![CDATA[<p>Everything except:</p><p>local player &nbsp; &nbsp; = getObject(&#039;PlayerObj&#039;)<br />local playerMesh= getObject(&#039;Player&#039;)<br />local playerFeet= getObject(&#039;PlayerFeet&#039;)</p><p>local camera&nbsp; &nbsp; = getObject(&#039;Camera0&#039;)<br />local camera1&nbsp; &nbsp;= getObject(&#039;Camera1&#039;)<br />changeCurrentCamera(camera)<br />local offset&nbsp; &nbsp; = 0</p><p>local terrain&nbsp; &nbsp;= getObject(&#039;Terrain&#039;)<br />local toggle&nbsp; &nbsp; = 2<br />local damage&nbsp; &nbsp; = 10<br />local crit&nbsp; &nbsp; &nbsp; = damage * 2.2<br />local k0k&nbsp; &nbsp; &nbsp; &nbsp;= {}<br />local k9k&nbsp; &nbsp; &nbsp; &nbsp;= {}</p><p>centerCursor()<br />hideCursor()</p><p>linearSearch&nbsp; &nbsp; = function(t, x)<br />&nbsp; &nbsp; for _,v in next,t do<br />&nbsp; &nbsp; &nbsp; &nbsp; if (v == x) then return _ end<br />&nbsp; &nbsp; end<br />&nbsp; &nbsp; return false<br />end</p>]]></description>
			<author><![CDATA[dummy@example.com (cygorx)]]></author>
			<pubDate>Sat, 13 Dec 2014 20:40:50 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7445#p7445</guid>
		</item>
		<item>
			<title><![CDATA[Re: A few questions]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7444#p7444</link>
			<description><![CDATA[<p>What is inside or outside of the game loop?</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Sat, 13 Dec 2014 19:30:35 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7444#p7444</guid>
		</item>
		<item>
			<title><![CDATA[Re: A few questions]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7443#p7443</link>
			<description><![CDATA[<p>coll is defined as <br />local coll&nbsp; = getNumCollisions(playerFeet)<br />it throws the attempt to compare with nil error.</p>]]></description>
			<author><![CDATA[dummy@example.com (cygorx)]]></author>
			<pubDate>Sat, 13 Dec 2014 18:17:17 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7443#p7443</guid>
		</item>
		<item>
			<title><![CDATA[A few questions]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=7442#p7442</link>
			<description><![CDATA[<p>Hey guys,</p><p>So, I created a game in which the graphics were made entirely separate from the scripts. All of the basic scripts were created inside of a test environment. They work in that area.<br />Now, however, when I have applied the scripts to the larger level (which has roughly 400 objects), there are certain areas that nonsensically just don&#039;t work. I&#039;m thinking it has something&nbsp; to do with the amount objects inside of the level. If it is necessary to&nbsp; split the area up into different levels, then it is fine to do so.<br />Although, is there something I should be doing differently as far as object properties/code?</p><p>&nbsp; &nbsp; if (isKeyPressed(&#039;UP&#039;)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; offset = offset &lt; 3 and offset + 0.2 or offset<br />&nbsp; &nbsp; &nbsp; &nbsp; setBehaviorVariable(camera, 1, &#039;offset&#039;, {0, 7, 2 + offset})<br />&nbsp; &nbsp; end<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if (isKeyPressed(&#039;DOWN&#039;)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; offset = offset &gt; -3 and offset - 0.2 or offset<br />&nbsp; &nbsp; &nbsp; &nbsp; setBehaviorVariable(camera, 1, &#039;offset&#039;, {0, 7, 2 + offset})<br />&nbsp; &nbsp; end</p><p>this area used to work fine, but for some reason it hates the down key now. When I press the down key, Maratis freezes, returns errors of certain objects not existing (as a result of it freezing), and forces me to exit the program.<br />I can even comment out the up key section entirely and it simply just hates the down key</p><p>Another area:<br />&nbsp; &nbsp; if (isKeyPressed(&#039;SPACE&#039;)) then<br />&nbsp; &nbsp; &nbsp; &nbsp; if (coll &gt; 1) then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addCentralForce(player, {0, 0, 20})<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; changeAnimation(playerMesh, 2)<br />&nbsp; &nbsp; &nbsp; &nbsp; end<br />&nbsp; &nbsp; end</p><p>this makes the program not be able to present any kind of recognition to pressing keys and freezes, but i can still hit esc.<br />the game throws the error for the line if(coll &gt;1)then</p>]]></description>
			<author><![CDATA[dummy@example.com (cygorx)]]></author>
			<pubDate>Sat, 13 Dec 2014 18:15:43 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=7442#p7442</guid>
		</item>
	</channel>
</rss>
