A little question for the project I’m still working on, is it possible to have multiple conditions that must be satisfied before a python script is activated?
Cause at the moment I’m having trouble doing this, I cannot get the python script to be activated if both left mouse button is clicked and the mouse is moved over an object… If I remove one of them, the script is activated.
In other words: I want to achieve that the cursor is on a specific object before the ‘user’ clicks. So that, if a certain button is pointed at, and then also clicked on -> the python script is activated.
The method you suggested doesn’t seem to make any difference… I’ve included the .blend file, the function is implemented (or tried to :p) only for Trillen (Aan / Uit)
Translated : On / Off (Trillen = Buzz)
I use the following code, which doesn’t produce any error:
Thats because you are using “isPositive” instead of “positive” like in my example. “isPositive” is a function while “positive” is a property"; “isPositive” is also deprecated.
Hey just a quick question, where can i find a list of all these new functions that blender 2.5 replaced? cause at the moment none of my old scrips will work and the console doesn’t give enough info to upgrade them…
… is it possible to have multiple conditions that must be satisfied before a python script is activated?
Just to make it clear - the answer is: No, it is not possible.
Why: A controller (regardless of its type) gets activated when any connected sensor sends a pulse (True or False does not matter). See Sensors: A word on Pulses.
I think your question was: “How to make sure that my code is executed under certain conditions only?” Sunjay03 gave you the answer an that. No need to do it again.
By the way: isPositive is not the same as isPositive()