• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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 problems

  • 91
    Posts
    11
    Years
    Okay, so I have a script and it runs pretty well for one I almost completely wrote on my own. Here's the script:

    Spoiler:


    When the @move part happens, it works. But then instead of playing the message, the NPC then does their movement @move 3 (back to their chair). And then they face down, instead of facing right like I want them to. Then the game is stuck, even though I have the "release" and "end" at the end of the script. Why isn't it working?

    And where do I put the Running Shoes offset in the script? I'm not sure on that. Thank you. :)
     
    First off, you need to end each of your movements with 0xFE, because that's what tells the game that the movement process is over (So, for instance, in @move, you need to have 0xFE at the end of the last movement. Same for move2 and move3. Because you don't end them, the game doesn't know to continue with the script.

    As for Running Shoes, IIRC you only need to set the flag (the command for which would be setflag 0x8C0) to make it so that the player can run.
     
    Try this:

    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0xFF @move2
    [COLOR="Red"]waitmovement 0x0[/COLOR]
    msgbox @shoes 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    [COLOR="Red"]setflag 0x82F[/COLOR]
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x04
    #raw 0x04
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x02
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @move2
    #raw 0x02
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @move3
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x05
    #raw 0x05
    #raw 0x03
    [COLOR="red"]#raw 0xFE[/COLOR]
    
    #org @shoes
    = Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.

    Remember to always use #raw 0xFE after movements or they won't work correctly. I'm also assuming you have the person events (0x1's) correct in A-Map.
    The Running Shoes use flag 0x82F in Fire Red, if that's the ROM you are using.
     
    Knowing Jabu, it'd probably be this:
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0xFF @move2
    waitmovement 0x0
    msgbox @shoes 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    [B][COLOR="Red"]setflag 0x8C0[/COLOR][/B]
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x04
    #raw 0x04
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x02
    #raw 0xFE
    
    #org @move2
    #raw 0x02
    #raw 0xFE
    
    #org @move3
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x05
    #raw 0x05
    #raw 0x03
    #raw 0xFE
    
    #org @shoes
    = Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.

    He's an Emerald guy, all around.
     
    That worked! Thanks a lot. :)

    Now, how would I make it so this message never plays again (And the scripts around it)? And is there a list of the fanfares anywhere?

    Edit: That's weird. When I leave the town and go to the route, the Running Shoes are disabled. When I get to another town, they're re-enabled. The route is listed as a route in the Header, though. Has this happened to anyone else before?
     
    That worked! Thanks a lot. :)

    Now, how would I make it so this message never plays again (And the scripts around it)? And is there a list of the fanfares anywhere?

    Edit: That's weird. When I leave the town and go to the route, the Running Shoes are disabled. When I get to another town, they're re-enabled. The route is listed as a route in the Header, though. Has this happened to anyone else before?
    I think there's a list of fanfares in Diego's XSE tutorial. To make sure the event doesn't play again, you need to set a flag. You already have a checkflag in place for this purpose, so you just need to do this:
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0xFF @move2
    waitmovement 0x0
    msgbox @shoes 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    setflag 0x8C0
    [B][COLOR="Red"]setflag 0x828[/COLOR][/B]
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x04
    #raw 0x04
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x02
    #raw 0xFE
    
    #org @move2
    #raw 0x02
    #raw 0xFE
    
    #org @move3
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x05
    #raw 0x05
    #raw 0x03
    #raw 0xFE
    
    #org @shoes
    = Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
    What that does is add a flag. With the checkflag you have in place, after the flag is set (meaning, after the script has happened once, it will check for the flag and, seeing that it is set, will go to @done (which just releases and ends, giving the illusion that the script isn't playing at all).
     
    I think there's a list of fanfares in Diego's XSE tutorial. To make sure the event doesn't play again, you need to set a flag. You already have a checkflag in place for this purpose, so you just need to do this:
    Code:
    #dynamic 0x800000
    
    #org @start
    checkflag 0x828
    if 0x1 goto @done
    applymovement 0x1 @move
    waitmovement 0x0
    applymovement 0xFF @move2
    waitmovement 0x0
    msgbox @shoes 0x6
    applymovement 0x1 @move3
    waitmovement 0x0
    setflag 0x8C0
    [B][COLOR="Red"]setflag 0x828[/COLOR][/B]
    release
    end
    
    #org @done
    release
    end
    
    #org @move
    #raw 0x04
    #raw 0x04
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x0B
    #raw 0x02
    #raw 0xFE
    
    #org @move2
    #raw 0x02
    #raw 0xFE
    
    #org @move3
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x0A
    #raw 0x05
    #raw 0x05
    #raw 0x03
    #raw 0xFE
    
    #org @shoes
    = Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
    What that does is add a flag. With the checkflag you have in place, after the flag is set (meaning, after the script has happened once, it will check for the flag and, seeing that it is set, will go to @done (which just releases and ends, giving the illusion that the script isn't playing at all).

    Thank you, that fixed it! Now I just need the mom to say something random afterwards. :P
    Do you have any idea about the Running Shoes issue?
     
    Thank you, that fixed it! Now I just need the mom to say something random afterwards. :P
    Do you have any idea about the Running Shoes issue?
    That running shoes issue should not be happening if you did everything correctly. Maybe double check it? The game could be clearing the flag with a level script as well (although I have no idea how that would happen).

    EDIT: nvm, if the flag was cleared, you'd have a different issue.

    DOUBLE EDIT: Mind showing us a screenshot of the header tab in Advance Map?
     
    That running shoes issue should not be happening if you did everything correctly. Maybe double check it? The game could be clearing the flag with a level script as well (although I have no idea how that would happen).

    EDIT: nvm, if the flag was cleared, you'd have a different issue.

    DOUBLE EDIT: Mind showing us a screenshot of the header tab in Advance Map?

    [PokeCommunity.com] Scripting problems
     
    Umm ok I'm not seeing why your issue would occur. This is weird. Can you try doing this on a clean Emerald rom?
     
    Not really. I already have a lot of progress on the one I'm using.
    I'm not asking you to throw away your rom just yet. I'm saying you should test your running shoes script on a clean Emerald rom to see if the same problem occurs.
     
    Based on what HackMew has written in this thread, I would try changing the 'Show name' to 'Show village/ city names'. Then again, if neither of those work, you could just follow the guide's steps to removing the limiter if you don't mind having Running Shoes enabled everywhere.

    How odd, that fixed the problem! But I'm going to have running enabled everywhere, so thank you for the guide. :)
     
    Back
    Top