用户:
烤乳鸽RoastedSquab查看:34 回复:9 评论:34 创建时间:2020-06-22T18:12:38
没什么要求,把题做对就行——————————————————————————————————————
world.querySelectorAll(".彩蛋").forEach(e=>{
e.onEntityContact(({entity,other})=>{
if(!other.isPlayer){return}
other.player.invisible=true;
world.say(entity.player.name+'找到了彩蛋,获得隐身buff') })})
为什么可以隐身而不能说“用户名+找到了彩蛋,获得隐身buff”
Vicent轩我猜会报错的原因是:entity not found
所以我认为应该把 world.say(entity.player.name+'找到了彩蛋,获得隐身buff') })})
改成world.say(other.player.name+'找到了彩蛋,获得隐身buff') })})
点赞1
评论
我阔以
顺便收了代码
应该这样改:
world.querySelectorAll(".走你").forEach(e=>{e.onEntityContact(({entity,other})=>{
if(!other.isPlayer){return}
other.player.invisible=true;
world.say(other.player.name+'找到了彩蛋,获得隐身buff') })})
点赞0
评论