Math Game - 2 issues

Discussion and feedback on Construct 2

Post » Wed Jun 29, 2016 11:37 am

Hi everybody

I am creating a simple math game, where the user needs to sum the bars, with different number of tiles, to match to the number draw by the game. I don't know how to solve two problems and for you understand which are, please, download this capx: https://www.dropbox.com/s/dyh8x6oed4qan ... .capx?dl=0

Issues:

- How to move the remaining bars down when the user removes a bar below?

- How to move the bar to the second column when its value is greater than the empty spaces in the first column and how to move this same bar to the first column when the user frees up spaces there, removing one or more bars.

Thanks in advance
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Wed Jun 29, 2016 1:17 pm

Sorry can't open the file due to plugin dependancy.

Use overlapping test (overlap at offset) to check wether there is a bar below it. When there is no bar, move it down respectively.

Moving a bar to next column is done by picking next bar after the current one. For example current column has UID 15 and right next to it has UID 16. So we just need to reference current active column UID (15) to the next (16) by add 1 (15+1) on instance variable. The rest would be reposition the bar itself to that column reference.
ImageImage
B
102
S
46
G
22
Posts: 772
Reputation: 21,593

Post » Wed Jun 29, 2016 1:20 pm

alextro wrote:Sorry can't open the file due to plugin dependancy.

Use overlapping test (overlap at offset) to check wether there is a bar below it. When there is no bar, move it down respectively.

Moving a bar to next column is done by picking next bar after the current one. For example current column has UID 15 and right next to it has UID 16. So we just need to reference current active column UID (15) to the next (16) by add 1 (15+1) on instance variable. The rest would be reposition the bar itself to that column reference.


Hi @alextro

Thanks for the reply. I'll remove the plugin and I will upload it again. I think it is better if you see the example to figure out my problem. Please, wait a few minutes. I will let you know when I have post the new capx, ok? Thanks in advance.
Last edited by RBuster on Wed Jun 29, 2016 1:47 pm, edited 1 time in total.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Wed Jun 29, 2016 1:31 pm

Hi @alextro

Here it goes:

https://www.dropbox.com/s/51cyeupoa07j4 ... .capx?dl=0

Thanks in advance for any help.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531

Post » Fri Jul 01, 2016 11:22 am

ImageImage
B
102
S
46
G
22
Posts: 772
Reputation: 21,593

Post » Fri Jul 01, 2016 11:35 am

Thank you @alextro

A simple and great solution.
B
74
S
13
G
3
Posts: 995
Reputation: 7,531


Return to Construct 2 General

Who is online

Users browsing this forum: jefftrier and 7 guests