• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - 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.

[Script] Trouble with script tiles/vars

  • 6
    Posts
    10
    Years
    • Seen Mar 13, 2025
    Hey guys, so Im having a hard time with script tiles and I was wondering if I could get some help. Im not sure what Im doing wrong here, Ive read diegoisawesome's scripting tutorial and done some of my own personal research about script tiles as well. For the longest time I couldnt even get this script to activate. Now Ive gotten it to activate, but it always goes to the portion of the script that only activates if the flag is set to 0. I know the script to set the flag is working (at least Im pretty sure it is) so Im not sure whats going wrong here. Any help would be really appreciated, Ive been reading up on scripting and asm for awhile now so I am not tech illiterate or just looking for someone to write scripts for me! I wanna do this stuff myself, I just need a little help along the way.

    #dynamic 0x900000

    #org @firstencounter
    setvar 0x401B 0x2
    goto @Davhello

    #org @Davhello
    msgbox @Hey 0x6
    checkflag 0x862
    if 0x0 goto @Davlater
    compare 0x4112 0x1
    if 0x1 goto @through
    compare 0x4112 0x2
    if 0x1 goto @rival1
    compare 0x4112 0x3
    if 0x1 goto @rival2
    compare 0x4112 0x4
    if 0x1 goto @rival3
    compare 0x4112 0x5
    if 0x1 goto @rival4
    compare 0x4112 0x6
    if 0x1 goto @rival5
    compare 0x4112 0x7
    if 0x1 goto @rival6
    checkflag 0x863

    #org @Hey
    = Hey!

    #org @Davlater
    lock
    msgbox @grandmapknv 0x6
    setvar 0x401B 0x0
    release
    end

    #org @grandmapknv
    = Hey *trainer name*, whats up? ...\nyou dont remember me? Its me,\lPhiladelphia Collins! ... just\lkidding, Im your neighbor Dav! I\lheard you just got your first\lpokemon, we should battle! ... oh\lwait, you dont have a pokedex\lyet... I just got mine from my\lparents, maybe your grandma has\lone?

    #org @through
    msgbox @Davbattle1 0x6
    applymovement 0xFF @slide
    waitmovement 0x0
    applymovement 0x02 @partialwalk
    waitmovement 0x0
    applymovement 0x02 @Leadtrainer1
    applymovement 0xFF @Followdav1
    waitmovement 0x0
    goto @firstbattle

    #org @Davbattle1
    = Whats up *traner name*? ... you\ndont remember me? Its me,\lPhiladelphia Collins! ...just\lkidding, Im your neighbor Dav! I\lheard you just got your first\lpokemon, we should battel! Follow\lme!

    #org @firstbattle
    msgbox @letsgo 0x6
    trainerbattle 0x0 0x001 0x0 @before @after
    msgbox @beaten 0x6
    setvar 0x401B 0x8
    release
    end

    #org @letsgo
    = This is the battle field my\nparents just had built for me.\lPretty cool right? Im gonna train\lhere so I can challenge the\lpokemon league....you wanna\lchallenge the pokemon league too?\lThats awesome! Alright then, lets\lstart our training right now!

    #org @before
    = Alright, me and my buddy/n are gonna win this!

    #org @after
    = Not bad, not bad!

    #org @beaten
    = That was surprising, I really\ndidint expect me and Cubone to\llose. That was fun though! Ya\lwanna be rivals from here on out?\lAwesome! Should be a good time!\lIm gonna go explore route 2 and\lgrab some pokemon. See you around!

    #org @slide
    #raw 0x2C

    #org @partialwalk
    #raw 0x1D

    #org @leadtrainer1
    #raw 0x1D
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x20
    #raw 0x20
    #raw 0x02

    #org @followdav1
    #raw 0x1F
    #raw 0x1D
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1F
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x1E
    #raw 0x03

    #org @rival1
    applymovement 0xFF @step1
    waitmovement 0x0
    goto @through

    #org @rival2
    applymovement 0xFF @step2
    waitmovement 0x0
    goto @through

    #org @rival3
    applymovement 0xFF @step3
    waitmovement 0x0
    goto @through

    #org @rival4
    applymovement 0xFF @step4
    waitmovement 0x0
    goto @through

    #org @rival5
    applymovement 0xFF @step5
    waitmovement 0x0
    goto @through

    #org @rival6
    applymovement 0xFF @step6
    waitmovement 0x0
    goto @through

    #org @step1
    #raw 0x20
    #raw 0x01
    return

    #org @step2
    #raw 0x20
    #raw 0x20
    #raw 0x01
    return

    #org @step3
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x01
    return

    #org @step4
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x01
    return

    #org @step5
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x01
    return

    #org @step6
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x20
    #raw 0x01
    return
     
    Back
    Top