Create a stepping stone that breaks when stepped on it
Place objects wherever you want
Create a stepping stones and rename the title of the stones that should disappear.
๐ซ
Donโt forget to check Body in the objectโs properties panel to use methods
like onCollide
!
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