猫史档案馆


帮忙看看有啥问题

用户:孤僻的疾电猴XDlD孤僻的疾电猴XDlD查看:112 回复:6 评论:10 创建时间:2023-02-05T13:54:01


center_image


回复

上一页第 1 页 / 共 1 页下一页
黑客熊猫黑客熊猫

有报错吗?发个来看看

 

点赞0


评论

没有a


双鱼冬寒双鱼冬寒

eee...很简单的

如果你想加入hasArrow的效果

你不能在textDialog(懒得打)下面加

你要在textDialog这个函数中加

比如这样:

async function textDialog (entity, content, title, hasArrow) {//可以不加async
    return entity.player.dialog({
        type: Box3Dialog.TEXT,
        content,
        title,
        hasArrow: true//开启
    })
}

点赞1


评论

懂了吗? 很简单

a... 第三行: type: Box3Dialog.TEXT, 打错了,是 type: Box3DialogType.TEXT

懂了,谢谢

但是为什么还是不运行?


双鱼冬寒双鱼冬寒

顺便再打一些代码:

async function selectDialog(entity, content, options, title) {
    return await entity.player.dialog({
        type: Box3DialogType.SELECT,
        content,
        options,
        title,
    })
}

//用法:selectDialog(entity, 'content', ['options1','options2'], 'title')

   

点赞0


评论


双鱼冬寒双鱼冬寒

再打一些:

async function inputDialog(entity, content, title) {
    return await entity.player.dialog({
        type: Box3DialogType.INPUT,
        content,
        title,
    })
}

//用法:inputDialog(entity, 'content', 'title')
//这是输入形式的!!!(input)

点赞0


评论


双鱼冬寒双鱼冬寒

eee...

你这里好像还没有包装textDialog()这个函数吧??

没有包装你运行个啥啊??

要加上的!

不然会抱错emotion_编程猫_搓头

点赞1


评论


tiger666250tiger666250

话说hasArrow啥效果啊()

点赞0


评论

标头啊,大屑

虽然但是,这个人加hasArrow的方法也很离谱

有箭头)

...我是新手

啊这()