scripting:reference:system_functions:playerbuildingownershipfunctions
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| scripting:reference:system_functions:playerbuildingownershipfunctions [2020/01/29 10:34] – created 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 | | ||
| - | ^ Parameters | **[PlayerID]** - ID number of the player | | ||
| - | ^ | **[BuildingType]** - Building type number | | ||
| ^ Returns | Number owned | | ^ Returns | Number owned | | ||
| // | // | ||
| Line 17: | 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], [WorldX], [WorldY] ) | | + | ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, |
| ^ Description | Locates the nearest building of the specified type owned by the player. If no WorldX, WorldY is specified, the players current position is used instead | | ^ Description | Locates the nearest building of the specified type owned by the player. If no WorldX, WorldY is specified, the players current position is used instead | | ||
| - | ^ Parameters | Player ID number | ||
| - | ^ | Building type number | ||
| - | ^ | WorldX, WorldY | | ||
| ^ Returns | BuildingID or 0 if the player doesn' | ^ Returns | BuildingID or 0 if the player doesn' | ||
| // | // | ||
| Line 41: | Line 63: | ||
| </ | </ | ||
| ==== sysPlayerGetOwnedBuilding ==== | ==== sysPlayerGetOwnedBuilding ==== | ||
| - | ^ Format | sysPlayerGetOwnedBuilding ( [PlayerID], [Index] ) | | + | ^ Format | sysPlayerGetOwnedBuilding ( PlayerID, Index ) | |
| - | ^ Description | Used to get the IDs of buildings | + | ^ Description | Used to get the IDs of a specific building |
| - | ^ Parameters | [PlayerID] - Player ID number | + | |
| - | ^ | [Index] - Number in the list of owned buildings | + | |
| ^ Returns | BuildingID or 0 if the player doesnt own that many buildings | | ^ Returns | BuildingID or 0 if the player doesnt own that many buildings | | ||
| + | ^ Notes | **Index** indicates which building in the player' | ||
| // | // | ||
| < | < | ||
scripting/reference/system_functions/playerbuildingownershipfunctions.1580294048.txt.gz · Last modified: (external edit)
