用户:
Coms查看:5 回复:8 评论:5 创建时间:2023-05-02T17:27:23
啊哈哈()
水贴时间!!!()
首先先在地图放个模型~()

然后)就上代码啦~![]()
ohhhh
var npc = world.querySelector('#可爱的羽毛棒棒哒~');// 模型id啦~~~
npc.enableInteract = true;// 允许互动啦~
npc.interactHint = npc.id;// ohh这个你懂的(确信)
npc.interactRadius = 2;
npc.onInteract(async ({entity}) => {
const result = await entity.player.dialog({// 弹出对话框啦~
contentTextColor: [0, 1, 0, 1],// 颜色
contentBackgroundColor: [0, 0, 0, 1],// 颜色
titleTextColor: [0, 1, 0, 1],// 这些是颜色~我懒得写啦~()(懒癌)
titleBackgroundColor: [0, 0, 0, 1],// 颜色
type: Box3DialogType.SELECT,// ohh对话框形式~()这里是选择框~~~()
title: npc.id,// 题目是模型滴id鸭()~
lookTarget:npc,// 说话时看着模型~
options: ['我要说话!'],// 按钮内容~
});
if (result.index === 0){
const result114514 = await entity.player.dialog({ // ohh
contentTextColor: [0, 1, 0, 1],
contentBackgroundColor: [0, 0, 0, 1],
titleTextColor: [0, 1, 0, 1],// 颜色啦~
titleBackgroundColor: [0, 0, 0, 1],
type: Box3DialogType.INPUT,// 这个是创建阿巴阿巴框()你懂的()
title: '羽毛',// 题目啦~
confirmText : 'turn✔'
});
if (result114514){
world.say(`${entity.player.name}:${result114514}`)// 内容aa~
entity.player.dialog({// 弹出对话框~()
contentTextColor: [0, 1, 0, 1],
contentBackgroundColor: [0, 0, 0, 1],
titleTextColor: [0, 1, 0, 1],// 颜色~拉
titleBackgroundColor: [0, 0, 0, 1],
hasArrow: true,
type:Box3DialogType.TEXT,
title:'羽毛',
content:(`你的消息:${result114514}\n成功world.say!`),
})
}
}
});
Dr0pp3r各位蟀哥,霉女,富佬,翔擒们,https://shequ.codemao.cn/work/185331175是石炭Carbonium工作室推出的FPS练习游戏,由多名创作者联合制作,灵感来源于Steam著名练习游戏《Aimlab》(如果您认为该宣传影响到了您,可以删除并在作品下方反馈,我们将不断改进)
点赞0
评论