Lv.1
在 【阴间代码出售】如何将玩家变成宠物(强制跟随)(doge) 中回复
world.onChat(({entity,message})=>{
if(message.startsWith('pet')){
for(const e of world.querySelectorAll('player')){
if(e.player.name == message.slice(3)){
entity.position=e.position;
}
}
}
}
})2022-08-10T14:10:51 点赞:0
在 【Box3科普帖】满满的干货及喵代码,快来看看 中回复
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "BOSS不爱吃鱼的小鱼") {x.player.canFly = true}});2022-08-13T12:23:24 点赞:0
在 玩家怎么发射子弹,火球,炮弹之类的实体教程 中回复
world.onPress(({ button, entity, raycast }) => { if(button ==='action0'){ console.log(` ${entity.player.name} 按下了左键`); var ball = spawnEntity(entity.position.x+raycast.direction.x, entity.position.y+raycast.direction.y, entity.position.z+raycast.direction.z,"mesh/火球.vb"); ball.velocity.x += raycast.direction.x*3; ball.velocity.y += raycast.direction.y*3; ball.velocity.z += raycast.direction.z*3; } })2022-08-16T14:37:56 点赞:0