• 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] NPC not disappearing.

  • 15
    Posts
    3
    Years
    • Seen Jun 9, 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!
     

    Asith

    Uwao
  • 237
    Posts
    3
    Years
    • Seen yesterday
    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.
     
  • 15
    Posts
    3
    Years
    • Seen Jun 9, 2024
    Thank you very much.
    I changed it and now it's working.
    I am thankful for your help.😄
     
    Back
    Top