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

Get help using Construct 2

### » Mon Aug 11, 2014 9:56 pm

@R0J0hound Gotcha, good one! Thank you a lot, I will integrate this example to bubble shooter, I hope everything is fine.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,426

### » Mon Aug 18, 2014 11:15 pm

@R0J0hound

Hi again, I hope you are fine, actually I'm frustrated about chain reaction, I did 60 hours of playtest and I found something irregular I've created 2 gifs to understand you better.

1. Try to shoot in order target like that gif, sometimes when bubble is snapped, then execute a floodfill which is created by you, it's rarely ignored and won't do chain reaction.

2. Using snap which is from your older example about bubble shooter, sometimes to snap between the walls, it goes to out of window.

I was trying to figure out with some intentions but got no results, would you mind to help me again?
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,426

### » Tue Aug 19, 2014 7:15 am

For #1 are triggering a floodfill when just hitting a ceiling. It doesn't look like it is.

For #2 I've noticed the snapping doesn't seem right at times. The equations I used do what they were designed to do: find which square on a staggered grid to snap to.

I did a test to evaluate the equation.
https://dl.dropboxusercontent.com/u/542 ... p_hex.capx

The formula is about the same as in the bubble shooter capx I've made before. I also compared it to just picking the nearest grid sprite which would be perfect minus the need all the sprites. Anyway there are subtle differences in the gaps. My conclusion is a new formula needs to be found so that snapping isn't done to the nearest square but the nearest hexagon, which would mirror using picking nearest.

A internet search for "snap to hex grid" would probably be the next step.

After that the issue of snapping into walls or other jewels may still be there and require another solution.
B
97
S
36
G
131
Posts: 5,511
Reputation: 83,460

### » Tue Aug 19, 2014 9:07 am

@R0J0hound Sorry, I don't follow about your #1 as hitting a ceiling... with updated equation from your .capx, still same result.

There an group of events that are part of your floodfill that rarely ignores match 3 like the #1 gif.

More details about snap, also I've changed the snap equation from your .capx and I got same results:

Actually I don't think snap to hex grid isn't a big issue but chain reaction is, I had no idea implement to pick the nearest grid sprite but I did instead of On collision, it wouldn't work after all.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,426

### » Tue Aug 19, 2014 8:19 pm

@R0J0hound Actually, I've fixed first gif, I really don't want to waste your time, how I did fix about chain reaction was change action Set position detector to gems from While loop to For each and changed collision polygon, it worked to prevent irregular chain reaction.
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,426

### » Fri Dec 05, 2014 1:34 pm

@Joannesalfa care to share your capx? im having the same problem, and this is kinda complicated to read :/
B
38
S
10
G
9
Posts: 542
Reputation: 9,181

### » Thu Jan 22, 2015 3:11 am

Joannesalfa wrote:@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

how on earth did you do that?

Edit: Ok open the capx with winrar(or similar) and put the layout folder inside of the capx, then save and close.

neat way to fix broken capx.
B
9
S
2
Posts: 80
Reputation: 864

### » Thu Jan 22, 2015 3:28 am

now if I can just solve the issue I'm having with yours. Sometimes after clickstorming, the gems connect at an offset with a gap in between.
You do not have the required permissions to view the files attached to this post.
B
9
S
2
Posts: 80
Reputation: 864

Previous

Return to How do I....?

### Who is online

Users browsing this forum: No registered users and 10 guests