[Solved] Floating Pin Behavior

Get help using Construct 2

Post » Thu Sep 12, 2013 2:02 pm

It probably would be best to put balloon and rope in a container.
and set the rope to invisible at start and visible when the distance is less then a certain amount.

only create the pin if the rope is visible.
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 » Thu Sep 12, 2013 2:04 pm

Ok these are awesome suggestions. Let me tinker with this and see what I can come up with. Thanks! I'll report back with some progress soon.
B
13
S
3
G
2
Posts: 11
Reputation: 1,361

Post » Thu Sep 12, 2013 4:00 pm

Alright I have updated the capx with my latest progress. I tried doing the rope in the method suggested, but I couldn't wrap my head around it. The results were awful :D

Using containers and joints I was able to get the string to attach to the balloon, but it still will not attach to the falling object using joints. I have to pin it.

My thinking is that once the balloon and string (which are jointed) is dragged on top of the falling sprite, I *should* be able to joint the string to the falling object and it will tether it.

This is still not happening.

Also.... all of the balloons are now "resisting" touch/mouse like they don't want to be clicked. No idea why this is happening... grrr.

B
13
S
3
G
2
Posts: 11
Reputation: 1,361

Post » Thu Sep 12, 2013 4:10 pm

You will have to choose for either physics or other behaviours. Working together with other behaviours physics gives unexpected and often unwanted results.

I can't make a working example of my explanation right now, so I can't be sure what I imagined can be done.

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 » Thu Sep 12, 2013 4:13 pm

I tried placing only physics behavior on the objects, but I'm not sure how to simulate that gravity/float effect.

Place velocity and force didn't seem to move them, nor did setting world gravity. How would I achieve those effects using only the physics behavior?
B
13
S
3
G
2
Posts: 11
Reputation: 1,361

Post » Thu Sep 12, 2013 4:55 pm

Didn't get the effect completely right,but At least I tried

When attaching balloons the gravity-effect on the animalballoon will change.. Needa a lot of tweaking though..
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 » Thu Sep 12, 2013 5:16 pm

Wow! This is perfect! I see now what I was missing was the every tick update position of the string/rope sprite. I really can't thank you enough for helping out with this!

Solved!

The only minor issue I am having now is the rope seems to attach to any falling object, not just the one it's "meant" to attach to.GrimPanda2013-09-12 17:25:41
B
13
S
3
G
2
Posts: 11
Reputation: 1,361

Post » Thu Sep 12, 2013 5:30 pm

The most important change I made was setting the isactive off when attached, so it wouldn't try re-attaching all the time.
The "rope" is just for show, it doesn't actually do anything but show the rope connection that is made. (sometimes it goes to another animalballoon, but this has no actual effect)
With every balloon attached right now the gravity on the animalballoon becomes 20 less, so after 2 balloons it's already -15, but because the falling speed it will take some time for the animalballoon to slow down and start to rise.

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

Previous

Return to How do I....?

Who is online

Users browsing this forum: 8tomo8, brunopalermo and 10 guests