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

[Other✓] Scripting Help (Applymovement)

16
Posts
9
Years
    • Seen Nov 28, 2015
    Here is the script.

    #dynamic 0x800150

    #org @start
    applymovement 0x01 @walk1
    msgbox @talk1 0x6
    applymovement 0xFF @walk2
    setflag 0x1
    release
    end

    #org @talk1
    = HEY!\pThere's a rare Bird Pokemon in\nthat tree! Don't come this way\luntil I'm done sketching it, okay?\p

    #org @walk1
    #raw 0x62
    #raw 0xFE

    #org @walk2
    #raw 0x63
    #raw 0x1F
    #raw 0x1F
    #raw 0xFE

    I don't quite understand what I am doing wrong. Is there an issue with the flags or is the movement?
     

    Sefuree

    Canada Goose
    3,183
    Posts
    10
    Years
  • Spoiler:

    Well, try using this for your movement script: https://www.pokecommunity.com/misc.php?do=movie
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    What exactly is/isn't working?


    General notes:

    For flags, it's best to use those from 200-2FF (see here).

    As for your script, you need a waitmovement after each movement. Put 'waitmovement 0x0' directly after each one.

    #dynamic can stay at 0x800000. No need to use specific offsets.
     
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    So I did the waitmovement 0x0 after each of my applys but it still does not work. When I run over the script location on the ROM the game freezes up and crashes. Any ideas as to what might be going wrong? The group of people I am scripting for are also using JPAN's version of FireRed and they sent me the IPS to patch a clear ROM due to the fact that the leader sent the actual ROM to the music editor for implementing music. Could the reason the game is messing up be because of the fact that I patched a regular FireRed ROM and don't have the ROM file the team leader sent to the music editor?

    Also, thanks for that tool OCD! Seems pretty useful.

    EDIT: Also, here is the fixed script.

    #dynamic 0x800268

    #org @start
    applymovement 0x01 @walk1
    waitmovement 0x0
    msgbox @talk1 0x6
    applymovement 0xFF @walk2
    waitmovement 0x0
    setflag 0x200
    release
    end

    #org @talk1
    = HEY!\pThere's a rare Bird Pokemon in\nthat tree! Don't come this way\luntil I'm done sketching it, okay?\p

    #org @walk1
    #raw 0x62
    #raw 0xFE

    #org @walk2
    #raw 0x63
    #raw 0x1F
    #raw 0x1F
    #raw 0xFE
     
    Last edited:
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    Ah I see. The fact it's a script tile is your problem. Script tiles need variables to work correctly - the tutorial I linked for the flags in my last post has some guidance on how to use them :).
     
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    Thanks! I will read over this page to learn how to use them. But do you know how I can exactly fix the variables in this case to make the script above work?
     
    10,078
    Posts
    15
    Years
    • UK
    • Seen Oct 17, 2023
    It's a case of assigning the script tile a variable in a-map. Then, while the variable is zero the script will repeat-run.

    Then if the variable is set (IE 0x1) then the script will be turned off and the player will be able to walk over it.
     
    16
    Posts
    9
    Years
    • Seen Nov 28, 2015
    It's a case of assigning the script tile a variable in a-map. Then, while the variable is zero the script will repeat-run.

    Then if the variable is set (IE 0x1) then the script will be turned off and the player will be able to walk over it.

    Heck yes, it worked! Thanks a bunch for your help Magic!
     
    Back
    Top