How to unlock unit from policy

Core Xii

Chieftain
Joined
Jun 26, 2011
Messages
76
I want to make a unit available only through a policy, and couldn't find any way to achieve this. Units can't seem to have policy prerequisites, and policies can't grant you specific techs to fake it. Anyone know how to achieve this? Also for buildings, as well.
 
You have to use Lua

Specifically the GameEvents

GameEvents.CityCanTrain(iPlayer, iCity, iUnitType)
GameEvents.CityCanConstruct(iPlayer, iCity, iBuildingType)

along with

Players[iPlayer]:HasPolicy(iPolicy)
 
Back
Top Bottom