Difference between revisions of "058C"

From GTAMods Wiki
Jump to navigation Jump to search
(page updates)
(rewrite)
 
Line 1: Line 1:
{{Icon|VC}} {{Icon|SA}} '''GET_PROGRESS_PERCENTAGE'''
+
{{OpCode
<hr />
+
| games      = {{Icon|VC}} {{Icon|SA}}
'''Description'''
+
| command    = GET_PROGRESS_PERCENTAGE
: Gets the progress of completion as a percentage
+
| description = Gets the progress of completion as a percentage
'''Syntax'''
+
| syntax1    = 058C: [''var''] = percentage_completed
: 058C: [''var''] = percentage_completed
+
| p1t        = [''var'']
'''Parameter'''
+
| p1d        = Variable to store the floating-point value
: [''var'']
+
}}
:: Variable to store the floating-point value
 
  
This opcode gets the progress of completion as a percentage. The value is obtained from the ratio of [[030C]]'s total value to [[030D]] as a percentage. It cannot exceed 100.0.
+
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 ==
 
== Keywords ==
get, percent, complete
+
get, progress, percent, percentage, complete, completed
 
 
[[Category:OpCodes]]
 

Latest revision as of 17:11, 11 April 2017

Vice City San Andreas GET_PROGRESS_PERCENTAGE


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