Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

This would depend on a lot of factors - what engine you are using, how you set up the controls, etc. Regardless, you'll need to have some kind of "switching" mechanism - an action the player can take to perform the switch (examples: press the space bar, click a button on the HUD, maneuver the character to perform an in game action, etc). Whatever this "switch" is should kick off an event that perform the control switch. One easy way to do this would involve swapping a Boolean flag (eg: isPlayerOneMoving = not isPlayerOneMoving), then use that Boolean to control what each controller inputs does.

Example: 

OnSpaceBar_Pressed():

     if (isPlayerOneMoving):
            PlayerOne.jump()

     else:
            PlayerTwo.jump()

unity engine, sometimes from 3d walking to 2d but for jam, I don't know how to do between two characters ...