How do should I bound a player to an area?

Get help using Construct 2

Post » Sun Nov 10, 2013 3:51 am

I was wondering when bounding a character, if my layout extents the bounds of my character then is there a way to bound the character to a certain area or should I use invisible walls?
B
7
Posts: 10
Reputation: 373

Post » Tue Nov 12, 2013 1:37 pm

The easiest way is set a invisible sprite with the collision box covering all the desired area, then, check if the player is overlapping this area, if not, set the Player to a specific location.

The exception can vary, like disabling the control of the player if he go out the area, or, roll him back to the area, etc.
Image
B
108
S
24
G
18
Posts: 1,372
Reputation: 22,817

Post » Fri Nov 15, 2013 1:49 am

Thankyou, I have an invisible block now keeping my player in bounds
B
7
Posts: 10
Reputation: 373


Return to How do I....?

Who is online

Users browsing this forum: Wartexnik and 11 guests