• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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] Script Tile keeps activating randomly

  • 15
    Posts
    4
    Years
    • Seen Aug 3, 2024
    Hello guys and girls.
    My Problem is that i wrote a Script Tile but it does't activate correctly.
    One can step on it multiple times and nothing happens or it through sheer luck
    it activates.
    Also even if it was activated and the var set to 1 it can still activate again.
    I don't really know why this happens.
    I will post the script ,maybe I forgot something there.
    Any help will be appreciated.🙂


    SCRIPT:

    #dynamic 0x800000
    #org @start
    lock
    faceplayer

    spriteface 0x6 0x1
    spriteface 0xFF 0x2
    applymovement 0x6 @m1
    waitmovement 0x0
    msgbox @talk 0x6

    msgbox @t1 0x6
    applymovement 0x6 @m2
    waitmovement 0x0
    hidesprite 0x6
    setflag 0x242
    hidesprite 0x6
    setvar 0x4022 0x1

    release
    end

    #org @talk
    = Hello, [PLAYER]!\nHow are you doing?

    #org @t1
    = I just came to say my Prayers for\nall the fallen POKéMON here.\lIt reminds me of the BELL TOWER in\lJOHTO where 3 POKéMON fell\ltragically.\pWell anyway, have a nice day.\nBye!


    '-----------
    ' Movements
    '-----------
    #org @m1
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0xFE

    #org @m2
    #raw 0x13
    #raw 0x10
    #raw 0x10
    #raw 0x12
    #raw 0x10
    #raw 0xFE 'End of Movements
     
    Hello guys and girls.
    My Problem is that i wrote a Script Tile but it does't activate correctly.
    One can step on it multiple times and nothing happens or it through sheer luck
    it activates.
    Also even if it was activated and the var set to 1 it can still activate again.
    I don't really know why this happens.
    I will post the script ,maybe I forgot something there.
    Any help will be appreciated.🙂


    SCRIPT:

    #dynamic 0x800000
    #org @start
    lock
    faceplayer

    spriteface 0x6 0x1
    spriteface 0xFF 0x2
    applymovement 0x6 @m1
    waitmovement 0x0
    msgbox @talk 0x6

    msgbox @t1 0x6
    applymovement 0x6 @m2
    waitmovement 0x0
    hidesprite 0x6
    setflag 0x242
    hidesprite 0x6
    setvar 0x4022 0x1

    release
    end

    #org @talk
    = Hello, [PLAYER]!\nHow are you doing?

    #org @t1
    = I just came to say my Prayers for\nall the fallen POKéMON here.\lIt reminds me of the BELL TOWER in\lJOHTO where 3 POKéMON fell\ltragically.\pWell anyway, have a nice day.\nBye!


    '-----------
    ' Movements
    '-----------
    #org @m1
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0x10
    #raw 0xFE

    #org @m2
    #raw 0x13
    #raw 0x10
    #raw 0x10
    #raw 0x12
    #raw 0x10
    #raw 0xFE 'End of Movements

    This is most likely happening because of var 4022. Vars from 4020 to 4024 have something to do with keeping repel values, so you should use a var other than those and the script should work properly.
     
    ahhh,Thanks man.😄
    This also explains why I get a "Repel wore of" Text message for another script.😂
     
    Back
    Top