• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

[Scripting Question] Sprite disappears when using a self switch to change it's appearance.

  • 65
    Posts
    12
    Years
    • Seen Jan 4, 2022
    Not sure if this counts as a scripting question but anyways, heres the issue.

    I set up a scenario where the player encounters a character that changes forms during there conversation.

    I'm using the pbSetSelfSwitch script command to shuffle through his forms during the coversation.

    However, when ever I get past the first form the sprite disappears.

    is pbSetSelfSwitch not meant for anything beyond selfswitch A? Setting selfswitch A on has never given me difficulty, ever but once I get to B and C it never seems to work.

    The image is properly set in each event page, so that's not the issue. I then tried adding a wait after calling the self switch, cuz I've seen that as an issue before, especially with audio sounds too close to an action. But that didn't work.

    This is what it looks like essentially

    Enemy text: blah blah

    PLayer text blah blah

    pbSetSelfSwitch(1, "A", true)

    [And the form changes with no graphical errors.]

    Player text

    enemy text

    pbSetSelfSwitch(1, "B", true)

    [And the enemy sprite vanishes]

    Again I did ensure that the images were set properly in each event page, So I'm really stuck as to what's going on.
     
    While this doesn't exactly answer your question, within the "Set Move Route Command" there's an option to change a sprite. This may be more convenient than using a Self Switch each time.
    [PokeCommunity.com] Sprite disappears when using a self switch to change it's appearance.


    As for the event page issue, I guess just make sure the event pages are in the right order?
     
    Back
    Top