用户:
中國萬歲_青铁迷查看:6 回复:7 评论:6 创建时间:2020-08-16T20:40:29
教教我怎么做一个电梯(代码岛2.0 代码岛3.0都行)
async_functionworld.querySelectorAll('.自定义标签').forEach((e) => {
e.onEntityContact(({ entity, other }) => {
if (!other.isPlayer) { return }
other.position.set(1,1,1)//自定义,X/Y/Z坐标
})
})点赞0
评论
七式草莓world.querySelectorAll('.高铁站电梯').forEach(asyn喵c(t)=>{
//把喵删掉
while(true){
await sleep(5000);
for(t.time=0;t.time<500;t.time++){
t.position.y += 0.1;
await sleep(25);
}
await sleep(5000);
for(t.time=0;t.time<500;t.time++){
t.position.y -= 0.1;
await sleep(25);
}
}
})点赞0
评论
七式草莓玩家查询系统:
//把喵删掉
world.querySelectorAll(".findAdmin").forEach((finder) => {
finder.enableInteract = true;
finder.interactRadius = 8;
finder.interactHint = "玩家查找器";
finder.interactColor = new Box3RGBColor(1, 1, 1);
finder.onInteract(asyn喵c ({ entity }) => {
const result = await entity.player.dialog({
title: '系统',
type: Box3DialogType.INPUT,
content: `全局玩家查询系统开启,你要查询哪个玩家?`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
placeholder: '请输入玩家名',
confirmText: '确认',
})
const findee = world.querySelector("." + result);
const resu=await entity.player.dialog({
title: '系统',
type: Box3DialogType.SELECT,
content: `找到玩家${findee.player.name}`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
lookEye: entity,
lookEyeOffset: new Box3Vector3(0, 30, 0),
lookTarget: findee,
options:["到他那里去","知道了"],
})
if(resu.index==0){
entity.position.set(findee.position.x,findee.position.y+2,findee.position.z)
}
findee.player.dialog({
title: '系统',
type: Box3DialogType.TEXT,
content: `你被${entity.player.name}查询了`,
titleBackgroundColor: new Box3RGBAColor(0.968, 0.702, 0.392, 1),
})
})
})点赞0
评论