3DMGAME 3DM首页 新闻中心 前瞻 | 评测 游戏库 热门 | 最新 攻略中心 攻略 | 秘籍 下载中心 游戏 | 汉化 购买正版 论坛

注册 登录

QQ登录

只需一步,快速开始

查看: 6393|回复: 9
打印 上一主题 下一主题

[修改] 小修改,随机增加采摘数量

  [复制链接]

1

主题

31

帖子

88

积分

初级玩家

Rank: 2

贡献度
1
金元
835
积分
88
精华
0
注册时间
2013-4-29
跳转到指定楼层
主题
发表于 2013-5-5 20:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
小小修改,一次最多为10个,节操应该还在
想得到更多请更改 math.random(9)中的数字。


修改方法
打开文件夹data\scripts\components\pickable.lua
搜索
   picker.components.inventory:GiveItem(loot, nil, Vector3(TheSim:GetScreenPos(self.inst.Transform:GetWorldPosition())))

改为
local pt = Vector3(TheSim:GetScreenPos(self.inst.Transform:GetWorldPosition()))
local ptnum = 1 + math.random(9)
for y = 1, ptnum do
    picker.components.inventory:GiveItem(SpawnPrefab(self.product), nil, pt)
end
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|3DMGAME ( 京ICP备14006952号-1  沪公网安备 31011202006753号

GMT+8, 2026-3-25 04:18 , Processed in 0.027542 second(s), 16 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表