I’m using the version 2.25 for the gameengine. In my script I’m having trouble detecting weather a sensor is triggered. I’m using the sensor.isPositve method for sensors. the statement is
: if keysensor.isPositve:
print “The Key Sensor is Positve!”
Both a key sensor and an always sensor are connected to this python controller script (that contains the above statement).
When I run the script with both sensors connected, the always sensor continually triggers the script as expected, but what is unexpected is that it prints “The Key Sensor is Positive!” with every trigger, even when I’m not pressing the key to make it positive. I’ve tried every combination of True and False pulse modes, and in none of them can I successfully run the script and not have it print the positive key sensor message.(I have a seperate print message as an indicator that is independant of the conditional print statement, so in other words I can’t get the triggering of the script to only print the non conditional string. It always prints both strings, as if there is no way for keysensor.ispositive to return false. So I ask, what does the .isPositive method actually detect? So that I know what I’m looking for. Is it a positive pulse? Is it any pulse from the sensor? Is it positive until it actually recieves a false pulse? I would think that’d I’d have some clue at this point, with all the tests I’ve run. but none of my results make any sense. Does anybody have the 411? thanks -chris %|