![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | owner, nearlocation, distance[, savecity] | Type: | int |
Create a city belonging to owner, at approximately distance tiles away from nearlocation |
If a city variable is passed in to savecity, it will contain the newly created city after this function returns. Example:
//when the first city is created (i.e. I settle a settler) city_t my_city; city_t new_city; HandleEvent(CreateCity) post { if(IsHumanPlayer(player[0])) { my_city = city[0]; //I want to create a city about 5 tiles from my first city, //and then save the new city in a variable CreateCity(player[0], my_city.location, 5, new_city); } } |
tested
working
SFN_ERROR Slic_CreateCity::Call(SlicArgList *args) { if (args->Count() < 3 || args->Count() > 4) return SFN_ERROR_NUM_ARGS; sint32 owner; if(!args->GetPlayer(0, owner)) { return SFN_ERROR_TYPE_ARGS; } MapPoint pos; if(!args->GetPos(1, pos)) return SFN_ERROR_TYPE_ARGS; sint32 distance; if(!args->GetInt(2, distance)) return SFN_ERROR_TYPE_ARGS; sint32 x, y; BOOL found = FALSE; static DynamicArray |
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: 96112 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |