
Lv.1
亲爱的旅长,原三好玩吗?
在 谁能告诉我到了新一个存档点存档的代码 中回复
我告诉你一个方便一点的
for (const e of world.querySelectorAll('*')) {
if (e.id.startsWith('存档点')) {//便利所有存档点
e.meshScale = e.meshScale.scale(1)
e.onEntityContact(({ other }) => { //当实体被碰撞
if (other.isPlayer) { //如果另一个实体是玩家
if (e.position !== other.player.spawnPoint) {
other.player.directMessage('存档成功')
other.player.spawnPoint = e.position
}
}
})
}
}
//这个很方便,只要这一行无论放几个存档点都可以正常存档2022-06-10T12:42:34 点赞:0
在 怎么碰到‘water’就回到最新的存档点 中回复
world.onPlayerJoin(({ entity }) => {
entity.player.scale = 0.7;
entity.onFluidEnter(() => {
entity.position.y += 2;
entity.position.copy(entity.player.spawnPoint)
entity.player.directMessage('你洗了')
})
})
//这个我也不太理解()
//反正可以用就是了
//别的液体也可以用()2022-06-10T18:36:36 点赞:0
在 求助!!! 中回复
const npc3904 = world.querySelector('#sans-1');//如果模型是sans这里以sans模型为例
npc3904.enableInteract = true;//开启互动
npc3904.interactRadius = 6;//距离为六
npc3904.onInteract(async ({ entity }) => {
const result = await entity.player.dialog({
type: Box3DialogType.SELECT,
title: "监狱",//题目
content: `监狱看守`,//内容
options: ['自首'],//选项
});
entity.position.set(131, 11, 106)//传送
}
);
就这样,坐标可以改
2022-06-10T19:03:01 点赞:0