• 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.

[ASM & Hex] Causing events to refresh after taking a certain amount of steps.

62
Posts
5
Years
  • So my rom has a PickPocketing system in place right now that resets the potential victims every time you earn a badge or beat the E4 (not that the game is far enough in development for you to get to that point).

    Basically when Pickpocketing someone, there are 4 possible outcomes: you get an item, you get money, you miss or you're caught and they battle you.

    Once you're caught they cannot be battled again until their trainerflag is cleared.

    Basically I want the game to clear certain trainerflags after I step a certain amount of times. (kinda like the VS. Seeker).

    What I'm wondering, is if there is some sort of value that I can compare when starting a script that will determine if a certain amount of steps were taken since the last time I had interacted with said script.

    This would be greatly helpful as I plan on adding a mining system that will have a similar method of re spawning resources.

    example of what I'm looking for:

    comparevar 0xSTEPS 0x(amount of steps since last interaction)
    if 0x4(greater than or equal to)
    goto @PICKPOCKETINGSCRIPT
    msgbox @CANTPICKPOCKET 0x6
    release
    end

    #org @PICKPOCKTINGSCRIPT
    cleartrainerflag 0x(whichevertrainer)
    ......insert script here......

    or even if there is some way for me to force the game to check steps and cleartrainerflags/flags manually. I'll take what I can get.
     
    1
    Posts
    4
    Years
    • Seen Sep 4, 2020
    I just used the Daisy Oak script in FireRed for something else and it has a special command that gives some sort of cooldown before you can interact again. Her script is at 0x168DB9 and it checks var 0x4025.
     
    62
    Posts
    5
    Years
  • I just used the Daisy Oak script in FireRed for something else and it has a special command that gives some sort of cooldown before you can interact again. Her script is at 0x168DB9 and it checks var 0x4025.

    I didn't even realize 0x4025 was a pedometer lol thank you very much. I decided to go with a different avenue for resetting Pickpocketing as there are several people that can be pickpocketed and reseting this var for one person would reset it for the rest, but I have quite a few systems I want to implement and refreshing one of them based on steps will be really useful.
     
    Back
    Top