If I have a function that gets called when a keyboard key are held down and the same function gets called when another key are held down...
...is this possible?
I use a function that should do things to a player object when I press a key. It's about steering an object with the arrow-keys.
But I have 2 players, and when Player1 and Player2 steer left at the same time - it does not work. ( yes the Player2 has other keys assigned )
I guess the function can not be called like that "at the same time" ?
Each call (for Player1 and Player2) gets different parameters. And the function works fine if only one player steer left or right, but if both steer at the same direction at the same time, it does not.
I have 2 functions, one for "SteerLeft" and one for "SteerRight"
I guess I have to do this in a different way somehow. I wonder how the mechanics that are in progress here works when the function get calls at the same time?
If anyone can explain, I'll give you a HUG!