User Tools

Site Tools


scripting:reference:system_functions:playerbuildingownershipfunctions

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
scripting:reference:system_functions:playerbuildingownershipfunctions [2020/02/07 03:49] mitscripting: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 |
 +//Example//: <note>
 +<code>Event( "Custom", "CountBuildings" )
 +{
 +    $numOwned = sysPlayerGetNumBuildingsOfType( $gPlayerID )
 +    *msg %PLAYER% You currently own $numOwned buildings
 +}
 +</code>
 +</note>
  
 ==== sysPlayerGetNumBuildingsOfType ==== ==== sysPlayerGetNumBuildingsOfType ====
Line 15: Line 28:
 </code> </code>
 </note> </note>
 +
 +==== 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 |
 +//Example//: <note>
 +<code>Event( "Custom", "CountBuildings" )
 +{
 +    $numOwned = sysPlayerGetNumBuildingsOfBuildSkill ( $gPlayerID, "Baker" )
 +    *msg %PLAYER% You currently own $numOwned buildings that require the Baker skill to construct
 +}
 +</code>
 +</note>
 +
 ==== sysPlayerGetNearestOwnedBuildingOfType ==== ==== sysPlayerGetNearestOwnedBuildingOfType ====
 ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, WorldX, WorldY ) | ^ Format | sysPlayerGetNearestOwnedBuildingOfType ( PlayerID, BuildingType, WorldX, WorldY ) |
scripting/reference/system_functions/playerbuildingownershipfunctions.txt · Last modified: 2023/07/18 04:15 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