• 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 Conquest 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.

[Battle✓] How to change the position of move effects?

  • 27
    Posts
    8
    Years
    Hello! I'm trying to create an animation for Make It Rain using the latest version of pokeemerald-expansion, and I've decided on using Happy Hour's animation as a base. The problem is that, as is, the move appears to target the user instead of the opponent. What changes to I need to make to the animation in battle_anim_scripts in order for the animation to appear like its targetting the opponent?

    For reference, here's Happy Hour's animation:
    Code:
    Move_HAPPY_HOUR::
    	loadspritegfx ANIM_TAG_COIN
    	monbg ANIM_ATTACKER
    	loopsewithpan SE_M_PAY_DAY, SOUND_PAN_TARGET, 0x8, 10
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x1
    	delay 0x2
    	call CoinShower
    	call CoinShower
    	waitforvisualfinish
    	clearmonbg ANIM_ATTACKER
    	end
     
    Last edited:
    Hello! I'm trying to create an animation for Make It Rain using the latest version of pokeemerald-expansion, and I've decided on using Happy Hour's animation as a base. The problem is that, as is, the move appears to target the user instead of the opponent. What changes to I need to make to the animation in battle_anim_scripts in order for the animation to appear like its targetting the opponent?

    For reference, here's Happy Hour's animation:
    Code:
    Move_HAPPY_HOUR::
    	loadspritegfx ANIM_TAG_COIN
    	monbg ANIM_ATTACKER
    	loopsewithpan SE_M_PAY_DAY, SOUND_PAN_TARGET, 0x8, 10
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x1
    	delay 0x2
    	createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x1
    	delay 0x2
    	call CoinShower
    	call CoinShower
    	waitforvisualfinish
    	clearmonbg ANIM_ATTACKER
    	end

    The animation code for gHappyHourCoinShowerTemplate puts the shower on the attacker if the fourth argument is non-zero, so set it to zero and change the target of monbg:

    Code:
    diff --git a/data/battle_anim_scripts.s b/data/battle_anim_scripts.s
    index 2faa39dec..db9562603 100644
    --- a/data/battle_anim_scripts.s
    +++ b/data/battle_anim_scripts.s
    @@ -9506,37 +9506,37 @@ MagneticFluxSparks2:
     
     Move_HAPPY_HOUR::
            loadspritegfx ANIM_TAG_COIN
    [COLOR="Red"]-       monbg ANIM_ATTACKER[/COLOR]
    [COLOR="Lime"]+       monbg ANIM_TARGET[/COLOR]
            loopsewithpan SE_M_PAY_DAY, SOUND_PAN_TARGET, 0x8, 10
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfffb, 0x0, 0xfffb, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x5, 0x0, 0x6, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x13, 0x0, 0xa, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe9, 0x0, 0xfff6, 0x0[/COLOR]
            delay 0x2
            call CoinShower
            call CoinShower
            waitforvisualfinish
    [COLOR="Red"]-       clearmonbg ANIM_ATTACKER[/COLOR]
    [COLOR="Lime"]+       clearmonbg ANIM_TARGET[/COLOR]
            end
     CoinShower:
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1c, 0x0, 0xa, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1c, 0x0, 0xa, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfff6, 0x0, 0xfffb, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xfff6, 0x0, 0xfffb, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xa, 0x0, 0x6, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x18, 0x0, 0xa, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x18, 0x0, 0xa, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe0, 0x0, 0xfff6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffe0, 0x0, 0xfff6, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0xffec, 0x0, 0xfff6, 0x0[/COLOR]
            delay 0x2
    [COLOR="Red"]-       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1e, 0x0, 0xa, 0x1[/COLOR]
    [COLOR="Lime"]+       createsprite gHappyHourCoinShowerTemplate, ANIM_TARGET, 2, 0x1e, 0x0, 0xa, 0x0[/COLOR]
            delay 0x2
            return
     
    diff --git a/src/data/battle_moves.h b/src/data/battle_moves.h
    index 940dec57d..ef255922f 100644
    --- a/src/data/battle_moves.h
    +++ b/src/data/battle_moves.h
    @@ -10094,7 +10094,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
             .accuracy = 0,
             .pp = 30,
             .secondaryEffectChance = 0,
    [COLOR="Red"]-        .target = MOVE_TARGET_USER,[/COLOR]
    [COLOR="Lime"]+        .target = MOVE_TARGET_SELECTED,[/COLOR]
             .priority = 0,
             .flags = 0,
             .split = SPLIT_STATUS,

    [PokeCommunity.com] How to change the position of move effects?
     
    Back
    Top