• 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 Not Working

2
Posts
5
Years
    • Seen Jun 24, 2019
    I have tried changing this script in many ways; however, every time, the game freezes upon activation. If you have any ideas to help me fix it, that would be greatly appreciated.

    Script:
    #dynamic 0x800000
    #org @start
    checkflag 0x201
    if 0x0 goto @movement
    end

    #org @movement
    lock
    applymovement 0x6 @m1
    waitmovement 0x6
    msgbox @t1 0x6
    waitkeypress
    goto @continue

    #org @continue
    msgbox @t2 0x6
    showpokepic 0x392 0x0A 0x03
    waitkeypress
    hidepokepic
    givepokemon 0x392 0x5 0x0 0x0 0x0 0x0
    setflag 0x828
    fanfare 0x13E
    msgbox @t2 0x4
    waitfanfare
    closeonkeypress
    msgbox @t3 0x5
    compare 0x800D 0x1
    if 0x1 call @name
    fadescreen 0x1
    hidesprite 0x06
    fadescreen 0x0
    setvar 0x4011 0x1
    setflag 0x201
    release
    end

    #org @m1
    #raw 0x6
    #raw 0x29
    #raw 0x2C
    #raw 0x29
    #raw 0x29
    #raw 0x2C
    #raw 0x2C
    #raw 0x2C
    #raw 0x2C
    #raw 0x29
    #raw 0x62
    #raw 0xFE

    #org @name
    countpokemon
    subvar 0x800D 0x1
    copyvar 0x8004 0x800D
    fadescreen 0x1
    special 0x9E
    waitstate
    return

    #org @t1
    = [blue_fr]WAAAAAAAAAAAAAAAIT!!!

    #org @t4
    = [blue_fr]It is dangerous out there without\la Pok\h1Bmon! Good thing I have an\lextra to spare. Here take this\l[red_fr]Ralts[blue_fr].

    #org @t2
    = [blue_fr][player] recieved a [red_fr]Ralts[blue_fr]!

    #org @t3
    = [blue_fr]Would you like to name that\n[red_fr]Ralts[blue_fr]?
     

    DrFuji

    [I]Heiki Hecchara‌‌[/I]
    1,691
    Posts
    14
    Years
  • Since this appears to be a tile script and you're experiencing freezing issues, make sure your script tile has a 'Var number' attached. As for the script itself, here are a few errors/ issues that I found:

    Spoiler:


    While the above script should work for what you want to do right now, you should consider running the script based upon a variable rather than a flag. Tile scripts that check for flags instead of variables have issues such as interrupting the town/ route name in the top-left corner if they're near the entrance of a map and grinding the player's speed down to zero (this is very noticeable when you're at full speed on a bike). You'll avoid those glitches and even be able to remove the '@start' segment of your script, saving you more space. Check out this thread if you want to learn more about how to have scripts activate based upon a variable~
     
    Back
    Top