There is an event that fires when a player adopts a social policy. There is also one that fires when a player adopts a branch (usually an opening policy). I'm not sure off hand if the branch event fires when a player adopts an ideology with 0 free social policies but it wouldn't be hard to investigate it a bit and determine if that was the case.
function OnIdeologyChosen(playerID, policyTypeID)
local player = Players[playerID]
local policyLevel = GameInfo.Policies[policyTypeID].Level
if policyLevel == 1 then
--Do stuff
end
end
GameEvents.PlayerAdoptPolicy.Add(OnIdeologyChosen)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.