用户:
Coms查看:618 回复:14 评论:27 创建时间:2023-02-25T06:38:34
awa,好久没出教程力)今天就水一期~)
咋做出一个好看的对话框呢)代码如下)()
---------------------------------------------------------------------------------------------防窥线(---------------------------------------------------------------------------------------------
console.clear()
/* 定义对话框 */
Box喵layer.prototype.dhk = function(content,time,hasarrow,property = {}){
const interval = time / content.length;
for(let i = 0;i < content.length;i++){
const result = this.dialog(Object.assign(property,{
type: Box3DialogType.TEXT,// 对话框类型,也可以试试选择对话框Box3DialogType.SEL
content: content.substring(0,i + 1),
hasArrow: hasarrow// 开启光标
}))
if(i < content.length - 1){
setTimeout(result.cancel,interval * (i + 1));
}
}
}
问题来了)怎么使用能()用player.dhk就可以力()
没有了
随便透露一下新坑~~~(bushi)

无敌版滑稽战神嗦实话(((真没看懂(((
点赞0
评论
?鹅鹅鹅,用player.dhk不就行了吗
我只会模型Q益Q(((是把player.dhk加在代码前面吗(((
不是...这个是触发...
要我举个例子吗
意思就是说把这个代码写下来,然后触发的时候就写下player.dhk()就行了嘛(((
看顶置
对了。好像在空岛见过你)
哪个空岛???(紧张
空岛战争啊()
没见过(((等等,那我当时开挂没有?我怕我被盗号(((
Comsworld.onPlayerJoin(({ entity }) => {
entity.player.dhk('给个关注怕趴~~~',1000,true)
})
举个例子
点赞0
评论
羽毛~~~~
雷电猴~
你发个链接然后再删除,我进来看看
羽毛~
花鸡~
Comsworld.onPlayerJoin(({ entity }) => {
entity.player.dhk('给个关注怕趴~~~/*内容*/',1000/*时间*/,true/*开启光标*/)
})
点赞2
评论
Comsvar 喵 = world.querySelector('#名字');
喵.enableInteract = true;
喵.interactHint = '名字'; //显示
喵.interactRadius = 1; //距离
world.onInteract( ({entity, targetEntity}) => {
entity.player.dhk('给个关注怕趴~~~',1000,true)
});点赞0
评论
记得把上面的代码也抄下来
鸡你太美覆盖的是NPC吗?
是的