• 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] Trainer Sprite not disappearing

  • 15
    Posts
    3
    Years
    • Seen Jun 9, 2024
    Hallo.
    For some reason my enemy Trainer Overworld Sprite doesn't dissapear right away.
    It just stays there until I leave the Area and come back than it is gone, but
    it should dissapear after the battle and some Dialogue.

    Here's the Script:

    '---------------
    #org 0x806E6A
    lock
    faceplayer
    trainerbattle 0x1 0x3 0x0 0x8806E8E 0x8806EDA 0x8806F0F
    hidesprite 0x10
    setflag 0x2FD
    fadescreen 0x3
    hidesprite 0x10
    fadescreen 0x2
    release
    end

    '---------------
    #org 0x806F0F
    msgbox 0x8806F21 MSG_NORMAL '"[green_fr]This isn't over yet.\nI ..."
    fadescreen 0x3
    hidesprite 0x10
    fadescreen 0x2
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x806E8E
    = [green_fr]Hey!\nHey,You!\lYes,You!\lYou look weak.\lLet me Show you how Strong I am.

    #org 0x806EDA
    = IMPOSSIBLE!\nThis was supposed to be an easy\lFIGHT.

    #org 0x806F21
    = [green_fr]This isn't over yet.\nI will get you next Time!
     
  • 120
    Posts
    5
    Years
    • Seen Nov 2, 2023
    Here are a couple of ideas I can suggest:

    - You can delete the second hidesprite command as one is enough,
    - I see you're using hidesprite 0x10, if person event number is 10, then you should write the command like: "hidesprite 0xa" because you need to convert decimal numbers to hexadecimal, and this is probably the cause of the error,
    - Carefully inspect that the flag and the person event numbers are correct, both in Advance Map and the script,
    - Try using a different flag if you want, but seeing as the trainer disappears after getting back to the area this may indicate that the setflag worked,
    - Check the level scripts of the map your NPC is located, some level scripts could interfere with appearing/disappearing.
     
  • 15
    Posts
    3
    Years
    • Seen Jun 9, 2024
    Hey man,
    You are a great Help.
    It works now.
    I will keep your Tips in mind while continuing.
    Your are Awesome!😆👍
     
    Back
    Top