• 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✓] Issue In Emerald With Disappearing Player Model After Trainer Battle Script (XSE + Advance Map)

  • 3
    Posts
    4
    Years
    • Seen Aug 5, 2022
    I'm relatively new to the rom hacking scene. Apologies if a similar problem has been answered elsewhere but I've scoured the forums and can't seem to find a solution. What I'm trying to do is set a script in Emerald on the road between Victory Road and Ever Grande where Steven approaches you, battles you, and then leaves. For the most part, it works: his sprite starts hidden due to another tile I set, he approaches when you step on the trigger tile, the battle commences, and he says his ending dialogue. The issue is when he leaves; no matter how I try and remove his sprite, afterwards the camera will jump a few tiles to the right and my player sprite will disappear. I am unable to move, but I can still access the menu and use Fly to escape. Here is the script I'm using:

    Code:
    #dynamic 0x800000
    
    #org @main
    lockall
    showsprite 0x1
    clearflag 0x2B3
    applymovement 0x1 @movementsA
    waitmovement 0x0
    faceplayer
    msgbox @beforefight 0x6
    trainerbattle 0x3 0x324 0x0 @defeatfight
    msgbox @afterfight 0x6
    fadescreen 0x1
    fadescreen 0x0
    hidesprite 0x1
    setflag 0x2B3
    setvar 0x40F7 0x1
    releaseall
    end
    
    #org @beforefight
    = Steven: Hello, [player].\nCongratulations on making it\lthrough Victory Road.\pYou know, ever since we first met\nat Granite Cave, I thought there\lwas something special about you.\pWe may have fought together at the\nMossdeep Space Center, but I have\lyet to face you myself.\pSo, as the ex-champion, show me\nthat you're worthy of challenging\lthe Pokémon League!
    
    #org @defeatfight
    = Interesting.
    
    #org @afterfight
    = Steven: Wonderful! You certainly\nhave what it takes to become the\lChampion.\pGo forth, and I wish you the best\nof luck on your challenge!
    
    #org @movementsA
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0x08
    #raw 0xFE

    I initially had the fadescreen replaced with Steven moving up and offscreen (reverse of @movementsA), but when I did this the camera followed him up until he disappeared and the aforementioned problem would happen, though the overworld would also be a bit glitched. I tried using moveoffscreen to no avail, thought I may have been using that one incorrectly. I also tried rearranging some of the latter lines, such as putting hidesprite in between the fadescreens. Everything else is working as intended; after I Fly away his sprite remains hidden, and the setvar works to not trigger the script again. (Also worth noting, after the battle my avatar will briefly appear as male before switching back to female. Not sure if this is related). I'm at a loss, so any help would be much appreciated.
     

    Two questions:
    • What is Steven's movement set in A-Map?
    • Have you set the Person Event flag after using the hidesprite command?
     
    Two questions:
    • What is Steven's movement set in A-Map?
    • Have you set the Person Event flag after using the hidesprite command?

    Thanks for the response.

    -His movement type is look down, and I left the movement box at 00
    -I set Steven's Person ID to 2B3, and I have the command to set that flag after hidesprite. Is that what you mean?
     
    As said above, that may be the issue. Try that.
    And yes. That is what I meant.

    Looks like that was it, I switched his sprite to No Movement and everything appears to be working fine now. Thank you both for the help.
     
    Back
    Top