Page 1 of 1

Double output in console

Posted: Tue Jun 30, 2009 5:01 pm
by apollo
Hi people,

I'm yet another newbie with Blender and Python so please forgive my very basic level questions. One of those things that I'm getting some trouble is when executing a very simple line like

print "hello"

from a script in a Python controller connected to a Keyboard sensor every time I click the Space bar. So my problem is that I get double output:

hello
hello

it's maybe not a big thing but when I want to know the distance between two objects or which objects I have in my scene I get confused due to this "bug". The .blend file is just a Cube and the python script contains that only line (print "hello") Does anybody know how I can get a single output or is it supposed to be like this? Thanks for any help,

Apollo

Posted: Sat Jul 04, 2009 11:23 am
by jesterKing
You're getting signals for both press and release of key.

/Nathan

Posted: Mon Jul 06, 2009 10:30 am
by apollo
jesterKing wrote:You're getting signals for both press and release of key.

/Nathan
yeap, that could be it... but can't find how to fix this. Any ideas on how to specifically tell Blender to activate on press OR on release of a key???