Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Double Battle Sprite Fix

Notices
For all updates, view the main page.

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.



Reply
 
Thread Tools
  #1    
Old August 22nd, 2013 (01:31 AM).
dexter1o6 dexter1o6 is offline
 
Join Date: Jul 2013
Age: 27
Gender: Male
Posts: 64
Hi,

As you probably know (unless it is just me), there is something odd with the pokemon sprites of the foe in double battles. The wrong one is on top. I've been looking for a fix, but...

I think it is in 'PokemonSprites' that the position of the pokemon in battle is altered. But, I don't know where to go from there. Is there a function I can call to bring the sprite to the top?

Regards, Dexter
Reply With Quote
  #2    
Old August 25th, 2013 (10:38 AM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,407
Look at 'ret-=16 if index==3' in PokemonSprite script section, if you change it to 'ret-=16 if index==1' you change the sprite that will be more at top.
__________________
Reply With Quote
  #3    
Old August 27th, 2013 (11:44 PM). Edited August 27th, 2013 by dexter1o6.
dexter1o6 dexter1o6 is offline
 
Join Date: Jul 2013
Age: 27
Gender: Male
Posts: 64
Sorry for my late reply, I wanted to take the time to test it first (and I was still working on something else).

Anyway, just changing the '3' to a '1' doesn't seem to work. I'll keep trying though.

EDIT: to clarify the problem, see the tiny-appearing ursaring standing on top of Slaking's leg (while Ursaring should be behind Slaking)...
Attached Thumbnails
Ursaring atop Slaking.jpg‎  
Reply With Quote
  #4    
Old September 1st, 2013 (03:43 AM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,407
Sorry, I misunderstand. In PokeBattle_ActualScene, before line '@sprites["pokemon1"].x=-144' add '@sprites["pokemon1"].z+=1'.
__________________
Reply With Quote
  #5    
Old September 1st, 2013 (02:40 PM). Edited September 2nd, 2013 by dexter1o6.
dexter1o6 dexter1o6 is offline
 
Join Date: Jul 2013
Age: 27
Gender: Male
Posts: 64
So there is a z coordinate, even though it is not 3D. It makes sense that playing with that changes the one that is on top. Thanks!

I will edit this post later today when I'm able to change and test it.

It didn't work, but through your advice I did find the answer:

I've changed the order in which the images are created:

This:
Spoiler:
Code:
@sprites["shadow0"]=IconSprite.new(0,0,@viewport)
    pbAddSprite("shadow1",0,0,"Graphics/Pictures/battleShadow",@viewport)
    @sprites["shadow1"].visible=false
    @sprites["pokemon0"]=PokemonBattlerSprite.new(battle.doublebattle,0,@viewport)
    @sprites["pokemon1"]=PokemonBattlerSprite.new(battle.doublebattle,1,@viewport)
    if battle.doublebattle
      pbAddSprite("shadow3",0,0,"Graphics/Pictures/battleShadow",@viewport)
      @sprites["shadow3"].visible=false
      @sprites["shadow2"]=IconSprite.new(0,0,@viewport)
      @sprites["pokemon2"]=PokemonBattlerSprite.new(battle.doublebattle,2,@viewport)
      @sprites["pokemon3"]=PokemonBattlerSprite.new(battle.doublebattle,3,@viewport)
    end


Becomes this:
Spoiler:
Code:
    if battle.doublebattle
      pbAddSprite("shadow3",0,0,"Graphics/Pictures/battleShadow",@viewport)
      @sprites["shadow3"].visible=false
      @sprites["pokemon3"]=PokemonBattlerSprite.new(battle.doublebattle,3,@viewport)
    end
    @sprites["shadow0"]=IconSprite.new(0,0,@viewport)
    pbAddSprite("shadow1",0,0,"Graphics/Pictures/battleShadow",@viewport)
    @sprites["shadow1"].visible=false
    @sprites["pokemon0"]=PokemonBattlerSprite.new(battle.doublebattle,0,@viewport)
    @sprites["pokemon1"]=PokemonBattlerSprite.new(battle.doublebattle,1,@viewport)
    if battle.doublebattle
      @sprites["shadow2"]=IconSprite.new(0,0,@viewport)
      @sprites["pokemon2"]=PokemonBattlerSprite.new(battle.doublebattle,2,@viewport)
    end
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 06:16 PM.