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

[Script] Script Tile keeps activating randomly

  • 15
    Posts
    3
    Years
    • Seen May 15, 2023
    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
     
  • 120
    Posts
    5
    Years
    • Seen Nov 2, 2023
    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.
     
  • 15
    Posts
    3
    Years
    • Seen May 15, 2023
    ahhh,Thanks man.😄
    This also explains why I get a "Repel wore of" Text message for another script.😂
     
    Back
    Top