This forum is read only and just serves as an archive. If you have any questions, please post them on

1 decade ago by dmen

I have a game level, and also an entity that both do:

ig.input.bind(ig.KEY.MOUSE1, 'leftMouse');

The entity is a dialog that I fade out and then kill. It seems that once the entity is killed my game class is no longer getting input on the leftMouse action. In the update() method of the game class I do a console log - and then also do a console log if ig.input.pressed('leftMouse') occurs.

Before the dialog fades, I get both traces - from the update, and the press. Once the dialog is gone, I only get the update trace - no longer does ig.input.pressed('leftMouse') do anything.

I tried changing 'leftMouse' in the dialog to something else - like 'lmDialog' but then the mouse doesn't work in the dialog at all?

I seem to not be understanding something about ig.input. Please help.

1 decade ago by vincentpiel

Without code it will be hard to help... :-/
Post some code, and go using the debugger to see more things than with simple console.log.

1 decade ago by dmen

Not sure why really, but I was just using input.bind incorrectly. This line in the docs finally sunk in: "Several buttons can be bound to the same action, but a button can not be bound to several actions."
I was binding the left mouse button to different actions, in different entities, thus overriding each other... I got it worked out. Thanks!
Page 1 of 1
« first « previous next › last »