Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
player:SetNumFreePolicies(1)
player:SetNumFreePolicies(0)
ex)
if player:GetCivilizationType() == dollCiv then
if not player:HasPolicy(dollPolicy) then
player:SetNumFreePolicies(1)
player:SetNumFreePolicies(0)
player:SetHasPolicy(dollPolicy, true)
--print("Set to DOLL")
end
else
if not player:HasPolicy(nonDollPolicy) then
player:SetNumFreePolicies(1)
player:SetNumFreePolicies(0)
player:SetHasPolicy(nonDollPolicy, true)
--print("Set to NONDOLL")
end
end
Is there a specific reason to use this method? Through my tests, just using the player.SetHasPolicy method would give that player the policy. It seems redundant to set the free policies to 1 then to 0 when we grant the policy, especially when we still grant them the policy when free policies = 0.
but if this code doesn't exist, first policy cost will increase to 20