scripting:reference:system_functions:playerbuildingownershipfunctions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
scripting:reference:system_functions:playerbuildingownershipfunctions [2020/02/07 03:49] – mit | scripting:reference:system_functions:playerbuildingownershipfunctions [2023/07/18 04:15] (current) – mit | ||
---|---|---|---|
Line 2: | Line 2: | ||
Functions allowing you to query and manipulate the ownership of buildings | Functions allowing you to query and manipulate the ownership of buildings | ||
+ | |||
+ | ==== sysPlayerGetNumBuildingsOwned ==== | ||
+ | ^ Format | sysPlayerGetNumBuildingsOwned ( PlayerID )| | ||
+ | ^ Description | Returns the number of buildings the specified player currently owns | | ||
+ | ^ Returns | Number owned | | ||
+ | // | ||
+ | < | ||
+ | { | ||
+ | $numOwned = sysPlayerGetNumBuildingsOfType( $gPlayerID ) | ||
+ | *msg %PLAYER% You currently own $numOwned buildings | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
==== sysPlayerGetNumBuildingsOfType ==== | ==== sysPlayerGetNumBuildingsOfType ==== | ||
Line 15: | Line 28: | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | ==== sysPlayerGetNumBuildingsOfBuildSkill ==== | ||
+ | ^ Format | sysPlayerGetNumBuildingsOfBuildSkill ( PlayerID, Skill Name/Num )| | ||
+ | ^ Description | Returns the number of buildings the specified player currently owns that require the specified build skill | | ||
+ | ^ Returns | Number owned | | ||
+ | // | ||
+ | < | ||
+ | { | ||
+ | $numOwned = sysPlayerGetNumBuildingsOfBuildSkill ( $gPlayerID, " | ||
+ | *msg %PLAYER% You currently own $numOwned buildings that require the Baker skill to construct | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | |||
==== sysPlayerGetNearestOwnedBuildingOfType ==== | ==== sysPlayerGetNearestOwnedBuildingOfType ==== | ||
^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, | ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, |
scripting/reference/system_functions/playerbuildingownershipfunctions.txt · Last modified: 2023/07/18 04:15 by mit