User Tools

Site Tools


scripting:reference:system_functions:townfunctions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:reference:system_functions:townfunctions [2020/01/29 10:41] – created mitscripting:reference:system_functions:townfunctions [2025/05/28 18:58] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ===== Town Functions ===== ===== Town Functions =====
 ==== sysGetNearestTown ==== ==== sysGetNearestTown ====
 +''**sysGetNearestTown( WorldX, WorldY )**'' returns buildingID num for the nearest town to the specified world coord
 +
 ==== sysTownGetRelationship ==== ==== sysTownGetRelationship ====
 +''**sysTownGetRelationship( townIDNum1, townIDNum2 )**'' returns the current 'political' relationship between the two towns. Exactly how much of the town relationship system is presently viable is somewhat unknown..
 +\\
 ==== sysTownGetNumBuildingsOfType ==== ==== sysTownGetNumBuildingsOfType ====
-^ Format | sysTownGetNumBuildingsOfType( [TownBuildingID][BuildingType)|+^ Format | sysTownGetNumBuildingsOfType( TownBuildingID, BuildingType )|
 ^ Description | Returns the number of buildings of this type currently exist within the specified town. Useful for when you want to script a system that limits the number of a particular type of building per town | ^ Description | Returns the number of buildings of this type currently exist within the specified town. Useful for when you want to script a system that limits the number of a particular type of building per town |
-^ Parameters | BuildingID of the town to query | 
-^  | Type number of the building to check | 
 ^ Returns | Number of this type of building in the town | ^ Returns | Number of this type of building in the town |
 //Example//: <note> //Example//: <note>
scripting/reference/system_functions/townfunctions.1580294488.txt.gz · Last modified: (external edit)