Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Hi, i have a box like obstacle in my game, but i want that the player collision with the left side of box lose, but if collision on top or any side, the game continues.
How can i do that??
I would suggest maybe create a sprite and pin it to the side of your rectangle where you want the collision to occur for you to lose. Make this sprite invisible. Then if your player collides with this invisible sprite, set your actions for your player.
Is a good idea, but the problem is that i have many boxes, but that boxes have the same properties.
Develop games in your browser. Powerful, performant & highly capable.
Maybe this could help you with that
you could also look at the relative x (&y) coordinates of the two colliding sprites and make a decision on these
You could use 'overlapping at offset' if player and box both are solid.
Player Is overlapping Box at offset(1,0) -> die
You might even be able to use the bounding box edges for checking, depending on the way you have set things up..