Pin between instances without Families?

Get help using Construct 2

Post » Sun Apr 13, 2014 7:55 am

Hi,

building a snake demo for a base flexible chain algorithm, but the Pin behavior does not support to pin between 2 unique instances of the same object.

So I've tried through families (as in the demo rope project), but the new instance connects to the whole family instead of the last instance.

Hope you know what I mean; attached the project file. Use the left/right arrow keys a while..

Snake Evolution0.2.capx


Any help welcome :)
You do not have the required permissions to view the files attached to this post.
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Sun Apr 13, 2014 10:49 am

Where you have 'Set number to BlobFamily.PickedCount', PickedCount will always be 1 since you've just created a new Blob and it will be the only one picked. Use BlobFamily.Count instead in those two actions. And I'd add a 'Blob is NOT pinned' condition to the top of event 3.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,630

Post » Sun Apr 13, 2014 8:44 pm

Thank you, your Tipps finally made the first logic work.

Now I will try to reduce the chain length during runtime, so there will be green and red apples.

Attached the current work, maybe someone can find a use for it.

Snake Evolution0.6.capx


Best regards!
You do not have the required permissions to view the files attached to this post.
B
15
S
3
G
5
Posts: 396
Reputation: 4,977


Return to How do I....?

Who is online

Users browsing this forum: Alvaro2 and 14 guests