Change Battleback mid-battle?

Evil_Nazgul0616

Veteran
Veteran
Joined
Aug 29, 2013
Messages
79
Reaction score
0
First Language
English
Primarily Uses
I have an enemy sprite that clashes with the battleback I'm currently using, but it doesn't appear until halfway through the battle. I tried to change the Battleback via battle event (I want to keep the old battleback for the first half of the battle), but it doesn't change the battleback of the battle already in progress.

Is there a way around this, or do I have to script it?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
It has to be scripted.


You would need to make @back1_sprite and @back2_sprite attr_accessors of Spriteset_Battle, and @spriteset an attr_reader of Scene_Battle (or maybe an attr_accessor).


Then via a Call Script event, you'd do this:


$scene.spriteset.back1_sprite.bitmap = Cache.battleback1(newname)


$scene.spriteset.back2_sprite.bitmap = Cache.battleback2(newname)


I haven't tested this, so it might need a bit of tweaking.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you can take a look at yanfly's field states at how it manages changing battleback mid-battle
 

Evil_Nazgul0616

Veteran
Veteran
Joined
Aug 29, 2013
Messages
79
Reaction score
0
First Language
English
Primarily Uses
It has to be scripted.

You would need to make @back1_sprite and @back2_sprite attr_accessors of Spriteset_Battle, and @spriteset an attr_reader of Scene_Battle (or maybe an attr_accessor).

Then via a Call Script event, you'd do this:

$scene.spriteset.back1_sprite.bitmap = Cache.battleback1(newname)

$scene.spriteset.back2_sprite.bitmap = Cache.battleback2(newname)

I haven't tested this, so it might need a bit of tweaking.
What, exactly, is an attr_accessor/attr_reader?
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
I cant get that dropbox script to load for some reason today. Could you post that script please.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,074
Members
137,578
Latest member
JamesLightning
Top