Is there a way to detect different kinds of obstacles (like ladders?) or a way to set backdrops to "Obstacle type 1" and "Obstacle type 2".
Printable View
Is there a way to detect different kinds of obstacles (like ladders?) or a way to set backdrops to "Obstacle type 1" and "Obstacle type 2".
There isn't... but there is a way to distinguish between different obstacles, and that is to have them on different layers.
You'll also need detection objects on these layers that are always set to the position of your main detection object - this is because objects don't collide with each other across layers.
Very cool, thanks.
You could also use groups I think ie
group 1 collides with group 2 as an event.
You can detect different kinds of obstacle using the CollisionMask(x,y) expression. It will return 1 if there is an obstacle at the position you specify, and 2 if there's a ladder there.