• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

Setting variables to the value of other variables?

17
Posts
2
Years
    • Seen Dec 14, 2022
    So I'm trying to build a command that saves the value of the variable VAR_0x8004 to another variable, so that if the player leaves and changes the 0x8004 value (since it is used elsewhere), the follow-up commands will still run properly. I tried this:
    Spoiler:

    but it doesn't seem to be working, as I have a follow-up script that only does stuff if VAR_FOSSIL_CHOICE is set to a specific set of values, and that script doesn't do anything right now. Is there a way to set the value of VAR_FOSSIL_CHOICE equal to the value of VAR_0x8004 at this specific moment?
     
    247
    Posts
    6
    Years
    • Seen yesterday
    So I'm trying to build a command that saves the value of the variable VAR_0x8004 to another variable, so that if the player leaves and changes the 0x8004 value (since it is used elsewhere), the follow-up commands will still run properly. I tried this:

    but it doesn't seem to be working, as I have a follow-up script that only does stuff if VAR_FOSSIL_CHOICE is set to a specific set of values, and that script doesn't do anything right now. Is there a way to set the value of VAR_FOSSIL_CHOICE equal to the value of VAR_0x8004 at this specific moment?

    You'll want to use copyvar instead. That takes the value being held by the source variable and gives it to the destination variable, whereas setvar just takes the number given, which VAR_0x8004 is technically just 32772, which acts as a pointer to the actual data held by the variable.
     
    Back
    Top