
Lv.1
萌新一枚
在 [喵] 萌新也能做PVP地图了? 中回复
;((args)=>{world.onPlayerJoin(({entity})=>{entity.enableDamage=true});world.onPress(({entity,button,raycast:{hitEntity,direction}})=>{if(button!=='action0'||!hitEntity||!hitEntity.isPlayer)return;if(args[0]){direction.x*=args[1];direction.y*=args[1];direction.z*=args[1];hitEntity.velocity=direction}if(args[2]){hitEntity.hurt(args[5],{attacker:entity})}else{hitEntity.hurt(args[5])}if(args[3]){hitEntity.player.directMessage(args[4].replace("@1",entity.player.name).replace("@2",args[5]))}})})([false,1,true,true,"你受到 @1 的攻击 (HP-@2)","50"]);2021-12-03T23:18:58 点赞:0
在 怎么加上这段代码就报错:ReferenceError:entity is not defined 中回复
改
function e(entity){
if(entity == "npc"){
}
}
这样就不会报错啦
但是没法运行
2021-12-11T07:52:35 点赞:0
在 【岛3圣诞创作节】圣诞围城 中回复
imgsrc="https://static.cod喵/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E6%90%93%E5%A4%B4.gif"alt="emotion_编程猫_搓头"
2021-12-12T08:00:35 点赞:0
在 为什么我的帖子发不了表情包 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E5%8A%A0%E6%B2%B9.gif"alt="emotion_编程猫_加油"
2022-01-23T18:46:21 点赞:0