安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题








I've tried a lot of variations on this, so the specifics might be further from working than when I started.
I think it doesn't trigger for auto-drinking if that's the case you are testing, only manual usage from inventory. I will run your code tomorrow to see.
I was testing it with drinking pop and orange soda, couldn't get it to trigger. Did it work on your end?
EventsPlus:Add("OnEat", function(character, item, percentage)
carbs = item:getCarbohydrates()
character:Say(carbs)
end, "My callback context")
This for some reason makes the character say the variable carbs 4 times back to back.
So I actually fixed this, and it must have something to do with the ctor because I added "False" for the bool at the end and it works fine now.
Note that Events have stack, meaning it will fire the event as much times as much you have added them. There are documentation on how to remove particular events or whole stack in the mod description.