
Lv.1
我是个性签名
在 日常炮轰吉吉 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E6%90%93%E5%A4%B4.gif"alt="emotion_编程猫_搓头"
2022-03-18T19:00:06 点赞:0
在 【神岛创作节】音乐二创获奖名单出炉 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E7%82%B9%E8%B5%9E.gif"alt="emotion_编程猫_点赞"
2022-05-16T14:12:51 点赞:0
在 神奇代码岛下载 中回复
能~imgsrc="https://static.cod喵/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E7%82%B9%E8%B5%9E.gif"alt="emotion_编程猫_点赞"
2022-05-21T18:19:20 点赞:0
在 谁招代码师? 中回复
https://box3.codemao.cn/e/852a4fb98ba0d776e7d7?p=GxS2bsKETRwP0aYBYWkwR2eK7viby7%2Fxr5NSzXMc2sA8%2BhjnaOMAVndWVzdA%3D%3D
2022-05-22T10:34:06 点赞:0
在 怎么编对话和传送的代码? 中回复
const shop_npc_one = world.querySelector('#传送')
shop_npc_one.enableInteract = true
shop_npc_one.interactRadius = 3
shop_npc_one.onInteract(({ entity }) => {
entity.player.spawnPoint = new Box3Vector3(0, 0, 0)
entity.player.forceRespawn()
})2022-05-22T11:21:05 点赞:0
在 怎么编对话和传送的代码? 中回复
world.onPlayerJoin(({entity}) => { //当玩家进入地图触发
entity.num = 0 //新建私有变量num
})
// 新建一个文本对话框函数
function textDialog(entity, content, title){
return entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框类型
content, //对话框内容
title, // 对话框标题
})
}
global.textDialog = textDialog //将global.textDialog命名为textDialog
for(const npc of world.querySelectorAll('.NPC')){ //搜索全部带有NPC标签的实体
npc.enableInteract = true //开启交互
npc.interactRadius = 2 //设置交互距离为3
npc.interactHint = npc.id //将npc.interactHint命名为npc.id
npc.onInteract(async({entity})=>{
if(npc.id == "可以改"){
if(entity.num == 0){
textDialog(entity, "可以改", npc.id)
entity.num = 1
}else if(entity.num == 2){
textDialog(entity, "可以改", npc.id)
entity.num = 4
}
}else if(npc.id == "可以改"){
if(entity.num == 0){
textDialog(entity, "可以改",npc.id)
}else if(entity.num == 1){
textDialog(entity,"可以改", npc.id)
entity.num = 2
}
}
})
}
2022-05-22T11:23:45 点赞:0
在 怎么编对话和传送的代码? 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E6%90%93%E5%A4%B4.gif"alt="emotion_编程猫_搓头"
2022-05-22T11:24:54 点赞:0
在 举报&意见箱代码(hhhhhhh) 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E7%BF%BB%E7%99%BD%E7%9C%BC.gif"alt="emotion_编程猫_翻白眼"width="518"height="518"
2022-07-22T19:10:04 点赞:0
在 举报&意见箱代码(hhhhhhh) 中回复
imgsrc="https://static.codemao.cn/emoji/codemao/%E7%BC%96%E7%A8%8B%E7%8C%AB_%E6%90%93%E5%A4%B4.gif"alt="emotion_编程猫_搓头"
2022-07-22T19:10:14 点赞:0
在 举报&意见箱代码(hhhhhhh) 中回复
imgsrc="https://static.codemao.cn/emotion/thunder_monkey/%E6%91%87%E6%A4%85%E5%AD%90240.gif"alt="emotion_雷电猴_摇椅子"
2022-07-22T19:12:56 点赞:0