猫史档案馆


为什么运行不了(达不到我的效果)

用户:老李头13zl老李头13zl查看:1 回复:2 评论:1 创建时间:2023-02-14T18:12:57


world.onPlayerJoin(({entity, other}) => {
    for(e of world.querySelectorAll('.行李')) {
        e.onEntityContact((entity, other) => {
            if(entity == world.querySelector('.行李') && other == world.querySelector('#吉普车-1')){
                console.log('tick')
                if(Math.round(Math.random()*1)){
                    e.positon.set(32,19,247)
                } else {
                    e.posiotn.set(4,19,244)
                }
            }
        })
    }
})

我想让当

带有标签为行李的碰到了

名字为吉普车-1时

将带有标签为行李的实体

传到指定位置

求解答!!!


回复

上一页1 页 / 共 1下一页
老李头13zl老李头13zl

ddd

点赞0


评论


yh12i31yh12i31

onPlayerJoin没有other

点赞0


评论