![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | city, onoff | Type: | void |
Make the specified city immune to riots and revolts if onoff is not 0, set it back to normal if 0 |
Example:
if(player[0].cities < 2) { for(i = 0; i < player[0].cities; i = i + 1) { GetCityByIndex(player[0], i, tmpCity); if(CityIsValid(tmpCity)) { CityCantRiotOrRevolt(tmpCity, 1); } } } //if player[0] has only 1 city, then make the city non-attackable |
SFN_ERROR Slic_CityCantRiotOrRevolt::Call(SlicArgList *args) { if(args->Count() != 2) return SFN_ERROR_NUM_ARGS; Unit city; if(!args->GetCity(0, city)) return SFN_ERROR_TYPE_ARGS; sint32 on; if(!args->GetInt(1, on)) return SFN_ERROR_TYPE_ARGS; if(!g_theUnitPool->IsValid(city)) return SFN_ERROR_OK; if(on) city.SetFlag(k_UDF_CANT_RIOT_OR_REVOLT); else city.ClearFlag(k_UDF_CANT_RIOT_OR_REVOLT); return SFN_ERROR_OK; } |
Using this form you may add your own observations concerning the above item, e.g. additional hints for usage, limitations, oddities etc. Please note this is not the place for asking questions or carrying out discussions about modding - please refer to the Apolyton CTP2 Modification Forum on that purpose.
*) Required fields
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 118122 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |