Hello !
I'm trying to create a small soccer game to learn more about construct.
I created a sprite for the player, and have coded some basic movements and actions with him and the ball.
Now I'm trying to have the active player (the player answering to the controls) switch everytime the ball is passed to another player sprite.
Note that all player sprites are created on runtime from the same object, and thanks to a function, hey each recieve a unique ID variable on creation ("player00", "player01", etc.).
So on startup, I can differentiate which player is which (and for now, all the controls are attributed to the first player sprite created). How can I use that knowledge to create some kind of "active player" condition and have my coded behaviors separated between the active player and the AI ?
Thanks for your help !