Life is Feudal: Forest Village

Life is Feudal: Forest Village

Forest Village Workshop
Forest Village hub of user generated mods, maps and scenarios.
了解更多
sagiluv1 2020 年 4 月 20 日 下午 1:21
Modification
Need a hand in allowing the game to set multiple items. So far this is how I set it but the game only set the first items and ignore the rest.

if bld.name == "Barn" then
bld:setResourceCount("fish", 1000),
bld:setResourceCount("vegetables", 1000),
bld:setResourceCount("oat", 500),
bld:setResourceCount("meat", 500)

Do I need to use comma, semi-colons or some other key words to make use all of the items?
< >
正在显示第 1 - 4 条,共 4 条留言
pheobewitch 2020 年 4 月 20 日 下午 1:25 
This won't work. You can't set limit this way.
sagiluv1 2020 年 4 月 20 日 下午 1:32 
引用自 pheobewitch
This won't work. You can't set limit this way.
I am trying to set the amount into the barn, the 500 count is what I want. Just want the game to deliver not just 1000 fish but also the vegetables. oat and meat as well into the barn.
最后由 sagiluv1 编辑于; 2020 年 4 月 20 日 下午 1:40
linuxmistress 2020 年 4 月 21 日 上午 2:58 
引用自 sagiluv1
引用自 pheobewitch
This won't work. You can't set limit this way.
I am trying to set the amount into the barn, the 500 count is what I want. Just want the game to deliver not just 1000 fish but also the vegetables. oat and meat as well into the barn.

Hi, you can't use setResourceCount for more than one resource. What pheobewitch wanted you to say that this is not possible to make it the way you want. Some functions are hard-coded and this one is for one resource only. By the way your code is wrong. Do you know how lua works? Your lua is missing critical code in condition and one line of code doesn't end with comma.
linuxmistress 2020 年 4 月 21 日 上午 3:00 
Part I might help you understand lua.

https://www.lua.org/pil/contents.html
< >
正在显示第 1 - 4 条,共 4 条留言
每页显示数: 1530 50

发帖日期: 2020 年 4 月 20 日 下午 1:21
回复数: 4