用户:
整活的网友查看:129 回复:5 评论:6 创建时间:2023-01-17T10:43:21
Forest.onInteract(async({entity}) => {
const result = await entity.player.dialog({
type: Box3DialogType.TEXT,
title: Forest.id,
lookEye: entity,
lookTarget: Forest,
content: `你好,${entity.player.name},我这里也没什么,就送你跳跃加成吧`,
});
});
整活的网友entity.player.jumpPower = 2;//加上为什么会报错
点赞0
评论
entity没定义
那他怎么定义啊
等等好像定义了
那你的代码就应该没问题
但他报错unexpected token'.'
可能不是由于这里报错
整活的网友Forest.onInteract(async({entity}) => {
const result = await entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型,TEXT是文本框。
title: Forest.id, // 对话框标题为NPC名字,表示正在说话的是NPC
lookEye: entity, // 将相机放在玩家位置
lookTarget: Forest, // 相机镜头对准NPC
content: `你好,${entity.player.name},我这里也没什么,就送你跳跃加成吧`,
entity.player.jumpPower = 2;
});
});点赞0
评论
清瞑月风GUIForest.onInteract(async({entity}) => {
const result = await entity.player.dialog({
type: Box3DialogType.TEXT, // 对话框的类型,TEXT是文本框。
title: Forest.id, // 对话框标题为NPC名字,表示正在说话的是NPC
lookEye: entity, // 将相机放在玩家位置
lookTarget: Forest, // 相机镜头对准NPC
content: `你好,${entity.player.name},我这里也没什么,就送你跳跃加成吧`,
});
entity.player.jumpPower = 2;//试试这个
});点赞0
评论