I have a family of 8 players, each using one key for the game. There's a family variable keycode, and I save the keycode on it.
However, I want to issue actions for the keycode is_down/release, and I'm wondering if I can do it with the family (instead of making 8 repeated actions for all the players).
I did this to allow for the down to be detected, and it appears to work fine:
keyboard: on any key pressed
keyboard: keycode keyboard.lastkeycode is down
system: pick players by evaluating players.keycode = keyboard.lastkeycode
Then performing the required actions (I would get to them with "keyboard: keycode player1.keycode is down" if I wasn't doing this, but would have to repeat for all the players.
Is there a way to detect the release of the key with the family?
Also, am I doing it right for the down event or is there a better way?
Thank you very much in advance!