Difference between revisions of "059E"
Jump to navigation
Jump to search
(Created page with "{{Icon|VC}} {{Icon|SA}} '''FETCH_NEXT_CARD''' <hr /> '''Description''' : Fetch next card '''Syntax''' : 059E: get_card_to [''var''] '''Parameter''' : [''var''] :: Variable to...") |
|||
Line 1: | Line 1: | ||
− | {{Icon|VC}} {{Icon|SA}} | + | {{OpCode |
− | + | | games = {{Icon|VC}} {{Icon|SA}} | |
− | + | | command = FETCH_NEXT_CARD | |
− | + | | description = Fetch next card | |
− | + | | syntax1 = 059E: get_card_to [''var''] | |
− | + | | p1t = [''var''] | |
− | + | | p1d = Variable to store the integer value | |
− | + | }} | |
− | |||
− | This opcode | + | This opcode gets the value of the element in an array generated by opcode [[059D]], which means a value between ''1'' and ''52'' is possible to get. This simulates the fetching of a card from a randomly shuffled [[wikipedia:Standard 52-card deck|deck of 52 cards]]. Each time the opcode is called, it iterates through the array. When it reaches the end of the array, it moves onto the next array if it exists. When it finishes all available arrays, it returns back to the first array and repeats the process. If the deck is cleared, it gets the value ''0''. For Vice City, this opcode only exists on the [[Referring to GTA Versions|PC v1.0 and v1.1]], and was never called in the original script. |
== Keywords == | == Keywords == | ||
Line 16: | Line 15: | ||
== Reference == | == Reference == | ||
* {{GTAF|post|194990|4055597}} | * {{GTAF|post|194990|4055597}} | ||
− | |||
− |
Latest revision as of 00:32, 11 October 2016
- Description
- Fetch next card
- Syntax
- 059E: get_card_to [var]
- Parameter
- [var]
- Variable to store the integer value
This opcode gets the value of the element in an array generated by opcode 059D, which means a value between 1 and 52 is possible to get. This simulates the fetching of a card from a randomly shuffled deck of 52 cards. Each time the opcode is called, it iterates through the array. When it reaches the end of the array, it moves onto the next array if it exists. When it finishes all available arrays, it returns back to the first array and repeats the process. If the deck is cleared, it gets the value 0. For Vice City, this opcode only exists on the PC v1.0 and v1.1, and was never called in the original script.
Keywords
store, get, fetch, card, deck, decks