Difference between revisions of "058C"

From GTAMods Wiki
Jump to navigation Jump to search
 
(rewrite)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<code>058C=1,%1d%</code><br>
+
{{OpCode
'''Description''': Gets the percentage completed<br>
+
| games      = {{Icon|VC}} {{Icon|SA}}
'''Parameter 1''': Value to store the integer<br>
+
| command    = GET_PROGRESS_PERCENTAGE
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| 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 value of the percentage completed in the game. The value is obtained from the ratio of [[030C]] to [[030D]] as a percentage. It cannot exceed 100%.
+
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.
  
==Keywords==
+
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.
get, percent, complete
 
  
[[Category:OpCodes]]
+
== Keywords ==
 +
get, progress, percent, percentage, complete, completed

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