How do I keep a sprites' border the same size?

Get help using Construct 2

Post » Mon Mar 30, 2015 11:34 am

Hello,

Image
Image

I have a white background/black border - sprite which can change its size. How do I keep the border always the same size? (exactly 5 pixel thick anytime)
thank you
B
12
S
3
Posts: 208
Reputation: 1,471

Post » Mon Mar 30, 2015 12:19 pm

Try using the 9-patch-object instead of the sprite-object, It is specifically meant for this..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Mon Mar 30, 2015 12:33 pm

the problem with the 9-patch-object is, that it changes its shape in certain positions. Instead of a square it looks like this: Image
B
12
S
3
Posts: 208
Reputation: 1,471

Post » Mon Mar 30, 2015 3:57 pm

Strange..
What image are you using and what are the settings?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Mon Mar 30, 2015 4:04 pm

the standard ones. But it doesn't matter how I change it..it always ends up weirldy when i change the position and size :/
B
12
S
3
Posts: 208
Reputation: 1,471

Post » Tue Mar 31, 2015 2:52 pm

I can't imagine why..
I have had no issues at all..
Try this:

Download this 9-patch.png
create a new 9-patch object
load the png
keep all the settings as is
it should deform perfectly while keeping the edges the same
You do not have the required permissions to view the files attached to this post.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Tue Mar 31, 2015 5:33 pm

well then try the following. Move the bottom right corner from your picture to the left side of your left bottom corner and it happens the same :)
B
12
S
3
Posts: 208
Reputation: 1,471

Post » Tue Mar 31, 2015 5:38 pm

Haha..

Yes using negative values for width and height won't work..
There is absolutely no reason to do that, so that shouldn't be an issue..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
53
S
16
G
8
Posts: 6,157
Reputation: 19,744

Post » Tue Mar 31, 2015 7:48 pm

yes, there is a reason to do that ;) but nvm..thank you
B
12
S
3
Posts: 208
Reputation: 1,471


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests