猫史档案馆


J_K_Hermione_build白泽

J_K_Hermione_build白泽

Lv.1

仰首望月,风拂鬓,独自凭栏。泪落缓;北斗阑干,兴衰轮换。往事成殇几月霜,枫林黄鹤终得散

获赞:329收藏:144浏览:4607作品收藏:167

签名:在岛3上度假ing~ 基本退社区 徒弟:ZHCEson、李朝睿 看什么看,没有了!

回复帖子评论
上一页5 页 / 共 7下一页

[求助] 怎么实现玩家碰到某个实体时说话? 中回复

对哒

2020-09-24T22:42:29 点赞:0

【代码岛3.0】新账号系统!新皮肤!音效设置界面! 中回复

进不去官网怎么办,吉吉喵

2020-09-25T19:58:44 点赞:0

管喵系统!超详细注释 中回复

赞!

2020-09-26T16:06:09 点赞:0

管喵系统!超详细注释 中回复

emotion_编程猫_点赞

2020-09-27T07:31:04 点赞:0

谁能给我点代码 中回复

var teleportPlayer = ''//定义传送玩家变量 
world.onChat(({entity,message})=>{
     if (message.startsWith('/tp')){//如果以'/tp'开头 
        teleportPlayer = message.slice(4)//这里是四因为要空格 
        world.querySelectorAll('player').forEach((x)=>{//遍历玩家列表 
            if (x.player.name == teleportPlayer){
                entity.position.copy(x.position)//传送 
                world.say('已将'+entity.player.name+'传至'+x.player.name)//提示语
            }
        })
     }
})

2020-10-08T19:29:28 点赞:2

【干货!】box3.0 中回复

第二个,如何写一个装备代码呢?示例,写一个“写代码”的装备:

emotion_编程猫_点赞

world.onPlayerJoin(({ entity }) => {
    if (entity.player.name === "J_K_Hermione_build白泽")
    entity.player.a喵Wearable({
        bodyPart: Box3BodyPart.HEAD,
        mesh: 'mesh/写代码.vb',
        scale: new Box3Vector3(0.5, 0.5, 0.5),//模型大小长宽高都缩小0.5倍
        orientation: new Box3Quaternion(0, 1, 0, 1),//将模型的旋转角度调整
        offset: new Box3Vector3(0, 0.8, 1),//装备的位置,向人背后偏移一些
    });
});

 

2020-10-09T22:41:27 点赞:1

【干货!】box3.0 中回复

第三个,如何蹲下回血?想月球大战里面的一样呢?上代码:

emotion_编程猫_嗨起来

world.onPress(({button,entity},) => {
    //console.log(button)
    if (button == 'crouch') {
        if (entity.hp < entity.maxHp) {
            back = entity.maxHp+50
            //backF(entity,back)
        } else {
            entity.hp = entity.maxHp
        }
    }
})

2020-10-09T22:45:05 点赞:1

【干货!】box3.0 中回复

第四个,简单的上下车代码,但很实用哦~

(可以把雷电猴换成其他的哦)

emotion_编程猫_加油

world.querySelectorAll('#雷电猴-1').forEach((e)=>{
    e.onEntityContact(({entity,other})=>{  
        if(!other.isPlayer){return} 
        other.mesh=entity.mesh;  
        other.meshScale=entity.meshScale; 
        other.meshOrientation = new Box3Quaternion(0, 0, 0, 0);//这段代码没法左右旋转
        other.player.invisible=true;
        world.say(other.player.name+' 你带走了雷电猴') 
        world.say('说我要下车就可以下车了')
    })
})
world.onChat(({message,entity})=>{
    if(message==='我要下车'){
        entity.mesh='';
        entity.player.invisible=false;
        world.say(entity.player.name+'下了车')
    }
})

2020-10-09T22:47:33 点赞:0

【干货!】box3.0 中回复

一定要把回帖顺序改成最早回帖再看~

2020-10-09T22:48:33 点赞:0

【干货!】box3.0 中回复

第五个,PVP代码(大佬不喜勿喷)

emotion_编程猫_点赞

orld.onPlayerJoin(({ entity }) => {
    entity.enableDamage = true;
    entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {
        if (button !== 'action0' || !hitEntity) {
            return;
        }
        if(hitEntity.isPlayer===true){
           hitEntity.velocity.y += 0.5;
        }
        hitEntity.hurt(20 * Math.random() + 5, {
            attacker: entity,
        });
        if(entity.player.name == "J_K_Hermione_build白泽"){//这是外挂
            hitEntity.hurt(9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999, {
                attacker: entity,
            });
        }
    });
});

world.onDie(({ entity, attacker }) => {
    if (attacker) {
        world.say(attacker.player.name + ' 击杀了 ' + entity.player.name)
    }
    entity.player.forceRespawn();
});//pvp代码、

2020-10-09T22:49:39 点赞:0

【干货!】box3.0 中回复

第六个,一个管理员代码,希望大家喜欢:

world.onChat(({ entity, message }) => {
    if (entity && entity.isPlayer) {
        if (entity && 'J_K_Hermione_build白泽'.split(' ').indexOf(entity.player.name) != -1 && message.charAt(0) == '$') {
            try {
                entity.player.directMessage('<~ ' + eval(message.split('$')[1]))
            } catch (err) {
                entity.player.directMessage('Error:' + err)
            }
        };
    }
})

2020-10-09T22:52:09 点赞:0

【干货!】box3.0 中回复

大佬来帮忙吖:我的地图https://box3create.codemao.cn/games/03cf1ff83d99c5f5cae7

2020-10-09T22:57:40 点赞:0

【干货!】box3.0 中回复

顶顶顶

2020-10-10T08:21:00 点赞:0

https://box3create.codemao.cn/games/f692015235729a 中回复

顶顶顶

2020-10-10T09:24:38 点赞:0

来帮忙吧! 中回复

自古沙发归楼主~

2020-10-10T09:25:05 点赞:0

【干货!】box3.0 中回复

有什么需求评论蛤

2020-10-10T11:07:30 点赞:0

找box3师傅 中回复

我来吧

链接我的地图:https://box3create.codemao.cn/games/03cf1ff83d99c5f5cae7

2020-10-10T15:36:01 点赞:0

地图跑酷招大佬! 中回复

来来来

2020-10-10T21:52:51 点赞:0

https://box3create.codemao.cn/games/f692015235729a 中回复

lll

2020-10-10T22:06:24 点赞:0

地图跑酷招大佬! 中回复

lllllllllllllllllll

2020-10-10T22:06:49 点赞:0

【社区公告】近期无法修改个人信息等 中回复

emotion_编程猫_点赞

2020-10-11T13:53:06 点赞:0

装备代码(刀+钻石剑+3级头) 中回复

world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/自制钻石剑.vb',         orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0, -0.3),     }); }); world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/刀.vb',         orientation: new Box3Quaternion(0, 1, -0.5, 0).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0, -0.3),     }); }); world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/三级盔.vb',         orientation: new Box3Quaternion(0, 1, 0, 10).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0.9, 0),     }); });   ​
world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/自制钻石剑.vb',         orientation: new Box3Quaternion(0, 1, 0, 0).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0, -0.3),     }); }); world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/刀.vb',         orientation: new Box3Quaternion(0, 1, -0.5, 0).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0, -0.3),     }); }); world.onPlayerJoin(({ entity }) => {     entity.player.a喵Wearable({         bodyPart: Box3BodyPart.TORSO,         mesh: 'mesh/三级盔.vb',         orientation: new Box3Quaternion(0, 1, 0, 10).rotateY(Math.PI/2),         scale: new Box3Vector3(0.9, 0.9, 0.9),         offset: new Box3Vector3(0, 0.9, 0),     }); });   

2020-10-12T11:33:24 点赞:0

求大佬帮忙写跑酷代码! 中回复

来来来

2020-10-12T11:52:58 点赞:0

3.0招人! 中回复

顶顶顶

2020-10-25T12:24:23 点赞:0

3.0招人! 中回复

Dd,我可以吗

2020-12-06T21:02:43 点赞:0

代号“守护岛3”——吉吉喵拯救计划启动! 中回复

https://box3.codemao.cn/p/edumon?ref=Lfus4aJnv5ysLPtQ

2021-01-01T20:40:55 点赞:0

【鹿の春节图】来!来看看!鹿要年兽皮肤!春节新图招人啦~ 中回复

我可以,建筑和代码都会

2021-01-26T20:33:40 点赞:0

【岛3接龙创作节】神秘城——春节更新 贴1 中回复

黑金DHS:https://box3.codemao.cn/u/EJwtgWHWFL0vARv

2021-01-29T16:36:17 点赞:0

【岛3接龙创作节】神秘城——春节更新 贴1 中回复

地图中有人们经常会收到的伤害,会摔伤,会被烫伤,会被打... 只有小心翼翼,才能找到彩蛋

2021-01-29T18:01:44 点赞:0

求助!奖励200源码币 中回复

求求求

2021-02-07T11:52:30 点赞:0