Math Game - 2 issues

  • 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

  • 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.

  • 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.

  • Hi alextro

    Here it goes:

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

    Thanks in advance for any help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you alextro

    A simple and great solution.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)