• 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!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

Player sprite flipped? What causes that

I'm talking about in emerald battle frontier - battle tower multi battles

Before the fight starts, it shows your player character and the partner you chose standing next to each other,
but the player character front sprite is horizontal flipped for some reason. Anyone know what line of code causes that?
 
I'm assuming you're using a custom trainer sprite that's after all of the vanilla ones?

EDIT: there is a chance I've misread. If it's not during the send out anim, that's normal behaviour as it's to indicate they're facing the opponent
 
Last edited:
Right, It's not during the send out animation. Battle tower Multi-battles display your front sprite and also your partner of choice's where send out animations would otherwise be.

I have a reason to keep mine the same orientation and not flip it. Do you have any suggestions for me?
 
In the file battle_controller_player.c in the function PlayerHandleDrawTrainerPic, this block is what sets the player's sprite for Multi Battles when your partner isn't Steven:
C:
// Use front pic table for any tag battles unless your partner is Steven.
    if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gPartnerTrainerId != TRAINER_STEVEN_PARTNER)
    {
        trainerPicId = PlayerGenderToFrontTrainerPicId(gSaveBlock2Ptr->playerGender);
        DecompressTrainerFrontPic(trainerPicId, gActiveBattler);
        SetMultiuseSpriteTemplateToTrainerFront(trainerPicId, GetBattlerPosition(gActiveBattler));
        gBattlerSpriteIds[gActiveBattler] = CreateSprite(&gMultiuseSpriteTemplate, xPos, yPos, GetBattlerSpriteSubpriority(gActiveBattler));

        gSprites[gBattlerSpriteIds[gActiveBattler]].oam.paletteNum = IndexOfSpritePaletteTag(gTrainerFrontPicPaletteTable[trainerPicId].tag);
        gSprites[gBattlerSpriteIds[gActiveBattler]].x2 = DISPLAY_WIDTH;
        gSprites[gBattlerSpriteIds[gActiveBattler]].y2 = 48;
        gSprites[gBattlerSpriteIds[gActiveBattler]].sSpeedX = -2;
        gSprites[gBattlerSpriteIds[gActiveBattler]].callback = SpriteCB_TrainerSlideIn;
        gSprites[gBattlerSpriteIds[gActiveBattler]].oam.affineMode = ST_OAM_AFFINE_OFF;
        gSprites[gBattlerSpriteIds[gActiveBattler]].hFlip = 1;
    }
Basically you need to remove or comment out the line with hFlip, which is what horizontally flips the sprite.
Here is a before and after:
[PokeCommunity.com] Player sprite flipped? What causes that[PokeCommunity.com] Player sprite flipped? What causes that
 
Back
Top