![]() |
CTP2 Bureau The Modding Knowledgebase |
|
Apolyton CTP2 forums Apolyton CTP2 archives Source Code Project SVN |
![]() |
Search the site: |
SLIC-Reference :
|
Arguments: | location, terrain | Type: | void |
Change location into a different terrain type |
Changes location into a different terrain type. Possible values for terrain are:
0 TERRAIN_TYPE_FOREST 1 TERRAIN_TYPE_PLAINS 2 TERRAIN_TYPE_TUNDRA 3 TERRAIN_TYPE_GLACIER 4 TERRAIN_TYPE_GRASSLAND 5 TERRAIN_TYPE_DESERT 6 TERRAIN_TYPE_SWAMP 7 TERRAIN_TYPE_JUNGLE 8 TERRAIN_TYPE_MOUNTAIN 9 TERRAIN_TYPE_HILL 10 TERRAIN_TYPE_WATER_SHALLOW 11 TERRAIN_TYPE_WATER_DEEP 12 TERRAIN_TYPE_WATER_VOLCANO 13 TERRAIN_TYPE_SPACE 14 TERRAIN_TYPE_WATER_BEACH 15 TERRAIN_TYPE_WATER_SHELF 16 TERRAIN_TYPE_WATER_TRENCH 17 TERRAIN_TYPE_WATER_RIFT 18 TERRAIN_TYPE_DEAD 19 TERRAIN_TYPE_BROWN_HILL 20 TERRAIN_TYPE_BROWN_MOUNTAIN 21 TERRAIN_TYPE_WHITE_HILL 22 TERRAIN_TYPE_WHITE_MOUNTAIN 23 TERRAIN_TYPE_DEAD_HILLMods may allow more terrain type depending on their terrain.txt. |
tested
working
SFN_ERROR Slic_Terraform::Call(SlicArgList *args) { if(args->Count() != 2) return SFN_ERROR_NUM_ARGS; MapPoint tpos, pos; if(!args->GetPos(0, tpos)) { return SFN_ERROR_TYPE_ARGS; } sint32 terrain; if(!args->GetInt(1, terrain)) { return SFN_ERROR_TYPE_ARGS; } if(terrain < 0 || terrain >= g_theTerrainDB->NumRecords()) { return SFN_ERROR_OUT_OF_RANGE; } g_theWorld->SmartSetTerrain(tpos, terrain, 0); #if 0 Cell *cell = g_theWorld->GetCell(tpos); cell->SetTerrain(terrain); cell->SetEnv(cell->GetEnv() & ~(k_MASK_ENV_ROAD | k_MASK_ENV_IRRIGATION | k_MASK_ENV_MINE | k_MASK_ENV_CITY | k_MASK_ENV_INSTALLATION | k_MASK_ENV_CITY_RADIUS | k_MASK_ENV_GOOD)); 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
No user comments yet. |
![]() |
This site is currently maintained by: BureauBert (Webmaster) Maquiladora (Manager) Legal Notice: Legal Notice Statistics: 96115 unique users since 02.05.2004 (» Site Statistics) Hosted by: WebhostOne |