Sprite shrink nearer it gets to an object

Get help using Construct 2

Post » Thu Feb 20, 2014 5:48 pm

How do I make a sprite shrink gradually the nearer and nearer it gets to another sprite until eventually touching the other sprite and disappears?
B
6
S
1
Posts: 89
Reputation: 619

Post » Thu Feb 20, 2014 5:52 pm

Use distance(x1,y1,x2,y2) expression to control opacity.

Edit: I meant to say use distance to control size! But probably after reading last word about disappearing I've put opacity instead of a size. Sorry about that.
Last edited by shinkan on Fri Feb 21, 2014 12:20 pm, edited 1 time in total.
B
157
S
66
G
41
Posts: 2,598
Reputation: 34,823

Post » Fri Feb 21, 2014 11:01 am

is there any way I can shrink it the closer it gets to an object and use the opacity?
B
6
S
1
Posts: 89
Reputation: 619

Post » Fri Feb 21, 2014 11:16 am

You could use the same distance expression to change the size if that's what you are after.
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Feb 21, 2014 1:41 pm

@shinkan lol, it's alright. For the distance(x1,y1,x2,y2) What event do I use though? Set Scale? Do I select my sprite?
B
6
S
1
Posts: 89
Reputation: 619


Return to How do I....?

Who is online

Users browsing this forum: DharmaOne, ezgaming420 and 20 guests