Maxduino Analogue issue

I am using an analogue input for a button. When the button is pressed the number changes to 1, when it is pressed again it goes to 0. This is fine when using a Toggle Box, it just checks and unchecks, but when I use a bang (which I want to send when the number changes) it works, but because the number is constantly updated there is always a constant banging going on.

I just want it to bang when the toggle changes. How can I do this?

You'll need another variable to maintain the state of the switch. Then, when the state changes, you send whatever you need to send.