• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Custom Feature Question] [help] how to compair a variable with gold.

  • 72
    Posts
    5
    Years
    I'm adding crime to my game as a variable. I want to add a guy that will clear you of your crimes. so I took (# of crimes * price per crime) and stored that in a new variable.
    (each guy who clears you will have different prices)


    #1so I want to do a conditional branch that compares that variable with the players gold.

    #2 I also don't see a way to print the total amount to the player. (is there a cmd that shows a variable in text like "\pn")

    [PokeCommunity.com] [help] how to compair a variable with gold.
    [/url]
    image upload[/IMG]


    This gives me a syntax error because idk how to call game variables
     
    Last edited:
    #1so I want to do a conditional branch that compares that variable with the players gold.

    The script should be: $Trainer.money > $game_variables[26]
    $game_variables is like an Array but without most of the functions of Arrays ^^"

    #2 I also don't see a way to print the total amount to the player. (is there a cmd that shows a variable in text like "\pn")

    In text, you can print the content of a variable by calling \v[XX] where XX is the number of the variable. For example, here, in text, you should write \v[26] :)
     
    Back
    Top