[PUZZLE] How do I fix chain reaction in Bubble Shooter?

Get help using Construct 2

Post » Tue Aug 05, 2014 9:54 pm

Hey Guys, I'm having a problem about chain reaction, basically I want to connect all same colour bubbles to destroy when are connected.

This .capx actually can destroy all same colour bubbles while they aren't connected.

Instructions:

You can play as you can understand how it works.

Then Press E to activate one colour bubble to shoot and connect togheter until 3 bubbles are matched to destroy.

There are 2 screenshot:

After press "E", then shoot 2 bubbles in left and shoot one bubble in right, now shoot another bubble in left, it works fine as it's connected.

Image

The problem is if we do 2 bubbles in left and 2 bubbles in right, then shoot to left or right, it destroys all bubbles while is not connected, it's broken, I had no idea how to fix. There a group about chain reaction in .capx, forget other events because aren't related to chain reaction.


Would you help me?

Thanks!
You do not have the required permissions to view the files attached to this post.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Wed Aug 06, 2014 10:55 am

@R0J0hound

Sorry for bothering you, I've used your floodfill method, would you mind to help my problem?
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat Aug 09, 2014 6:36 pm

@Joannesalfa

You need to reset "picked" and "visited" to false every time before doing the floodfill. Doing it in event 13 works.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Sat Aug 09, 2014 8:38 pm

@R0J0hound Thanks, I'm testing it.

There another question, If you don't mind, I'm figuring out how to fall the bubbles if they aren't connected to top. Do you have better ideas?
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat Aug 09, 2014 8:45 pm

In the example i did before its just another floodfill. It's started by picking the top row gems, then a flood fill is done and anything that's not picked is not connected.
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Sun Aug 10, 2014 5:02 pm

@R0J0hound Sorry for late reply, I couldn't figure out, as you say to reset 2 booleans "picked" and "visited" I don't know how to put where, but, what's condition. I added False to picked and visited in event number 13 and it won't work.


I added "X Is picked" with falling movement action, the game starts to freeze due to loop, if this condition is separated, every games started to fall for no reason.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sun Aug 10, 2014 6:07 pm

I apologize I looked at it again and I misspoke, it should have been event 12.
https://dl.dropboxusercontent.com/u/542 ... inFix.capx
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Post » Sun Aug 10, 2014 7:43 pm

@R0J0hound No need to apologize, I appreciate your reply and help.

Actually, there a problem, I can't open your .capx due to missing .XML files inside, it's known bug if you make .caproj, then save as .capx and it doesn't save Layout folder.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sun Aug 10, 2014 8:09 pm

@R0J0hound Nevermind, I managed to fix your .capx, my old .capx has Layout folder inside, then I dragged into your .capx and it works!

It's working very well, now I would like to complete my doubt if you don't mind, I was worrying how to manage to fall the gems after of a chain reaction, other gems should go fall when aren't connected to gems.

This is example which is made by yourself, I'm looking a possible solution to set gray area to wide without using distance, imagine the top acts as source of connection, if other gems are disconnected to gray area, they should fall.

https://dl.dropboxusercontent.com/u/762 ... nnect.capx
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Mon Aug 11, 2014 8:30 pm

@Joannesalfa
For that one remove the "mark neighbors" call in event 5 and add another event right below:
tile y=32:
---- tile set marked to true
B
94
S
33
G
113
Posts: 5,353
Reputation: 73,267

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests