Hi.
I am working on a game prototype (platformer) that can be player in 2, 3 or 4 players.
You can control the player using arrow keys and you can switch from one to the other by pressing a button.
I've manage to create the mechanics but I don't know how to do this:
When a player is destroyed I want to automatically switch to the one that is alive.
This is my attempt:
https://www.dropbox.com/scl/fi/lbuvfddypikn9zf19vz04/PlayerSwitchExample_01.c3p?rlkey=a1p91o9zyd8l35fvf3jj0y4ye&dl=0
will this work?
yea and repeat the last 2 events for the other players
i added 3 booleans that way the deaths of each player can be detected:
tell me if this works and if u need further help
Develop games in your browser. Powerful, performant & highly capable.
no it didnt work
i dont know why it didnt work
A mega-ultra-hyper-super simple and easy solution. Check it out: fileport.io/hQQWgUWHbv9H
Thanks a lot!
I'm sorry for asking to much, but could you create an example by using global variables or/and instance variables? (player.count?).
Arrays/dictionaries are complicated for me and I am trying to keep my code simple to understand for me (even if there are more events involved). :)
No arrays/dictionaries. Only global/instance variables. A more basic logic. Still few events.
Check it: fileport.io/nQzNp85tmPKd
I appreciate your support and the time you took to help me!