• 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] Level script freezes player after it's finished.

2
Posts
5
Years
    • Seen Jul 12, 2023
    Hi!

    I've been trying to make a simple level script in XSE. It's supposed to hide a sprite in another map, move player and NPCs and prompt messageboxes. It seems to run as intended but when the script ends, the player freezes (but music keeps playing). What have I missed?
    I'm pretty sure I've included all neccesary 0xFE, waitmovement and releaseall commands. At A-map (1.92) I've used script type: 02, flag 0x4011, value:0001 and script offset same as compiled.

    The script itself:
    Code:
    #dynamic 0xAF2985
    
    #org @start
    spriteinvisible 0x1 0x4 0x3
    setflag 0x154
    applymovement 0x2 @o1
    waitmovement 0x0
    msgbox @hey 0x6
    applymovement 0xFF @p1
    waitmovement 0x0
    msgbox @oak 0x6
    applymovement 0x2 @o2
    waitmovement 0x0
    setvar 0x4011 0x2
    releaseall
    end
    
    #org @o1
    #raw 0x62
    #raw 0x00
    #raw 0xFE
    
    #org @p1
    #raw 0x11
    #raw 0xFE
    
    #org @o2
    #raw 0x13
    #raw 0x13
    #raw 0x02
    #raw 0xFE
    
    #org @hey
    = Oh, there you are [PLAYER]!\nCome on up.
    
    #org @oak
    = Your mother told me you were going\nto registrate as an officially\llicensed Pokémon Trainer today,\lbut I was starting to doubt\lwhether you'd really show up.\lWell whatever.\l[Cyan_fr]Cian[black_fr] and [red_fr]Lass[black_fr] have been\lwaiting patiently, but today it\lpays of being late!\l[PLAYER], go ahead and choose your very\lfirst Pokémon!

    Edit: I'm using Fire Red as a base
     

    Dr. Seuss

    Will finish GS Chronicles, I swear!
    525
    Posts
    10
    Years
  • The script is okay if it was selected as a 02 type script. If not seems the issue tends to happen on maps where there was no map scripts and one is added. It can be easily fixed by going to the map header in A-map by pressing Ctrl+H when you're at the last tab (where you add/edit the map scripts) and after deign it locate the Map script offset. copy it and you will need to decompile it with XSE in a specific way. After you paste the map script offset copied select first the wrench-like icon next to the decompile gear icon. Once clicked you can decompile it normally.

    If you see at the top of the script some #raw 0x... then you did it right. You have to look in the second script one specific part. There has to be a line that says "#raw 0xFFFF" change the FFFF for a single 0 and then compile it again (All of this without re-factorization enabled, of course). Now the script should work.


    I'm writing this by heart and I'm not at home so I'm not sure if I missed something but pretty sure this should work.
     
    Back
    Top