Difference between revisions of "058C"
Jump to navigation
Jump to search
(rewrite) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{OpCode | |
− | + | | games = {{Icon|VC}} {{Icon|SA}} | |
− | ''' | + | | command = GET_PROGRESS_PERCENTAGE |
− | + | | description = Gets the progress of completion as a percentage | |
+ | | syntax1 = 058C: [''var''] = percentage_completed | ||
+ | | p1t = [''var''] | ||
+ | | p1d = Variable to store the floating-point value | ||
+ | }} | ||
− | This gets the | + | This opcode gets the progress of completion as a percentage. The value is obtained by taking the progress made (which can be changed through [[030C]]), multiplying that by 100.0, and dividing that by the total progress (which can be set through [[030D]]). If the total progress points is set to 0, the value will be set to 0 to avoid division by zero. Any value greater than 100.0 will be set to 100.0. Negative values can be returned. |
− | + | In Vice City, if your game language is set to French or German, subtract the total progress by 1 before the division. For example, if the total progress points is set to 152, this opcode will return 100.0 if just 151 progress points are made. | |
− | |||
− | + | == Keywords == | |
+ | get, progress, percent, percentage, complete, completed |
Latest revision as of 17:11, 11 April 2017
- Description
- Gets the progress of completion as a percentage
- Syntax
- 058C: [var] = percentage_completed
- Parameter
- [var]
- Variable to store the floating-point value
This opcode gets the progress of completion as a percentage. The value is obtained by taking the progress made (which can be changed through 030C), multiplying that by 100.0, and dividing that by the total progress (which can be set through 030D). If the total progress points is set to 0, the value will be set to 0 to avoid division by zero. Any value greater than 100.0 will be set to 100.0. Negative values can be returned.
In Vice City, if your game language is set to French or German, subtract the total progress by 1 before the division. For example, if the total progress points is set to 152, this opcode will return 100.0 if just 151 progress points are made.
Keywords
get, progress, percent, percentage, complete, completed