User Tools

Site Tools


scripting:reference:system_functions:constructionfunctions

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:reference:system_functions:constructionfunctions [2020/01/29 06:19] mitscripting:reference:system_functions:constructionfunctions [2023/05/05 03:13] (current) – [sysAddBuilding] mit
Line 4: Line 4:
  
 ==== sysIsBuildingPositionValid ==== ==== sysIsBuildingPositionValid ====
-^ Format | sysIsBuildingPositionValid( [Building Type] ) |+^ Format | sysIsBuildingPositionValid( Building_Type ) |
 ^ Description | Checks whether the player's current position is a valid place to add a building of the specified type | ^ Description | Checks whether the player's current position is a valid place to add a building of the specified type |
-^ Parameters | Building Type number  | 
 ^ Returns | 1 if the position is valid, 0 if not | ^ Returns | 1 if the position is valid, 0 if not |
 //Example//:<note> //Example//:<note>
Line 24: Line 23:
  
 ==== sysConstructBuilding ==== ==== sysConstructBuilding ====
-^ Format | sysConstructBuilding ( [Building Type][WorldX][WorldY][Building_Name] ) )|+^ Format | sysConstructBuilding ( Building_Type, WorldX, WorldY, [Building_Name] ) )|
 ^ Description | Used to construct a new building to your world. The server handles all the standard construction processes (like deducting building tax or construction materials) according to the current settings applied on your world. If you just want to add a building directly, without applying the usual construction rules, use sysAddBuilding  | ^ Description | Used to construct a new building to your world. The server handles all the standard construction processes (like deducting building tax or construction materials) according to the current settings applied on your world. If you just want to add a building directly, without applying the usual construction rules, use sysAddBuilding  |
-^ Parameters | Building Type number | 
-^  | World Coordinate X | 
-^  | World Coordinate Y | 
-^  | (Optional) Building Name | 
 ^ Returns | 1 if the building was added to the world, 0 if not | ^ Returns | 1 if the building was added to the world, 0 if not |
 //Example//: <note> //Example//: <note>
Line 47: Line 42:
  
 ==== sysAddBuilding ==== ==== sysAddBuilding ====
-^ Format | sysAddBuilding ( [Building Type][Owner ID][MapX][MapY][Building_Name], [Construction Amount 1], [Construction Amount 2] ) )|+^ Format | sysAddBuilding ( Building_TypeOwnerID, MapX, MapY, [Building_Name], [Construction Amount 1], [Construction Amount 2] ) )|
 ^ Description | Used to add a new building to your world | ^ Description | Used to add a new building to your world |
-Parameters Building Type number +Returns The building number created if the building was added to the world, 0 if not |
-^  | Owner player ID | +
-^  | Map Coordinate X | +
-^  | Map Coordinate Y | +
-^  | (Optional) Building Name | +
-^  | (Optional) Construction Amount 1 | +
-^  | (Optional) Construction Amount 2 | +
-^ Returns | 1 if the building was added to the world, 0 if not |+
 //Example//: <note> //Example//: <note>
 <code>Event( "PlaceAnyBuilding", "" ) <code>Event( "PlaceAnyBuilding", "" )
Line 73: Line 61:
  
 ==== sysAddBuildingWorld ==== ==== sysAddBuildingWorld ====
-TBD\\+Format for this is same as the 'sysAddBuilding' function described above but World coordinates are used instead of Map coordinates. (Map coordinates are essentially the coordinates of the 'tiles' that make up the land, world coordinates are in cm).\\ 
 ==== sysGetBuildingTypeName ==== ==== sysGetBuildingTypeName ====
-TBD //+''**sysGetBuildingTypeName( TypeNum )**'' returns text name //
 // //
 ==== sysGetConstructionMaterialsAmount ==== ==== sysGetConstructionMaterialsAmount ====
-TBD //+''**sysGetConstructionMaterialsAmount( TypeNum )**'' returns amount of primary construction material required - set in the buildings editor tool//
 // //
 +
 +==== sysGetBuildingTypeBasePrice====
 +''**sysGetBuildingTypeBasePrice( TypeNum )**'' returns the base price for construction of this building type, determined by buildings editor setup and economy settings. Actual price can vary depending on where it is placed on the world (e.g. town construction taxes can apply) if you have those settings enabled too. //
 +//
 +
 +==== sysGetSecondaryConstructionPrice ====
 +''**sysGetSecondaryConstructionPrice ( TypeNum )**'' returns amount of secondary construction material required - set in the buildings editor tool.//
 +//
 +
  
 ==== sysIsInBuildZone ==== ==== sysIsInBuildZone ====
-TBD //+''**sysIsInBuildZone( MapX, MapY, ZoneIDNum )**'' checks if the specified map location is within the specified build zone. //
 // //
 +
 ==== sysIsInNoBuildZone ==== ==== sysIsInNoBuildZone ====
-TBD //+''**sysIsInBuildZone( MapX, MapY, ZoneIDNum )**'' checks if the specified map location is within the specified no-build zone. //
 // //
  
scripting/reference/system_functions/constructionfunctions.1580300340.txt.gz · Last modified: 2020/01/29 06:19 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki