用户:
星星上的雪花查看:664 回复:7 评论:14 创建时间:2021-08-06T19:07:23
我先定义一个叫 Print 的异步函数:
async function Print (entity,main,time,tit){
if((typeof time) == 'undefined'){
time = 0.2;
};
if((typeof tit) == 'undefined'){
tit = null;
};
mes = "";
for(let i = 0;i < main.length;i ++){
mes = String(mes + main[i]);
entity.player.dialog({
type:'text',
content:mes,
title:tit,
});
await sleep(time * 1000);
entity.player.cancelDialogs();
};
await entity.player.dialog({
type:'select',
content:main,
title:tit,
});
};
具体要这么调用:
//当玩家进入地图时调起打字机对话框
world.onPlayerJoin(async function({entity}){ //async - 必填
await Print( //await - 必填,否则画面很壮观
entity,
`你好,${entity.player.name}。`, //对话具体的内容
0.1, //选填 - 打字速度,数值越小越快
'标题' //选填 - 不填则不显示
);
await Print( //同上
entity,
`你刚来到${world.projectName},对吧?`,
0.1,
);
});
下次想看什么代码跟我说。
我在B站:https://space.bilibili.com/543820024
YDS尹子能载人能转弯的公交车()()
点赞1
评论
......
载人可以,拐弯我会试试的
你看这个效果如何? https://box3.codemao.cn/e/4cd5ed5f00acd1f5174a
???做出来了???
哦我懂了你这个是将玩家传送到公交车的位置)
我是想能不能这样载人)https://box3.codemao.cn/g/17489 我这个转不了弯,就想问问有没有办法可以转弯)
多个模型拼接的啊...但每次只能转90度或180度,否则公交车会裂开
试试拆得更细一点
爱探险的可乐呀这个打字机是有bug的 看我这个教程: shequ.codemao.cn/community/379946
点赞0
评论
e,具体是什么特性能说一下吗?
不是特性是bug!!! 调用的时候会有乱码
啊,我没遇到过啊,长什么样?
乱码长什么样