Function and Array (Match-3 like game)

Get help using Construct 2

Post » Sun Mar 02, 2014 6:26 pm

https://docs.google.com/file/d/0B3iZ60F3QWxTWnJQb19EM3lmyZTA/edit - the capx.

Good day! Again, I'm stuck at this logic. As you can see, sometimes it work and correct blocks are destroyed, sometimes it work terrible , and sometimes it show message that stack is overloaded, but I don't see the reason, because there are no infinite recursions.

The logic have works as: when you touch block, it call function with it's position in array params and it's index param. Then, function go in 4 directions (up, down, left, right) with step = 1 and when it found the value it call same function but with current params (like recursion).
Last edited by Kurz on Wed Mar 05, 2014 12:38 pm, edited 2 times in total.
B
57
S
19
G
10
Posts: 191
Reputation: 9,606

Post » Tue Mar 04, 2014 8:30 am

Anyway, I'm find my mistake with overload stack (there was jumping away from array size)

But the logic still pick incorrect blocks. I really don't se the reason. It just compare frames. Please, look at the "ckeck" function

--------

solved
B
57
S
19
G
10
Posts: 191
Reputation: 9,606


Return to How do I....?

Who is online

Users browsing this forum: mrkaio, user5487, Zav and 2 guests