猫史档案馆


多选项传送代码(模型)

用户:幻影游船幻影游船查看:0 回复:1 评论:0 创建时间:2023-06-25T19:23:55


const s = world.querySelector('#传送门');
s.enableInteract = true; // 允许进行互动
s.interactRadius = 5;   // 实体的互动范围
s.interactHint = '传送门'; // 互动提示框显示实体的名称
s.interactColor = new Box3RGBColor(1,0,1);  // 互动提示的文字颜色

s.onInteract(async({entity}) => {
    const a = await entity.player.dialog({
        type: Box3DialogType.SELECT,
        content: `
        你要去哪???
        `,
        options: ['武馆'],
    })
    if (!a || a === null) {
            return;
            } 
    if(a.value == '武馆') {
        entity.position.set(27,13,17);
    }
})


回复

上一页1 页 / 共 1下一页
FexcodeFexcode

awa~

点赞0


评论