用户:
神岛吉吉喵查看:27 回复:45 评论:27 创建时间:2021-01-19T15:07:07

话不多说
上干货
https://www.bilibili.com/video/BV1ph411y7ds
代码如下:
console.clear()
var door = world.querySelector('#门')
door.enableInteract = true
door.interactRadius = 2.5
door.onInteract(({ entity }) => {
entity.player.link('https://box3.codemao.cn/p/6a4e57e1f91817445b21')
})
player.link里的是要传送的地图的地址
这里喵喵用了entiy.onInteract的API
所以按E就可以执行传送
但是你们可以用其他的方式哦
比如发送一串字符传送等等
还等你来发掘~

加入代码岛3.0官方内测Q喵
下面的二维码会扫出来什么呢?( =•ω•= )m

//发送字符传送代码
world.onChat(({entity, message})=>{
if (entity && entity.isPlayer && message=='去未来战争') {
entity.player.link('https://box3.cod喵/e/9049ce811b77e5c610af')
}
})点赞1
评论
SKQA吉吉喵看看这个bug
https://shequ.codemao.cn/community/358227
快点修复!
还有这个我很早就发的
https://shequ.codemao.cn/community/352611
点赞0
评论