PDA

View Full Version : While a key is pressed


chickentree
05-03-2013, 01:29 PM
Are there any guidelines for what movements, calls etc. are allowed during a "While a key is pressed" event?
I have run across several things that seem to through an exception (usually, if not always a null pointer) when I release a key that is generating events using this method. The problem with its sister event "When a key is pressed" is that it is slow, jerky, and does not react until the key is released. Judging from my reading of the error report given in the message window (like trying to read Russian with nothing but a Chinese to English dictionary :)) The method that was being called has vanished in the middle of its execution.
While the error seems to happen eventually when using a method, no matter what is being done in the method, calling another method or function during the event handler is almost guaranteed to cause an exception.

Again, I am just wondering if there are any guidelines on how to avoid this problem when using the While a key is pressed method.

Mark

djslater107
05-04-2013, 10:16 AM
Would it be possible for you to send me a copy of a sample world exhibiting this behavior. I am not quite following what is going on... Please send it don@alice.org.

Thanks,