Move only on sprite

Get help using Construct 2

Post » Tue Oct 16, 2012 4:27 am

So here's my dilemma, I'm wanting to make it so that my character can only move within the constraints of another sprite.

This would mean that once the character intersects with this sprite, it will be confined, and unable to leave it, until I let it.

If anyone could help, I'll have Dumbledore assign 10 points to your house.
Using R238 for all examples
Posts: 363
Reputation: 9,060

Post » Thu Oct 18, 2012 2:50 pm

Professional Game Studios Use "Helpers"

Helpers can be anything you like but generally they are Semi Transparent color coded Box Sprites that have Behaviors attached to them such as "SOLID" etc

If at any time you need to get rid of the Boundary Box Helper...Either destroy it,move it or remove its Behavior..Pretty easy..

On the other hand you can also use Helpers to determine exact Positions of edges and other objects etc..
So that for example in Prince of Persia...A Helper Box is placed on the edge of a cliff and if your Character collides with it or Overlaps the Helper can call animations or any other actions you like before your Character runs off the edge..! Pretty handy for just about any situation you can dream up...

An Example from the Arcade Section shows how to do this...
Example From Scirra Arcade

And the CapX for it is here


Happy Travels !
mystazsea2012-10-18 14:55:49
When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 will save your life.:)
Posts: 288
Reputation: 7,135

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 0 guests