Disable User input

Is there some sort of python function that will completely disable any user input? This would hopefully not include the ‘escape’ key…

This is mostly to stop user control during cut scenes, and this would be stopping multiple objects containing many logic bricks and python scripts.

Thanks!

~~Stu

Read post #4 in this thread:
http://blenderartists.org/forum/showthread.php?t=110463&highlight=Mmph%21

This might help you. Also what ever is controlling/starting the scene change you could do an all keys sensor that goes to nothing? Perhaps.

Well, that would work if you’re using a simple set-up. However, I’m talking about setting all python sensors to no pulse or something. Consider an object with lots of logic and several empties linked, and about 7 scripts, and an armature with 15 actions…ect ect

~~Stu

I would have an extra logic brick sensor and a property Move (Boolean) and when it is TRUE you can move and do stuff and when its false you cannot. You could have that attatched to everything, so that the user has no control when it is turned to FALSE, and it is turned to FALSE when a cutscene comes. Hope it helps.

you could add a global boolean called g.cutscene. Set it to 0 initially, and when a cut scene starts set it to true (1). Then at the beginning of each python script you want suspended add this:


if g.cutscene == 0:
   do stuff

Make sure that g.cutscene gets set back to 0 when the scene is done.

Boy, python makes everything so much easier. I need to start looking at it.

Yes, I understand, however, the current object is the one with the control over everything, yes? So whatever triggers the cutscene could just have the any key sensor. And broadcast a message which can be picked up and set this same sensor for all the things you mentioned. And vise versa to restart them.

However, I dont know how you handle using the esc key. Perhaps if it is the first sensor it will trigger first?
I must not understand. But if you want to stop all dynamics, then I suppose it would be tedious to do the script for each object, but perhaps you can just write a function that parses through all the objects and stops/starts dynamics again?

Okay, well thanks for the input everyone. I can and know how to disable everything the hard way, I just wanted to know if there was some function to stop keyboard/mouse input. I’ll just work with what I’ve got then. Again, thanks!

~~Stu