modding:functions:plygetstat
Differences
This shows you the differences between two versions of the page.
modding:functions:plygetstat [2012/03/17 04:34] – created ttech | modding:functions:plygetstat [2014/12/27 04:40] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Discuss this page on this page's [[plyGetStat Talk Page|Talk Page]] | ||
+ | === plyGetStat === | ||
+ | |||
+ | See [[http:// | ||
+ | |||
+ | ^ Syntax | (plyGetStat player stat) -> value | | ||
+ | ^ Arguments | player: The player. (See [[Globals# | ||
+ | ^ | stat: An identifier naming the stat to obtain (see below). | | ||
+ | ^ Returns | value: The value of the stat. | | ||
+ | ^ Category | [[player functions|player]] | | ||
+ | ^ Description | Returns the value of a player stat. | | ||
+ | |||
+ | === Stats === | ||
+ | The following stat identifiers are defined: | ||
+ | |||
+ | * **bestEnemyShipsDestroyed** : Calculates the most powerful ship class (by score) that the player has destroyed so far. Returns a list with two item. The first is the [[UNID]] of the ship class; the second is the number of ships of that class the player has destroyed. | ||
+ | * **enemyShipsDestroyed** : Returns the total number of enemy ships destroyed by the player so far. | ||
+ | * **enemyStationsDestroyed** : Returns the total number of enemy stations destroyed. | ||
+ | * **friendlyShipsDestroyed** : Returns the total number of friendly ships destroyed. | ||
+ | * **friendlyStationsDestroyed** : Returns the total number of friendly stations destroyed. | ||
+ | * **resurrectCount** : Returns the number of times that the player has resurrected. | ||
+ | * **score** : Returns the player' | ||
+ | * **systemData** : Returns an array of lists. Each list in the array contains data about a particular system. The elements in the list are as follows: | ||
+ | * (0th element) : The nodeID of the system. | ||
+ | * (1st element) : The tick count when the player first entered the system. | ||
+ | * (2nd element) : The tick count when the player most recently entered the system. | ||
+ | * (3rd element) : The tick count when the player last left the system (-1 if the player has not left). | ||
+ | * (4th element) : The total amount of time spent in the system (in ticks). | ||
+ | * **systemsVisited** : Returns the total number of systems visited. | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | <code lisp> | ||
+ | |||
+ | Returns the player' | ||
+ | |||
+ | Return to [[: |