v18.1 Scripting questions

This thread pertains to v18.1 of Pokémon Essentials.

Leondrea

Trainer
Member
Joined
Jul 26, 2020
Posts
58
Hi, I've made some Trainer vs graphics, and changed the vs graphic to blue, green and red/pink.
And now I want that the game shows up a red vs graphic, when the player is female
and when the player is a boy I want that the blue vs graphic is shown. (now I've realised that I didn't need to make the green one for the rival)
How do I do that? Is there a way to add that in the scripts? I'm not good at scripting, pls help.
I'll credit you in my projects. Thanks in advance.
 

Attachments

  • vs0.png
    vs0.png
    1.9 KB · Views: 4
  • vs1.png
    vs1.png
    2.1 KB · Views: 6
  • vs4.png
    vs4.png
    2 KB · Views: 4
Solution
I haven't tested this, but you could try going to def pbBattleAnimationOverride in PField_Visuals and find this line:
Ruby:
vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs")
Replace it with:
Ruby:
if $Trainer.gender==0 # player is male
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs0")
else # player is some other gender
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs1")
end

ThatWelshOne_

Eevee User
Member
Joined
Sep 29, 2020
Posts
137
I haven't tested this, but you could try going to def pbBattleAnimationOverride in PField_Visuals and find this line:
Ruby:
vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs")
Replace it with:
Ruby:
if $Trainer.gender==0 # player is male
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs0")
else # player is some other gender
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs1")
end
 
Solution

Leondrea

Trainer
Member
Joined
Jul 26, 2020
Posts
58
I haven't tested this, but you could try going to def pbBattleAnimationOverride in PField_Visuals and find this line:
Ruby:
vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs")
Replace it with:
Ruby:
if $Trainer.gender==0 # player is male
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs0")
else # player is some other gender
  vs.bitmap  = BitmapCache.load_bitmap("Graphics/Transitions/vs1")
end
I've tested it and it works fine! Thank you
 
Top