
Lv.1
一个住在box3的屑一勺小汤,已经退岛退喵
在 求BOX3简易电梯代码!!!不用门的,有金币!! 中回复
async function openDoor(theDoor){
world.querySelectorAll(theDoor).forEach(async(door)=>{
for(door.time=0;door.time<31;door.time++){
door.position.x -= 0.1;
await sleep(50);
}
await sleep(5000);
for(door.time=0;door.time<31;door.time++){
door.position.x += 0.1;
await sleep(50);
}
})
}2020-10-07T17:54:07 点赞:0
在 【代码帮助】各位岛民如何存档啊! 中回复
挖坟
//存档点代码
const checkPoint = {};
world.querySelectorAll('.存档点').forEach((e)=>e.onEntityContact(({entity, other}) => {
if (other.isPlayer) {
checkPoint[other.player.name] = entity.position;
other.player.directMessage("存档成功!");
}
}));
//传送点代码
world.querySelectorAll('.还原点').forEach((e) => e.onEntityContact(({entity, other}) => {
if (other.isPlayer && other.player.name in checkPoint) {
other.position.copy(checkPoint[other.player.name]);
other.position.y += 5;
}
}));2020-10-16T13:15:50 点赞:0
在 求助!怎么让代码岛3.0的模型动起来(比如电梯、汽车) 中回复
world.querySelectorAll('.planez-').forEach(async(e)=>{//将一个实体的标签改一下改成planez-就可以了
var v=0.3;//速度 挑一个地方就够了
while(true){
e.position.z-=v;
if(e.position.z<0){
e.position.z=128
}
await sleep(10)
}
})2020-10-17T17:55:33 点赞:0