Create, Compete & Win at Redbrick Connect 2024! 🎉
SnippetMaking a stepping stone that disappears when you step on it

Making a stepping stone that disappears when you step on it

Place objects wherever you want

Create a stepping stones and rename the title of the stones that should disappear.


Put Stepping Stones
🚫

Don’t forget to check Body in the object’s properties panel to use methods like onCollide!

Physics -> Body

Code

const falseboxes = [];
for (let i = 0; i < 5; i++) {
  falseboxes[i] = WORLD.getObject("falsebox_" + i);
}
 
function Start() {
  falseboxes.forEach((box) => {
    box.onCollide(PLAYER, () => {
      box.kill();
      setTimeout(() => {
        box.revive();
      }, 1000);
    });
  });
}

Result