
Lv.1
没错,花切把号回收了
在 【教程】特效对话框 中回复
world.onPlayerJoin(({ entity }) => {
entity.player.dhk('给个关注怕趴~~~',1000,true)
})
举个例子
2023-02-25T07:16:58 点赞:0
在 【教程】特效对话框 中回复
world.onPlayerJoin(({ entity }) => {
entity.player.dhk('给个关注怕趴~~~/*内容*/',1000/*时间*/,true/*开启光标*/)
})
2023-02-25T07:20:05 点赞:2
在 【教程】特效对话框 中回复
var 喵 = world.querySelector('#名字');
喵.enableInteract = true;
喵.interactHint = '名字'; //显示
喵.interactRadius = 1; //距离
world.onInteract( ({entity, targetEntity}) => {
entity.player.dhk('给个关注怕趴~~~',1000,true)
});2023-02-25T07:55:26 点赞:0
在 【教程】密码锁 中回复
纠正)
world.querySelectorAll('*').forEach(async (e)=>{// 扫遍所有模型
if (e.id == '阿巴阿巴'){// 模型id名字
e.enableInteract = true;
e.interactRadius = 2;
e.interactHint = '阿巴阿巴';// 题目
e.onInteract(async ({ entity }) =>{
const password = await entity.player.dialog({
type : Box3DialogType.INPUT,// 对话框形式
content : '请输入暗号~', // 内容
title : '阿巴巴巴阿巴', // 题目
confirmText : '确定', // 输入框提示文本
placeholder : '6', // 按钮文本
})
if (!password || password === null) return;// 按叉不会报错)
if (String(password) == '114514'){// 填密码
entity.player.directMessage('啊对对对');
entity.position.set(26, 46, 10)// 答对之后position.set哪里
} else {
entity.player.directMessage('啊错错错')// 给玩家私发消息
}
})
};
})
2023-02-26T07:58:10 点赞:0