• 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] Delete Sprite

1
Posts
3
Years
    • Seen May 13, 2021
    I need help!!!
    I use some scripts in which the player steps and some cutscene happens. some characters are scattered on the screen, so with this script they appear in places, talk and then leave. so far so good, but when I re-enter a house with this event, the character that was not supposed to be there, still it is.
    basically, the event occurs normal, until the end, where an npc is transported to a location isolated from the map. In the end, the event is inactive with a switch. But when I enter the house again, the npc is not in the isolated corner, but in the starting position!
    Sorry for my bad english...
     
    218
    Posts
    12
    Years
  • you need to set a flag at the end of the script and set that sprite's person id to the flag you set.

    From Sierra's XSE Scripting Tutorial:
    Flags are very useful when you need an event to only occur once or if you want a person to disappear.
    Let's say you set flag 0x200. If you want an overworld to disappear, we have to assign the set flag (in this example, 0x200) to the overworld's people ID in Advance-Map. I'll go into more detail on that later.
    Many flags are used within the game already. If you plan on leaving scripts that are already in the ROM, you'll need to be more careful on what flags you use, because flags can only really be used once.
     
    Back
    Top