猫史档案馆


飞行代码 的教程

用户:魔以侵心魔以侵心查看:13 回复:10 评论:13 创建时间:2020-04-24T23:17:00


教教我吧谢谢了救我谢谢

 


回复

上一页1 页 / 共 1下一页
Alex79Alex79

如果让玩家碰到一个实体会飞

world.querySelectorAll('.实体标签').forEach((e)=>{
      e.onEntityContact(({entity,other})=>{
          other.player.canFly = true;
      })
})

点赞0


评论


Alex79Alex79

如果让玩家开飞机

world.querySelectorAll('.飞机').forEach((e)=>{
      e.onEntityContact(({entity,other})=>{
         if(!other.isPlayer){return}
         other.mesh=entity.mesh;
         other.meshScale=entity.meshScale;
         other.player.invisible=true;
         other.player.canFly = true;
      })
})

点赞0


评论


Alex79Alex79

总之canFly表示飞行,true就是真,false就是假

点赞0


评论


Alex79Alex79

other.player代表另一个玩家

点赞0


评论


魔以侵心魔以侵心

高手就是我想要恢复原型的人怎么办

点赞0


评论


未命名用户015734未命名用户015734

岛三有一个模块entity.player,很多单玩家(自己)的代码都依靠它执行 如果要飞起来的话应该就是 entity.player.canFly = true 某澜JS不是懂太多,应该是这样的哈

点赞0


评论


吴宗安吴宗安

都不能用

 

点赞0


评论


Alex79Alex79

碰到一个实体喵家的皮肤恢复的代码:

world.querySelectorAll('.模型标签').forEach((e)=>{
    e.onEntityContact(({entity,other})=>{
        other.mesh = ""
        other.player.invisible=false;
    })
})

mesh代表了玩家的皮肤,mesh = ""就会喵家变回原样

点赞0


评论


Alex79Alex79

【Box3超级干货帖】输入玩家姓名将其关监狱功能怎么做!

https://shequ.codemao.cn/community/293600

点赞0


评论


Alex79Alex79

 输入玩家姓名将其关监狱功能简化方法!!!

https://shequ.codemao.cn/community/294552

点赞0


评论