猫史档案馆


怎么碰到一个模型就能让玩家飞呢?

用户:柯基旺柯基旺查看:1 回复:4 评论:1 创建时间:2022-12-29T16:46:01


像一起跑酷里的那样,求!emotion_编程猫_伤心


回复

上一页1 页 / 共 1下一页
raearaea

for (const e of world.querySelectorAll('*')) {
    if (e.id.startsWith('终点')) {
        e.onEntityContact(({ other }) => { 
            if (other.isPlayer) { 
                world.say(`玩家 ${other.player.name} 到达了终点,获得飞行能力!`)
                other.player.canFly = true
            }
        })
    }
}

点赞1


评论


TAM无敌TAM无敌

。。。。。。。。。。。

点赞0


评论


一方China一方China

print("这都不会?")

点赞0


评论


噜啦嘞噜啦嘞噜啦噜啦嘞噜啦噜啦噜啦嘞噜啦嘞噜啦嘞噜啦噜啦嘞噜啦噜啦噜啦嘞

world.onEntityContact(({entity,other})=>{      if(entity.hasTag('模型标签的名字')){         other.player.canFly=true         other.player.directMessage('获得飞行')     } })

 

点赞1


评论