Maximite 2: How to make switch trigger only once when pressed
Author
Message
Decoy Senior Member Joined: 02/08/2019 Location: DenmarkPosts: 109
Posted: 05:10pm 01 Dec 2020
John, the normal function in GML is:
Keyboard_check(key)
- This will count as a press for each cycle that the key is pressed
The other function is:
keyboard_check_pressed(key)
- this will only register once, then the key will need to be depressed before pressing it again. I have no idea what goes on behind the scenes :)
The above also work for inputs from a microcontroller through a .dll.
I sort of expected a high-level language such as BASIC to have an easier implementation of this than C++ or the like. Jim's example above is great, but it is as - if not more - involved, than the Arduino counterpart.