attract object

Get help using Construct 2

Post » Sun Feb 16, 2014 11:30 am

Ok so when collided if distance is greater than a certain amount apply force?

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Feb 16, 2014 12:10 pm

Exactly when the balls collide, have a range where the two balls are attracted at once.

It's funny because it works without me having to hit, but when they hit does not work
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sun Feb 16, 2014 12:46 pm

so you want

"I want to be attracted then stick" and "I want you to attract and not stick..." ? We must be losing something in the translation to English.

How about a drawing of what you want ?

"attract when close but stop attracting when too close" ?
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Sun Feb 16, 2014 1:06 pm

I want that when the balls collide they attract, but there is a little bounce before sticking ...
I also like that when the two balls collide attract at the same point.

You might as well put in the last link, but when they clash will attract each other

Sorry to be so heavy, if not understand me, try something else.

B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Sun Feb 16, 2014 8:08 pm

you pass me the examples? I'll manage it, as there is no way to understand
Thanks for your help, for anything here I am
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Feb 17, 2014 9:51 am

B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Feb 17, 2014 10:58 am

Last try from me...

capx - ball attract, bounce then stickRamPackWobble2014-02-17 11:21:29
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Post » Mon Feb 17, 2014 11:21 am

Is what I ask, but that bounce when they have touched the ball, not attract before. Thanks for the help


cesarzevil2014-02-17 11:34:18
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

Post » Mon Feb 17, 2014 1:16 pm

Add an instance variable to your balls, something like shouldAttract, on your second example, instead of what your are doing, just set shouldAttract to true(or 1), on both balls. Then use your first example to attract them, but also check if ball.shouldAttract is true. Does that work for you?
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Feb 17, 2014 2:26 pm

I tried but did not work, any examples?
B
11
S
5
G
1
Posts: 410
Reputation: 2,802

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: NaSTy, rayolf and 13 guests