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.
B
3
S
1
Posts: 7
Reputation: 391

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.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, marcinkowski and 27 guests