安装 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(越南语)
Українська(乌克兰语)
报告翻译问题




There are several ways you can modify a permanent health condition to make it no longer permanent that I can think of.
1. Making the condition treatable:
2. Making the resource consumable (similar to smokeleaf pipes and stimulants):
Below is a list of commonly used health condition-related functions:
function UnitHealth:HealRandomHealthConditions()
local status_effects = self.status_effects
for item = #(status_effects or ""), 1, -1 do
local effect = status_effects[item]
if IsKindOf(effect, "HealthCondition") and effect.TreatmentStatus == "requires treatment" then
self:TreatHealthCondition(effect, 10, self.id)
end
end
end
local interval = const.HourDuration*5
if time / interval == (time + update_interval) / interval then
unit:HealRandomHealthConditions(1)
return
end
But it is failing to heal.
just to test I added : target:AddHealthCondition("Migraine", self.id)
above unit:HealRandomHealthConditions(1) and the migraine fired correctly...
My suspicion is I have a syntax error, I think this will be my last question regarding the healing system...
Next, in your Trait, add the following code to the AddTrait(self, unit) function property: