HistoricHippos
Chieftain
- Joined
- Jul 8, 2017
- Messages
- 8
First time using/experimenting with LUA to give a civ I'm working on a dummy policy, based on the code provided here (https://forums.civfanatics.com/threads/lua-reference-vault.607316/). The thing is, when I made the build to test the civ out, it didn't show up ingame so I'm wondering if it was due to how I made the LUA code. Is there anything wrong with what I've made?
Code:
function SchoolLive()
for iPlayerLoop = 0, GameDefines.MAX_MAJOR_CIVS-1, 1 do
local pPlayer = Players[iPlayerLoop]
if (pPlayer:GetCivilizationType() == GameInfoTypes.CIVILIZATION_SCHOOLLIVE) then
pPlayer:SetNumFreePolicies(1)
pPlayer:SetNumFreePolicies(0)
pPlayer:SetHasPolicy(GameInfoTypes.POLICY_FRIEND_horsehockeyAI, true)
end
end
end