[Solved] How do I create a chain connection?

Get help using Construct 2

Post » Mon Feb 15, 2016 11:27 am

Hey guys, how are you?
I try to create a chain connection, but i think something missing.. : -(
Please take a look to capx file: http://odiusfly.com/chain_v1.capx
Any help? Thanks! : -)
Last edited by odiusfly on Sat Feb 20, 2016 8:14 am, edited 2 times in total.
Official Website

Games @ Scirra Store Soon..

Android Games @ Google Play Store

iOS Games @ Apple App Store Soon..

Games @ Codecanyon Store
B
40
S
21
G
4
Posts: 207
Reputation: 5,843

Post » Mon Feb 15, 2016 8:53 pm

Anyone?
Official Website

Games @ Scirra Store Soon..

Android Games @ Google Play Store

iOS Games @ Apple App Store Soon..

Games @ Codecanyon Store
B
40
S
21
G
4
Posts: 207
Reputation: 5,843

Post » Mon Feb 15, 2016 9:27 pm

It seems to work just fine, as long as you don't break the chain while istouch = 1

You don't have any events/actions to change the animationframe while istouch = 1
This can probably be solved with a simple else event..
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 » Mon Feb 15, 2016 10:39 pm

Did you try "else" method? I don't think "else" only can fix all this. I think it depends some extra code, but I have stuck.
"Else" would be work if we have 2 objects only for example. If you read carefully inside capx, i said how i want to work. By the way, thanks for your reply.. : -)
Official Website

Games @ Scirra Store Soon..

Android Games @ Google Play Store

iOS Games @ Apple App Store Soon..

Games @ Codecanyon Store
B
40
S
21
G
4
Posts: 207
Reputation: 5,843

Post » Thu Feb 18, 2016 11:34 am

I would not use "overlaping" to determine the connection or not.
If your game doesn't expect more than 4 instances in a row, use an instance variable (or the IID) to determine which "box2" your are testing, and depending on the state of the previous instance (either "connecting" or "cut") you know what color to apply to the current instance.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
267
S
95
G
66
Posts: 7,210
Reputation: 73,086

Post » Thu Feb 18, 2016 11:48 am

Thanks for your reply!!! Do you check my capx? You will see inside what exactly i need.
If you have free time, can you do a fix version? Big Thanks!

Note: This is a sample. At the future i want to use more shapes, the important for me is, all shapes to connected (to be green color) by the first object.
If the first object is set off, then all objects to be red. Think a "line" for example, starts from 0 and end to 10. If disconnect the number 3, the numbers 1-2 will remain green and the numbers 3-10 will be red. Hope you understand..
Official Website

Games @ Scirra Store Soon..

Android Games @ Google Play Store

iOS Games @ Apple App Store Soon..

Games @ Codecanyon Store
B
40
S
21
G
4
Posts: 207
Reputation: 5,843

Post » Thu Feb 18, 2016 6:31 pm

Change the condition in event 5 from "X Box1 is overlapping family1" to "every tick" and then move the event to be above event 4.
That fixes it in the situation you have but it probably will fail later on in some situations. Adding a "repeat 10" condition to the top of event 6 would be a quick fix, although not the most efficient.
B
85
S
27
G
84
Posts: 5,059
Reputation: 57,352

Post » Fri Feb 19, 2016 6:17 am

Thank you for your reply but is not working.. So to create a logical line like a said above is too difficult?
Official Website

Games @ Scirra Store Soon..

Android Games @ Google Play Store

iOS Games @ Apple App Store Soon..

Games @ Codecanyon Store
B
40
S
21
G
4
Posts: 207
Reputation: 5,843

Post » Fri Feb 19, 2016 7:39 am

It worked when I did it, so unless I wrote it down wrong, I don't know what's amiss.
B
85
S
27
G
84
Posts: 5,059
Reputation: 57,352

Post » Fri Feb 19, 2016 8:38 am

odiusfly wrote:Thank you for your reply but is not working.. So to create a logical line like a said above is too difficult?

@R0J0hound 's solution seems to work ...
https://www.dropbox.com/s/4eei661iviid9 ... .capx?dl=0
“The best time to plant a tree is 20 years ago. The second best time is now.”
B
31
S
7
G
4
Posts: 380
Reputation: 4,524

Next

Return to How do I....?

Who is online

Users browsing this forum: KittenKatja, MAVERICK, QuantumMMX and 12 guests