scripting:reference:system_functions:playerbuildingownershipfunctions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:reference:system_functions:playerbuildingownershipfunctions [2020/02/07 09:24] – mit | scripting:reference:system_functions:playerbuildingownershipfunctions [2025/05/28 18:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| 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 ==== | ||
| ^ Format | sysPlayerGetNumBuildingsOfType ( PlayerID, BuildingType )| | ^ Format | sysPlayerGetNumBuildingsOfType ( PlayerID, BuildingType )| | ||
| ^ Description | Returns the number of buildings of a particular type that the specified player currently owns | | ^ Description | Returns the number of buildings of a particular type that the specified player currently owns | | ||
| - | ^ | **[BuildingType]** - Building type number | | ||
| ^ Returns | Number owned | | ^ Returns | Number owned | | ||
| // | // | ||
| Line 16: | 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.1581067499.txt.gz · Last modified: (external edit)
