scripting:reference:system_functions:worldmapfunctions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:reference:system_functions:worldmapfunctions [2020/01/29 07:02] – mit | scripting:reference:system_functions:worldmapfunctions [2020/02/07 19:00] (current) – [sysNumPlayersInScriptZone] mit | ||
---|---|---|---|
Line 6: | Line 6: | ||
==== sysGetTileCenter ==== | ==== sysGetTileCenter ==== | ||
- | ^ Format | sysGetTileCenter ( [World X or Y] )| | + | ^ Format | sysGetTileCenter ( World_X_or_Y |
^ Description | Returns the world coordinate value for the center of the map tile nearest to the specified position| | ^ Description | Returns the world coordinate value for the center of the map tile nearest to the specified position| | ||
- | ^ Parameters | **[World X or Y]** - World coordinate value | | ||
^ Returns | World coordinate of tile center | | ^ Returns | World coordinate of tile center | | ||
// | // | ||
Line 20: | Line 19: | ||
</ | </ | ||
==== sysMapToWorld ==== | ==== sysMapToWorld ==== | ||
- | ^ Format | sysMapToWorld ( [Map X or Y] )| | + | ^ Format | sysMapToWorld ( Map_X_or_Y |
^ Description | Converts a map coordinate to a world coordinate| | ^ Description | Converts a map coordinate to a world coordinate| | ||
- | ^ Parameters | **[Map X or Y]** - Map coordinate value | | ||
^ Returns | World coordinate | | ^ Returns | World coordinate | | ||
//Notes//: There are 2 coordinate systems used in the game ; Map Coordinates range from 0 to 255 (for the default map size), 0 to 511 or 0 to 1023 (if using a larger map size) and they correspond to the ' | //Notes//: There are 2 coordinate systems used in the game ; Map Coordinates range from 0 to 255 (for the default map size), 0 to 511 or 0 to 1023 (if using a larger map size) and they correspond to the ' | ||
+ | |||
==== sysWorldToMap ==== | ==== sysWorldToMap ==== | ||
- | ^ Format | sysWorldToMap ( [Map X or Y] )| | + | ^ Format | sysWorldToMap ( Map_X_or_Y |
^ Description | Converts a world coordinate to a map coordinate| | ^ Description | Converts a world coordinate to a map coordinate| | ||
- | ^ Parameters | **[World X or Y]** - World coordinate value | | ||
^ Returns | Nearest map coordinate value | | ^ Returns | Nearest map coordinate value | | ||
==== sysGetBuildingAtWorldPos ==== | ==== sysGetBuildingAtWorldPos ==== | ||
Line 34: | Line 32: | ||
==== sysWorldGetNumBuildingsOfType ==== | ==== sysWorldGetNumBuildingsOfType ==== | ||
- | ^ Format | sysWorldGetNumBuildingsOfType( | + | ^ Format | sysWorldGetNumBuildingsOfType( BuildingType )| |
^ Description | Returns the number of buildings of this type currently existing within the world. Useful for when you want to script a system that limits the number of a particular type of building | | ^ Description | Returns the number of buildings of this type currently existing within the world. Useful for when you want to script a system that limits the number of a particular type of building | | ||
- | ^ Parameters | Type number of the building to check | | ||
^ Returns | Number of this type of building currently in the world | | ^ Returns | Number of this type of building currently in the world | | ||
// | // | ||
Line 66: | Line 63: | ||
==== sysGetNearestPlayer ==== | ==== sysGetNearestPlayer ==== | ||
- | ^ Format | sysGetNearestPlayer( | + | ^ Format | sysGetNearestPlayer( WorldX, WorldY )| |
^ Description | Returns the ID of the player closest to the specified world coordinate | | ^ Description | Returns the ID of the player closest to the specified world coordinate | | ||
- | ^ Parameters | World Coordinate X,Y | | ||
^ Returns | Player ID | | ^ Returns | Player ID | | ||
// | // | ||
Line 90: | Line 86: | ||
==== sysActivateBuildingProximityEvent ==== | ==== sysActivateBuildingProximityEvent ==== | ||
- | ==== sysActivateLocalProximityEvent ==== | + | '' |
- | ==== sysActivateRangeEvent ==== | + | Used to trigger 4 different events:\\ |
+ | Event( " | ||
+ | Event( " | ||
+ | and the reverse..\\ | ||
+ | Event( " | ||
+ | Event( " | ||
==== sysDeactivateBuildingProximityEvent ==== | ==== sysDeactivateBuildingProximityEvent ==== | ||
- | ==== sysDeactivateLocalProximityEvent | + | '' |
+ | |||
+ | ==== sysActivateRangeEvent | ||
+ | '' | ||
+ | mm, atm seems to only triggers the event " | ||
==== sysDeactivateRangeEvent ==== | ==== sysDeactivateRangeEvent ==== | ||
==== sysIsInScriptZone ==== | ==== sysIsInScriptZone ==== | ||
+ | |||
+ | '' | ||
+ | |||
==== sysNumPlayersInBuildZone ==== | ==== sysNumPlayersInBuildZone ==== | ||
==== sysNumPlayersInRCMode ==== | ==== sysNumPlayersInRCMode ==== | ||
==== sysNumPlayersInScriptZone ==== | ==== sysNumPlayersInScriptZone ==== | ||
+ | '' | ||
+ | |||
+ | \\ | ||
+ | |||
+ | |||
+ | Not yet functional: | ||
+ | === sysActivateLocalProximityEvent === | ||
+ | === sysDeactivateLocalProximityEvent === | ||
scripting/reference/system_functions/worldmapfunctions.1580302969.txt.gz · Last modified: 2020/01/29 07:02 by mit