zoom_x and zoom_y

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Is there a way to do zoom_x and zoom_y for the sprites and tilingsprites?
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
With MV you'll want to look into the 'scale' property. Note, however, this time it isn't two separate variables. It's scale.x and scale.y. Other than that, they work pretty much the same way.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
However beware because doing 

this.spritename.scale.x = -1this.spritename.scale.y = -1will invert the sprite >>
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,696
Reaction score
935
First Language
English
Primarily Uses
N/A
However beware because doing 

this.spritename.scale.x = -1this.spritename.scale.y = -1will invert the sprite >>
As I recall, that's how they worked in other makers, so that should be fine. Even if it isn't here w they worked, I think that it's better to have an easy way to flip them.

I think the most notable thing in this case, though I'm not sure how it worked in previous versions, is that inverting the scale will place the sprite on the other side of the inverted axis. For example, a scale of x = -1 and y = 1 will draw the sprite such that it's X and Y positions are the top RIGHT corner, not top Left corner. This is an important topic to note.
 

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 also found out that they don't exactly zoom up. Here's what I mean. I have an image that's circular and I want it to become larger by zooming it, but instead, it transformed the image, by transforming, what I mean is, when I placed scale.x and scale.y to 0.40, it did decrease the size of the circle, but starts on the top left.

What measurements should I do it with so it beams up the image starting from the center?
 

Galenmereth

Retired
Veteran
Joined
May 15, 2013
Messages
2,248
Reaction score
2,158
First Language
English
Primarily Uses
N/A
@Milena: That'd be the sprite's anchor properties: anchor.x and anchor.y. Centering would be

anchor.x = anchor.y = 0.5Combining both into one line here.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
@Milena: That'd be the sprite's anchor properties: anchor.x and anchor.y. Centering would be

anchor.x = anchor.y = 0.5Combining both into one line here.
I see. Thanks a lot. What I came into solution so that the bigger image would fit is actually to divide the image to your current window sizes, then scaling it. Never knew there was an easier way. I'll remember this method :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top