Input problem, input trigger repeating?[SOLVED]

Hi guys,

I have a strange problem in a script I'm working on. A bit of background: in this part of the script, the actor command window is separated into up to four separate ones (one for each character present). I'm getting there, but the problem I have encountered is in switching between windows with the Left/Right keys.

Without going into too much detail, this functionality is very temperamental. I have got to the point where it is theoretically working right. However in practice you can get stuck on the first actor's command window until they perform an action, and then you are stuck on the next actor's window until they perform an action or the first actor becomes available again, etc.

HOWEVER, this functionality works perfectly when I insert 'print' commands in a few places, just to tell me certain values along the way. I get my popup, press OK, and you go to the next command window as intended!

But when I remove the print commands, it no longer works!

Has anyone encountered a similar problem before? Could it be something to do with the input being processed too quickly? My left and right commands are both set up to use Input.trigger? rather than Input.press? or Input.repeat?.

Any thoughts would be greatly appreciated.
have you tried pressed? instead of repeating?
d_disaster wrote:
My left and right commands are both set up to use Input.trigger? rather than Input.press? or Input.repeat?.


Sorry, my post is rather long so I understand if you didn't read all the details :P I'm not using repeat or press, I'm using trigger. I did actually try press, but it made things worse, as one would expect.
ops wrong thread.
Sorry if I wasted anybody's time, but I solved the problem on my own! For anybody interested, turns out I had a part of my frame update code which meant that the command window update method got called one extra time (after pressing right or left), purely my fault due to a dodgy if statement in there. Nothing wrong with input.trigger? at all :D

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=76154