猫史档案馆


谁来合作地图

用户:李子2893李子2893查看:43 回复:7 评论:43 创建时间:2021-07-27T12:06:30


喵战28地图已建好,代码还没修改,谁会改代码,我把链接发给他。


回复

上一页1 页 / 共 1下一页
李子2893李子2893

还有,谁能修改一局的长度

点赞0


评论


蔡宁进(大家再见)蔡宁进(大家再见)

定位

点赞0


评论


追梦喵aowC追梦喵aowC

https://box3.fun/e/55c669fcd22d87ce4d8c

点赞0


评论


李子2893李子2893

https://box3.fun/e/6e9ac6d59de653fef014?p=jnK5hTwx0YDvUyPZSd4QRLL2sHbQ0GiGVSfAra%2BaVgA67LkXHGLwt                                    j                           b                  250cmlidXRvcg%3D%3D

点赞0


评论


李子2893李子2893

world.onPlayerJoin(({entity}) => {     entity.player.spawnPoint.set(72,10,喵)     entity.player.forceRespawn()     entity.enableDamage = true })



for (const e of world.querySelectorAll('*')) {//遍历所有实体     if (e.id.startsWith('存档点')) {//如果当前实体名左边部分刚好是"存档点", 比如 存档点-1 存档点-2...         e.collides = true //开启碰撞         e.fixed = true //固定实体不被推移         e.onEntityContact(({ other }) => { //每当存档点碰到另一个实体             if (other.isPlayer) { //另一个实体是玩家                 if (e.position.x !== other.player.spawnPoint.x && e.position.z !== other.player.spawnPoint.z) { // 检测当前存档点是否玩家重生点, 避免反复在同一个存档点做多余的保存                     if (other.hp < other.maxHp) {                          other.hp += 20;                         other.player.directMessage('到达新的存档点,血量加20点');                     }                     other.player.directMessage('到达新的重生点,已保存当前位置') ;// 给玩家发消息                     other.player.spawnPoint.set(e.position.x,e.position.y+5,e.position.z); //                  }                 else{                     other.player.directMessage('已经到过该存档点了'); // 给玩家发消息                 }             }         })     } }

 

world.onVoxelContact(({ entity, voxel }) => {     if (!entity.isPlayer) return;                 // 如果碰到方块的不是玩家,则跳过     const voxelName = voxels.name(voxel);         // 将方块id转换名称     if (voxelName === 'water'){         entity.hurt(100);     }     if (voxelName === 'carpet_08'){            world.say(`${entity.player.name}到达了终点!`);         entity.player.spectator = true         entity.player.emissive = 0.5;         entity.player.dialog({             title:'系统',             content:`${entity.player.name},恭喜你到达了终点!获得了飞行能力!`,         })     } });

 

world.onDie(async({entity}) => {     if(!entity.isPlayer) return;     for (let i = 5;i>0;i--){         entity.player.directMessage(`${i}秒后复活`)         await sleep(1000)     }     entity.player.forceRespawn() })

点赞0


评论


lizierlizier

azcode1207946ws

dcrf

点赞0


评论


李子2893李子2893

有没有人会代码啊

点赞0


评论