22 == `updateChallengeRecord(recordType, value[, stat])` (1.0.0) == |
22 == `updateChallengeRecord(recordType, value[, stat])` (1.0.0) == |
23 Report a new team record attempt in a [Missions mission] (preferably challenge missions). In missions, the team file of the mission team (see `AddMissionTeam` for more infos) can store several records (such as highscores) which will be shown in the frontend when the mission is selected. Note this only works for non-campaign missions so far. |
23 Report a new team record attempt in a [Missions mission] (preferably challenge missions). In missions, the team file of the mission team (see `AddMissionTeam` for more infos) can store several records (such as highscores) which will be shown in the frontend when the mission is selected. Note this only works for non-campaign missions so far. |
24 |
24 |
25 Calling this function means the team has made a record attempt of a given record type (e.g. fastest time or highscore) with a given `value`. If the team's own record has been beaten, or is has set the first record, the team file is being updated. |
25 Calling this function means the team has made a record attempt of a given record type (e.g. fastest time or highscore) with a given `value`. If the team's own record has been beaten, or is has set the first record, the team file is being updated. |
26 |
26 |
27 * `recordType`: Type of record (see [ConfigurationFiles#[Mission%2520<%5BMISSION_NAME>%5D] for a list) |
27 * `recordType`: Type of record (see [ConfigurationFiles#%5BMission%2520%3CMISSION_NAME%3E%5D here] for a list) |
28 * `value`: Value that has been achieved by the team |
28 * `value`: Value that has been achieved by the team |
29 * `stat`: If `true` (default), will also write a message in the stats screen (whether record has been beaten, or current record if not). Otherwise, this writes nothing. |
29 * `stat`: If `true` (default), will also write a message in the stats screen (whether record has been beaten, or current record if not). Otherwise, this writes nothing. |
30 |
30 |
31 == `getReadableChallengeRecord(recordType)` (1.0.0) == |
31 == `getReadableChallengeRecord(recordType)` (1.0.0) == |
32 Returns a human-readable description of a team record of the mission team (see also: `AddMissionTeam`) for the current challenge [Missions mission]. Team records are read from the team file. `recordType` is a record type. Possible record types are listed in [ConfigurationFiles#%5BMission%2520%3CMISSION_NAME%3E%5D]. This can be useful to display something in `ShowMission`. |
32 Returns a human-readable description of a team record of the mission team (see also: `AddMissionTeam`) for the current challenge [Missions mission]. Team records are read from the team file. `recordType` is a record type. Possible record types are listed [ConfigurationFiles#%5BMission%2520%3CMISSION_NAME%3E%5D here]. This can be useful to display something in `ShowMission`. |
33 |
33 |
34 If the team does not have a record for the given record type yet, the empty string is returned. If the record type is invalid, `nil` is returned. |
34 If the team does not have a record for the given record type yet, the empty string is returned. If the record type is invalid, `nil` is returned. |
35 |
35 |
36 For example, for `"TimeRecord"`, the returned string is something like `"Team's best time: 14.340s"`. |
36 For example, for `"TimeRecord"`, the returned string is something like `"Team's best time: 14.340s"`. |
37 |
37 |