Keeping two players on the screen

Get help using Construct 2

Post » Sun Jul 21, 2013 6:44 am

So I have a nice game coming along, it's a platformer with local multi-player. The controls and events are all set up and it runs perfectly. Currently I have it set to scroll to both players, and when one player leaves the screen, they are teleported to the other player. It works, but I'd rather have them be unable to leave the screen at all. Like in the New Super Mario games.

I want them to just get stuck at the edge of the screen rather than be able to leave it. Any suggestions? Otherwise I might just go with Player 2 having no camera influence.
Posts: 7
Reputation: 241

Post » Sun Jul 21, 2013 7:22 am

You could use the distance() function to evaluate how far the two players are from each other and then limit their ability to move in a direction which would increase that distance.
Posts: 347
Reputation: 4,451

Return to How do I....?

Who is online

Users browsing this forum: BlueGuy3, ColombageEnPLS, FlyingRam, pynam, Yahoo [Bot] and 6 guests