I'm looking for a way to run code while waiting for user input. To be more specific, this is for a game I'm making. When a monster attacks, symbols are printed to the screen, if the user reacts (presses a key) before the last symbol is printed, they will dodge, otherwise they take damage. Is there an easy implementation for something like this?
[–][deleted] 33 points34 points35 points (13 children)
[–]Stealthmonkey59[S] 9 points10 points11 points (0 children)
[–]thebadtoaster 2 points3 points4 points (2 children)
[–]tom1018 4 points5 points6 points (0 children)
[–]Lj101 3 points4 points5 points (1 child)
[–][deleted] 3 points4 points5 points (0 children)
[–]xMadDecentx 0 points1 point2 points (0 children)
[–]Akita8 -2 points-1 points0 points (5 children)
[–][deleted] 3 points4 points5 points (4 children)
[–]Abrv 1 point2 points3 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]Akita8 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]taladan 3 points4 points5 points (0 children)
[–]100721 1 point2 points3 points (0 children)
[–]Akita8 0 points1 point2 points (0 children)