disable or freeze keyboard sensors in realtime

Hey BGE gurus, I’ve been wondering if it is possible to disable (or freeze or something equivalent) a keyboard sensor when playing a game and if so how.
Scenario: I want the avatar to stop responding to the controls (keyboard strokes) while an overlay scene with instructions plays for a few seconds. The avatar should stay put during this time or the instructions given won’t apply.

Is this directly doable? If not, what are the potential workarounds?
thanx in advance

Switch the avatar to a state with no keyboard input. Then when the message is gone, return the avatar to the original state. :slight_smile:

Another option is to add a property to your object and call it something like “keyboardActive”. Then all your keyboard sensors should be connected to an ‘and’ Controller with a property Sensor tied to your “keyboardActive” property.

To respond to keyboard events you set your property to ‘True’ and to disable all events you set the property to ‘False’.

Here is a .blend to demonstrate

Attachments

LogicDemzo.blend (418 KB)

Many thanx forlks for the prompt replies and helpful suggestions!

@RossBlenderArt: haven’t looked into states yet, looks like I’m gonna have to

@Kastoria: my solution was eventually based on the idea you suggested. Now that I think about it, it’s so painfully obvious, as it is always once you’ve figured sth out.

@BluePrintRandom: thanx for the demonstration/blend file. Would have gone for that had I not been able to come up with a simpler solution. I didn’t want to involve any scripting which your solution seems to involve (am I right in that?). But it’s certainly something worth studying for the future.