Hello! Thanks in advance.! I already made my main player to walk, run and jump (as Mario) and i want 2 things:
1. Another 4 character to follow the main player
2. Starting with the main player after he died, I want to control the movement of the second player, after second died I control the next one and so on.... For example is like having 5 Mario walking together one behind another after each one died I can control the next one.
Need help with that ... Please I will be appreciate it
Develop games in your browser. Powerful, performant & highly capable.
I would try giving them some instance variable which relates to who is in control.
give them numbers 1 to 4.
have a variable indicating who currently is active
When picking the active player for control use: pick playerobject where playerobject.playernumber = activeplayer
when that player dies, subtract 1 from activeplayer.