• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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] NPC not disappearing.

  • 15
    Posts
    4
    Years
    • Seen Aug 3, 2024
    I wrote a NPC script, but the NPC won't disappear.
    Any help would be appreciated.


    Here's the Script:

    '---------------
    #org 0x808E53
    lock
    faceplayer
    msgbox 0x8808E6D MSG_NORMAL '"Hey,[player]!\nYou should check ou..."
    hidesprite 0x20
    setflag 0x244
    fadescreen 0x3
    hidesprite 0x20
    fadescreen 0x2
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x808E6D
    = Hey,[player]!\nYou should check out the SAFARI\lZONE, it has a lot of rare\lPOKéMON, which could strengthen\lyour TEAM.\lSadly we don't have a SAFARI ZONE\lin JOHTO, but I hope we will get\lone soon.\lAnyway, enjoy your time here.\lSee ya!
     
    Firstly you've got redundancy in your script. You don't need all 3 of these lines:
    hidesprite 0x20
    setflag 0x244
    hidesprite 0x20
    Just 1 hidesprite command is enough. Hidesprite automatically does the setflag as long as the npc has a flag added to them in your map editor.

    As for why your npc isn't getting hidden it's probably because 0x20 is wrong. 0x20 is a hex number that is 32 in decimal and it's pretty unlikely you have 32 npcs in your map. Use the actual person event number of the npc converted to hex.
     
    Thank you very much.
    I changed it and now it's working.
    I am thankful for your help.😄
     
    Back
    Top