How do I stop a group from starting too soon?

Get help using Construct 2

Post » Fri Jun 13, 2014 8:46 pm

I have been working on a Match-3 game, thinking this will be a good way to learn Construct. I found a great tutorial on tutsplus and finished it and then added to it.

Now there's special candies and booster in my game. All of them work.

The problem comes when a level is successfully finished.

I have made a group for what happens when required scoring is done within given moves which triggers a pop-up congratulating the player.
Now the problem is that sometimes the pop-up comes out too soon . For example, sometimes, after the score is reached, matches keep on being made and new candies drop into place which make even more matches. The pop-up doesn't seem to take these new matches into account.

I am thinking of using recursive function but can't seem to make it work.
I also looked at WaitEvent plug-in but couldn't make it work either.

Please help.
B
5
Posts: 21
Reputation: 267

Post » Fri Jun 13, 2014 9:06 pm

If you are using Global or Instance variable, the "WAIT" will not work in the Action, Unless you use System-trigger once in the Condition.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Fri Jun 13, 2014 9:22 pm

Instead of using Wait, I am using audio tags (that play when a match is made and candies drop) to start the Pop-Up. It probably is all wron, but that seems to work but only if match is made once.

Image

Now sometimes matches and subsequent candy drop can happen for a while and that's where the game doesn't work anymore. Either the pop-up ignores the other matches or it takes every match as a new one and pop-up every single time.

This is really frustrating. I am ready to tear my hair out.
B
5
Posts: 21
Reputation: 267

Post » Fri Jun 13, 2014 10:07 pm

If you can make a sample capx, i will look at it.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Fri Jun 13, 2014 10:50 pm

Thank you so much for your offer. Will get back to you.
B
5
Posts: 21
Reputation: 267

Post » Sat Jun 14, 2014 1:19 pm

So this is my game so far. I have simplified the code a little, so only the basic functionality is there. The problem as always is when the game is successfully completed, the Pop-Up congratulating the player doesn't wait for the automatic matches to complete.

https://dl.dropboxusercontent.com/u/218196592/new.capx

Now adding a wait for 1 sec or 10 doesn't work because I can't know exactly how long to wait. Automatic matches could happen once, or 1 dozen times or never - there is no set number.


@ A0Nasser - Thank you again for offering to take a look at my problem.
B
5
Posts: 21
Reputation: 267

Post » Sat Jun 14, 2014 10:32 pm

You want to track when the Score finish updating.
Really i don't know right now how to do that.

What you can do, is stop generate blocks after the score reach 500.
If i got another solution i will update in this post.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155

Post » Sun Jun 15, 2014 1:53 am

Thanks for your reply. I'll try what you're saying about the score.
B
5
Posts: 21
Reputation: 267


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests