Zoom by Turn

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Just curious, is there a way to zoom the battlebacks when you finish your turn? After selecting your party's moves, I want to zoom the battle backgrounds, then if my turn ends, then the battle background unzooms. Is that even possible?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
mog hunter made a zoom system also Enu have zoom system both are good on that but ENU is more clean then moghunter even if the comment are japanese you just have to read the code

but on my OWN perception 

you just have to take the battleback sprite and made them zoom progressively 
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I do not want to use anyone's script. I am looking for the HOW of this method, that is why I made such inquiry :)
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
and I SHowed you REFERENCE for know how you can do it explain how to make a battle cameras is not simple Only Enu , Moghunter and TheoAllen made that.

 I work on my own for Dark Fantasia but this not a classical maps this a Dynamic maps who do rotation like in isometric and I will not throw out these experimental code to you because this not a good exemple to follow :/

you need at least for build your battle camera without provoking a bug  

to know how to zoom a sprite first

after you will need to understand HOW to make a zoom slide who require maths 

Aftet you will need to understand how to input them to your turn balance.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I am sorry but I am not looking for a battle camera, but the battlebackground itself to zoom, not the whole thing. As for your battle cameras, I've seen a lot of people do battle cameras, not just the ones you've mentioned. 

What I exactly want to know is not how battle cameras work, but rather, I want my battlebacks to zoom, not the entire camera to focus on who I am attacking. So, the camera stays the same, but the battlebacks zoom. 
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
You will want to create a method inside Spriteset_Battle and modify the background there, then call it from Scene_Battle.

Quick example:

class Spriteset_Battle def zoom_back(zoom_x, zoom_y) # @back1_sprite is the floor sprite # @back2_sprite is the wall sprite @back1_sprite.zoom_x = zoom_x @back1_sprite.zoom_y = zoom_y @back2_sprite.zoom_x = zoom_x @back2_sprite.zoom_y = zoom_y endendclass Scene_Battle < Scene_Base # calls our method from Spriteset_Battle def zoom_back(zoom_x, zoom_y) @spriteset.zoom_back(zoom_x, zoom_y) endendOf course that would instantly zoom to the value and wouldn't look to nice.

Would probably look better if you did something like:

def zoom_back(zoom_x = 1.0, zoom_y = 1.0) @zoom_x = zoom_x @zoom_y = zoom_yendalias :zupdate :updatedef update zupdate update_zoomenddef update_zoom return unless @zoom_x && @zoom_y return if @back1_sprite.zoom_x == @zoom_x && @back1_sprite.zoom_y == @zoom_y @back1_sprite.zoom_x = [@back1_sprite.zoom_x + 0.1, @zoom_x].min if @back1_sprite.zoom_x < @zoom_x @back1_sprite.zoom_x = [@back1_sprite.zoom_x - 0.1, @zoom_x].max if @back1_sprite.zoom_x > @zoom_x @back1_sprite.zoom_y = [@back1_sprite.zoom_y + 0.1, @zoom_y].min if @back1_sprite.zoom_y < @zoom_x @back1_sprite.zoom_y = [@back1_sprite.zoom_y - 0.1, @zoom_y].max if @back1_sprite.zoom_y > @zoom_x # Same thing but now for @back2 @back2_sprite.zoom_x = [@back2_sprite.zoom_x + 0.1, @zoom_x].min if @back2_sprite.zoom_x < @zoom_x @back2_sprite.zoom_x = [@back2_sprite.zoom_x - 0.1, @zoom_x].max if @back2_sprite.zoom_x > @zoom_x @back2_sprite.zoom_y = [@back2_sprite.zoom_y + 0.1, @zoom_y].min if @back2_sprite.zoom_y < @zoom_x @back2_sprite.zoom_y = [@back2_sprite.zoom_y - 0.1, @zoom_y].max if @back2_sprite.zoom_y > @zoom_xend can change that 0.1 to change the speed of the zoom. I just pick 0.1 randomly, but 1 is 100% zoom (default) so you'll want some small float value for the speed.
And since you want it by turns you can call it from the turn start / end methods instead Scene battle
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Thanks a lot Quasi! You've helped me a lot. See, this is what I wanted to know...instead of redirecting me to a battle camera that my post has nothing to deal with.

Thanks a lot and this can be closed.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Thanks a lot Quasi! You've helped me a lot. See, this is what I wanted to know...instead of redirecting me to a battle camera that my post has nothing to deal with.

Thanks a lot and this can be closed.
Rectification Milena this simply a incomprehension and for saying battle camera are similar simply because they use the spritesetbattle and rectification again this not focus on the target but that's zoom the screen.

but nevermind happy you find you result 

but instead of saying a really not kind allusion you could just say thank you for someone who tried to help you even if they had mistake
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

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
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,567
Latest member
sashalag
Top