猫史档案馆


AK亨利佐加DanJamesThomas

AK亨利佐加DanJamesThomas

Lv.1

本号是由本人和另个人(QZ亨利佐Yahoo!或DanJamesThomas)用的

获赞:18收藏:2浏览:124作品收藏:1

签名:给我点赞的猴子是我儿 孙 曾孙 重孙。。。。(省略无数个后代) 有问题的话可以联系吉吉喵的qq3097819563

回复帖子评论
上一页6 页 / 共 9下一页

用岛三拍三体,这是计划的一部分 中回复

加我一个,老朋友了,都知道我是啥德行emotion_编程猫_翻白眼

2023-02-19T19:09:48 点赞:0

问一下,如何确定一个实体离一个玩家最近? 中回复

顶啊

2023-02-19T19:34:43 点赞:0

【box3】玩家轨迹录制 中回复

world.onPlayerJoin(async ({ entity }) => {
    entity.player.locus_x = [];
    entity.player.locus_y = [];
    entity.player.locus_z = [];
});

world.onPress(async ({ button, entity }) => {
    if (button == 'action1') {
        let menus = await entity.player.dialog({
            type: Box3DialogType.SELECT,
            content: `菜单`,
            options: ['轨迹录制']
        });
        if (!menus) return;
        if (menus) {
            if (menus.value == '轨迹录制') {
                entity.player.locus_x = [];
                entity.player.locus_y = [];
                entity.player.locus_z = [];
                let locus = await entity.player.dialog({
                    type: Box3DialogType.SELECT,
                    content: `是否录制\n(录制时可能会发生卡顿)`,
                    options: ['是', '否']
                });
                if (!locus) return;
                if (locus) {
                    if (locus.value == '是') {
                        entity.player.locus_x = [];
                        entity.player.locus_y = [];
                        entity.player.locus_z = [];
                        let times = await entity.player.dialog({
                            type: Box3DialogType.INPUT,
                            content: "请输入录制时间(单位:秒)\n(录制时间不能超过120秒且不能少于15秒)",
                            placeholder: "时间(单位:秒)",
                            confirmText: "确认"
                        });
                        if (!times) return;
                        if (times >= 15 && times <= 120) {
                            await locus_start(entity, times);
                        } else if (times > 120) {
                            entity.player.dialog({
                                type: Box3DialogType.TEXT,
                                content: `录制时间过长`,
                            });
                        } else if (times < 15) {
                            entity.player.dialog({
                                type: Box3DialogType.TEXT,
                                content: `录制时间过短`,
                            });
                        }
                    } else return;
                };
            };
        };
    };
});

async function locus_start(entity, time) {
    entity.player.cancelDialogs();
    let i = 0;
    while (i++ <= time * (1000 / 10)) {
        entity.player.locus_x.push(entity.position.x);
        entity.player.locus_y.push(entity.position.y);
        entity.player.locus_z.push(entity.position.z);
        if (i % 10 == 0) {//性能好就加这个if
            entity.player.directMessage(`轨迹录制进度:\n${i / 100}秒/${time * (1000 / 10) / 100}秒`)
        };
        await sleep(10);
    };
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        content: `轨迹录制完毕\n5秒后播放`,
    });
    await sleep(1000 * 5)
    entity.player.cancelDialogs();
    var e = world.createEntity({
        position: [entity.player.locus_x[0], entity.player.locus_y[0], entity.player.locus_z[0]],
        mesh: 'mesh/吉吉喵.vb',
        gravity: false,
        fixed: false,
        collides: false,
        scale: new Box3Vector3(1 / 32, 1 / 32, 1 / 32)
    });
    entity.player.cameraEntity = e;
    for (let n = 0; n <= entity.player.locus_x.length; n++) {
        e.position.x = entity.player.locus_x[n];
        e.position.y = entity.player.locus_y[n];
        e.position.z = entity.player.locus_z[n];
        let newjj = world.createEntity({
            mesh:'mesh/吉吉喵.vb',
            position:e.position,
            gravity: false,
            fixed: false,
            collides: false,
            scale: new Box3Vector3(1 / 32, 1 / 32, 1 / 32)
        });
        newjj.addTag('jjm');
        if (n % 10 == 0) {//性能好就加这个if
            entity.player.directMessage(`轨迹录制进度:\n${i / 100}秒/${time * (1000 / 10) / 100}秒`)
        };
        await sleep(10);
    };
    await sleep(1000);
    entity.player.dialog({
        type: Box3DialogType.TEXT,
        content: `轨迹播放完毕`,
    });
    entity.player.cameraEntity = entity;
    await sleep(5000);
    world.querySelectorAll('.jjm').forEach(e=>e.destroy())
    e.destroy();
};

这样更炫、更卡(bushi

2023-02-19T20:05:52 点赞:0

【神岛百大创作者绝密档案】第二期 中回复

我想问怎么获取里一个玩家最近的实体

2023-02-21T18:28:32 点赞:0

这怎么搞,速答 中回复

重新进入(?)

2023-02-23T18:46:16 点赞:0

雷柏X神奇代码岛创作节招人!!!! 中回复

我 

2023-02-24T19:34:52 点赞:0

【Box3】太空电梯,今晚封顶!! 中回复

噢噢噢噢

2023-02-25T20:59:20 点赞:0

你自己看吧 中回复

6666

2023-02-26T18:22:41 点赞:0

【box3教程】通过模型交互切换音乐 中回复

我靠,咋跟我想的一样、、

2023-02-26T18:48:20 点赞:0

【落海设计师的建筑教程】第四期:参观篇 中回复

哎呦,我的图上了哦(我是QZ亨利佐Yahoo!),可怜的我被封号了emotion_委屈

2023-02-27T18:26:04 点赞:0

八角尖尖!!! 中回复

→_→

2023-02-27T18:26:52 点赞:0

找个代码师 中回复

我我我!

2023-03-01T19:13:08 点赞:0

一个小游戏:请打出楼下名字的第一个字和最后一个字 中回复

酒酱

2023-03-02T18:36:56 点赞:1

加一个字毁掉楼下的昵称 中回复

酒转(九转)探酱男

2023-03-02T18:38:46 点赞:0

【雷柏X神奇代码岛创作节】比赛结束~ 中回复

还没结束,真不错儿

2023-03-06T07:20:59 点赞:0

【雷柏X神奇代码岛创作节】搬美吉启动评审!10号将公布获奖结果 中回复

前排!!!

2023-03-06T18:53:57 点赞:0

破碎键盘岛来啦! 中回复

TNT派对

2023-03-06T19:21:06 点赞:0

关于SC-ON团队计划制作的SC-ON Physics 中回复

https://box3.codemao.cn/e/6332c7fbf7bb8c06e27e

2023-03-06T19:25:31 点赞:0

关于SC-ON团队计划制作的SC-ON Physics 中回复

d=====( ̄▽ ̄*)b

2023-03-06T20:19:29 点赞:0

关于SC-ON团队计划制作的SC-ON Physics 中回复

顶顶顶

2023-03-07T19:30:04 点赞:0

【发现】代码岛的人物原来可以换肤! 中回复

太古了

2023-03-08T12:54:42 点赞:0

这能像就有鬼了 中回复

神奇代码岛: SC-ON Physics研究 (codemao.cn)

2023-03-08T19:21:22 点赞:0

Box3CameraSettings动画库 中回复

作者,SC-ON Physics(SOP)你有兴趣吗?神奇代码岛: SC-ON Physics研究 (codemao.cn)box3.codemao.cn/e/6332c7fbf7bb8c06e27e

2023-03-08T19:23:06 点赞:0

奇思妙想() 中回复

神奇代码岛: SC-ON Physics研究 (cod喵)

https://box3.cod喵/e/6332c7fbf7bb8c06e27e

2023-03-09T18:39:17 点赞:0

【雷柏X神奇代码岛创作节】搬美吉启动评审!10号将公布获奖结果 中回复

到了到了,赶紧公布awa

2023-03-10T07:26:46 点赞:0

【雷柏X神奇代码岛创作节】有史以来最长的获奖名单 中回复

耶耶耶耶耶!!!今天好事一大堆,先是下午4个小时全都拼机器人去了,然后又获奖了!!!!!!!!

2023-03-10T18:51:27 点赞:0

Box3CameraSettings动画库 中回复

在吗,喵C-ON Physics

2023-03-10T19:04:56 点赞:0

[Box3]文件查看器1.0(大佬勿喷) 中回复

这……

2023-03-11T11:23:57 点赞:0

嗨嗨嗨,还热乎,和平快去《逃离巨人屋》 中回复

2023-04-08T20:35:39 点赞:0

嗨嗨嗨,还热乎,和平快去《逃离巨人屋》 中回复

2023-04-08T20:36:07 点赞:0