Crop sprite during runtime

Get help using Construct 2

Post » Sat Mar 08, 2014 9:51 am

Is it possible to crop a sprite at runtime? I want to shrink a sprite without actually shrinking the image, but cropping it as the sprite gets smaller. Exactly like what tiled backgrounds do when you shrink them, though I can't use those because I also need to be able to resize the sprite in the regular way.

So in essence, is there some way to get both of those functionalities in one object? Perhaps another plugin I'm not aware of?
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Sat Mar 08, 2014 1:53 pm

Maybe my english is not good enough but this doesnt make sense to me: I want to shrink a sprite without actually shrinking the image.
What exactly you want to do. Maybe if you give me an example I could help you.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Sat Mar 08, 2014 3:37 pm

What you can do is at start of layout set sprite size to so x so and then when you want to expand it then set that size for example say you have sprite size is 256 x 256 so you do this
Start of layout sprite size set to say 32 x 32 and now after while you want to expand it than just set size to 256 x 256
does that make sense or not
B
256
S
39
G
15
Posts: 1,983
Reputation: 41,036

Post » Sat Mar 08, 2014 8:31 pm

I don't think I was clear. I was looking for an object that can be resized in both the way a tilebackground is, and a sprite is. Not one command that does both, but I want to have both options available. If this is still unclear an easy way to understand what I mean is to take an image, and make a tiledbackground with it, and then also make a sprite with it. Resize each one in the editor and see what happens. The only difference is that I don't necessarily need it to tile repeatedly.

It looks like I can do this with Rojo's spritesheet plugin by modifying the width and height vs the subwidth and subheight.
B
11
S
2
G
3
Posts: 283
Reputation: 1,968


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests