Difference between revisions of "010A"
Jump to navigation
Jump to search
m |
(updating page) |
||
Line 1: | Line 1: | ||
− | {{ | + | {{Icon|trilogy}} |
− | + | <hr /> | |
− | + | '''Description''' | |
− | + | : Checks if the player has more than enough money | |
− | + | '''Syntax''' | |
− | + | : 010A: player [''player handle''] money > [''int''] | |
− | + | '''Parameter''' | |
− | + | : [''player handle''] | |
+ | :: The handle of the player | ||
+ | : [''int''] | ||
+ | :: Money | ||
+ | '''Native analog''' | ||
+ | : [[IS_SCORE_GREATER]] | ||
+ | |||
This conditional opcode returns true if the player's money is greater than (but not equal to) the value. | This conditional opcode returns true if the player's money is greater than (but not equal to) the value. | ||
− | ==Keywords== | + | == Example == |
− | player, check, money, greater, more, than | + | The following example, using Sanny Builder, lets you decrease your money by $1000 by pressing the CAMERA key, as long as you have more than $999. |
+ | <source lang="scm"> | ||
+ | 0109: player $PLAYER_CHAR money += 2500 | ||
+ | |||
+ | while true | ||
+ | wait 10 | ||
+ | if | ||
+ | 00E1: key_pressed 0 13 // camera key | ||
+ | then | ||
+ | if | ||
+ | 010A: player $PLAYER_CHAR money > 999 | ||
+ | then | ||
+ | 0109: player $PLAYER_CHAR money += -1000 | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | </source> | ||
+ | |||
+ | == Keywords == | ||
+ | player, check, money, cash, greater, more, than |
Revision as of 01:25, 24 August 2011
Description
- Checks if the player has more than enough money
Syntax
- 010A: player [player handle] money > [int]
Parameter
- [player handle]
- The handle of the player
- [int]
- Money
Native analog
This conditional opcode returns true if the player's money is greater than (but not equal to) the value.
Example
The following example, using Sanny Builder, lets you decrease your money by $1000 by pressing the CAMERA key, as long as you have more than $999.
0109: player $PLAYER_CHAR money += 2500
while true
wait 10
if
00E1: key_pressed 0 13 // camera key
then
if
010A: player $PLAYER_CHAR money > 999
then
0109: player $PLAYER_CHAR money += -1000
end
end
end
Keywords
player, check, money, cash, greater, more, than