<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - A few questions]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=1106&amp;type=atom"/>
	<updated>2014-12-13T20:40:50Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=1106</id>
		<entry>
			<title type="html"><![CDATA[Re: A few questions]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=7445#p7445"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[cygorx]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2837</uri>
			</author>
			<updated>2014-12-13T20:40:50Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=7445#p7445</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A few questions]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=7444#p7444"/>
			<content type="html"><![CDATA[<p>What is inside or outside of the game loop?</p>]]></content>
			<author>
				<name><![CDATA[Tutorial Doctor]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2493</uri>
			</author>
			<updated>2014-12-13T19:30:35Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=7444#p7444</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A few questions]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=7443#p7443"/>
			<content type="html"><![CDATA[<p>coll is defined as <br />local coll&nbsp; = getNumCollisions(playerFeet)<br />it throws the attempt to compare with nil error.</p>]]></content>
			<author>
				<name><![CDATA[cygorx]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2837</uri>
			</author>
			<updated>2014-12-13T18:17:17Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=7443#p7443</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[A few questions]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=7442#p7442"/>
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[cygorx]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2837</uri>
			</author>
			<updated>2014-12-13T18:15:43Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=7442#p7442</id>
		</entry>
</feed>
