Lately I have been trying to make a bgame using gamepads, but I would love to keep the keyboard available for "player1".
The thing is, I spawn my 4 players using the same object but spawning a difference instance, with a variable instance "ID" growing (0-1-2-3).
Then when I use the keyboard, I specify, "pick the player with player.id=0" and simulate the 8 direction. so that's basicly :
keyboard -> when left arrow is down
player -> pick instance with player.id=0 --> simulate 8 direction pressing left
But when I do that, I launch the game, and all my players instance are moving with the keyboard, at the exact same time.
Would you happen to know what could cause this ? I can't seem to find the answer... verifyed the id etc, all seems correct !
Thanks a lot,
8Direction behaviour is enabled for all your instances, that is why you move all objects at once. You should set it disabled by default and enable it only for the instance you want to move. You don't have to pick the instance by ID then.
Develop games in your browser. Powerful, performant & highly capable.
Hey Backend, thanks for the answer but I need the behavior to be active for all instance, since they move thanks to the gamepads. Or do I have to enable them each time ?
I am not really sure what you want to achieve but in order to move only one instance you need to:
Thanks a lot, this solved my issue (- set "Default controls" (8Direction property) to "No").
All the instance was using the arrow, when I only wanted one.