- Edited
I seem to be having some issues understanding input. <br /><br />I want to make it so that one of my keys toggles debug information. I have a Panel set up with two labels as child nodes and a script to show or hide the panel. <br /><br />I thought I could use something like this to toggle the visibility:<br />
if Input.is_action_pressed(&quot;toggle_debug&quot;):<br /> visible = !visible<br /><br />This does work, but if you hold down the key, it will keep toggling back and forth, which is to be expected. I was hoping there would be an is_action_released() function, but alas, this does not appear to be!<br /><br />In fact, the documentation hints at there being one, but I can't seem to access it!<br /><br />It's under InputEventAction, but anytime I try to access it, it won't let me. The text stays as normal text and doesn't show as any kind of class. <br /><br />I've tried to access it as follows:<br />
if InputEventAction.is_action_released(&quot;toggle_debug&quot;):<br />But it keeps saying that InputEventAction identifier is not found. <br /><br />So, what do I do? Any pointers please? G: <br />