<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — SmoothEventReciever - error when key pressed]]></title>
		<link>https://gprogs.com/viewtopic.php?id=390</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=390&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in SmoothEventReciever - error when key pressed.]]></description>
		<lastBuildDate>Thu, 12 Aug 2010 23:54:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1631#p1631</link>
			<description><![CDATA[<p>there is a new version of the addons for download.</p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 12 Aug 2010 23:54:07 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1631#p1631</guid>
		</item>
		<item>
			<title><![CDATA[Re: SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1627#p1627</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 12 Aug 2010 16:48:15 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1627#p1627</guid>
		</item>
		<item>
			<title><![CDATA[Re: SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1624#p1624</link>
			<description><![CDATA[<div class="codebox"><pre><code>...
m_char_buf = m_char_buf[..m_char_buf.Dimensions()[0] + 1] 
m_char_buf[m_char_buf.Dimensions()[0] - 1] = key

m_key_buf_old[key] = m_key_buf[key]
m_key_buf[key] = event.getKeyPressedDown()
...</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Lobby)]]></author>
			<pubDate>Thu, 12 Aug 2010 11:51:36 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1624#p1624</guid>
		</item>
		<item>
			<title><![CDATA[Re: SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1490#p1490</link>
			<description><![CDATA[]]></description>
			<author><![CDATA[null@example.com (Kronos)]]></author>
			<pubDate>Tue, 22 Sep 2009 18:11:24 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1490#p1490</guid>
		</item>
		<item>
			<title><![CDATA[Re: SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1489#p1489</link>
			<description><![CDATA[<p>greetings <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; my apologies on the response delay.&nbsp; unfortunately i am unable to replicate this issue.&nbsp; here is a modified hello world that prints keys pressed using the SmoothEventReceiver.&nbsp; please give it a whirl and see if you get the issue here as well.&nbsp; also, what version of BMAX are your running?&nbsp; what OS?&nbsp; we may need to rebuild mods.<br /></p><div class="codebox"><pre><code>SuperStrict
Framework Irrlicht.Core
Import Irrlicht.AddOns

?MacOS
Local device:IrrlichtDevice = ..
    IrrlichtDevice.Create(EDT_OPENGL, _DIMENSION2DI(640, 480), 16, ..
        False, False, False, Null)
?Not MacOS
Local device:IrrlichtDevice = ..
    IrrlichtDevice.Create(EDT_BURNINGVIDEO, _DIMENSION2DI(640, 480), 16, ..
        False, False, False, Null)
?

If Not device Then Return
        
device.setWindowCaption(&quot;Hello World! - Irrlicht Engine Demo&quot;)

Local Receiver:SmoothEventReceiver = SmoothEventReceiver.createReceiver()
device.setEventReceiver(Receiver)

Local driver:IVideoDriver = device.getVideoDriver()
Local smgr:ISceneManager = device.getSceneManager()
Local guienv:IGUIEnvironment = device.getGUIEnvironment()

guienv.addStaticText(&quot;Hello World! This is the Irrlicht Software renderer!&quot;, ..
    _RECTI(10,10,260,22), True)
    
Local mesh:IAnimatedMesh = smgr.getMesh(&quot;../../media/sydney.md2&quot;)
If Not mesh Then Return
Local node:IAnimatedMeshSceneNode = smgr.addAnimatedMeshSceneNode( mesh )

If node
    node.setMaterialFlag(EMF_LIGHTING, False)
    node.setMD2AnimationFromType ( EMAT_STAND )
    node.setMaterialTexture( 0, driver.getTexture(&quot;../../media/sydney.bmp&quot;) )
EndIf

smgr.addCameraSceneNode(Null, _VECTOR3DF(0,30,-40), _VECTOR3DF(0,5,0))

While device.run() 

    driver.beginScene(True, True, _SCOLOR(255,100,101,140))

    smgr.drawAll()
    guienv.drawAll()

    Local key:Int = Receiver.popkey()
    Print key

    driver.endScene()
EndWhile

device.drop()</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Tue, 22 Sep 2009 12:03:58 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1489#p1489</guid>
		</item>
		<item>
			<title><![CDATA[SmoothEventReciever - error when key pressed]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=1486#p1486</link>
			<description><![CDATA[<p>Im using the latest addons.zip 2008 06 09 with irrlicht 1.5.1. and Blitzmax 1.34. I get an error when I press any key .&quot;Unhandled Exception:Attempt to index array element beyond array length.</p><p>on 5th line of OnEvent Method</p><div class="codebox"><pre><code>&#039; push the key
            m_char_buf = m_char_buf[..m_char_buf.Dimensions()[0] + 1]  &lt;- here!!
            m_char_buf[m_char_buf.Dimensions()[0] - 1] = key
        
            m_key_buf_old[key] = m_key_buf[key]
            m_key_buf[key] = event.getKeyPressedDown()</code></pre></div><p>I created the receiver with:-</p><div class="codebox"><pre><code>Receiver:SmoothEventReceiver = SmoothEventReceiver.createReceiver()
device.setEventReceiver(Receiver)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Kronos)]]></author>
			<pubDate>Fri, 18 Sep 2009 16:29:21 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=1486#p1486</guid>
		</item>
	</channel>
</rss>
