Math game

0 favourites
  • 12 posts
From the Asset Store
Math-A-Maze is a jigsaw puzzle game especially designed for children.
  • I would like to know how could I make it so that when I eat X fly ex.(4) that the number 4 appears below and then if I eat Y fly ex.(6) 6 appears right next to 4 with a + symbol indicating the kid that he is adding 6 to 4.

    All help will be greatly appreciated.

  • Give the fly an instance variable, then put up the number for the eaten fly's variable.

  • Could it be possible that you could be a little more specific or better yet edit the .capx accordingly?

    I understand I've already tried what you propose but it wasn't exactly working as desired because all of the textboxes ended up being the same number.

    If i ate 4 first the first box would be 4, and when I ate 5 afterwards both boxes would turn to 5.

  • sorry tried to assist but can't as you are using a SpriteFont plugin which I lack and will not be installing <img src="smileys/smiley13.gif" border="0" align="middle" />

    hopefully the official SpriteFont plugin will be created soon so then can use that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I removed the SpriteFont object, does it work now?

  • aroh

    does open will take look see what can find


    eat X fly ex.(4) that the number 4 appears below and then if I eat Y fly ex.(6) 6 appears right next to 4 with a + symbol indicating the kid that he is adding 6 to 4.


    Pic below to help

    What I see happening so far is there is the # (16) created randomly at beginning is what is needed and the gray circles become red based on the # on the fly hit with the tongue

    The number in yellow box (5) is the total of the flies the user has hit (4+1, 3+2)

    If I go over the number in blue box (16) I fail.

    <img src="" border="0" />


    Based on your description of what you want this is practically the opposite.

    Are you wanting the user to create own equation? or wantin predetermined #?

    please reply using DrGreenThumbCAN so can be notified

    I initially didn't because I couldn't assist you due to plugin incompatibility.

  • DrGreenThumbCAN

    I merely want the bottom text boxes to show the number of the fly you just ate in the order they were eaten, no changes to the current code whatsoever.

    If I ate fly #5 first then it appears in the first textbox which would be the one showing 0 in the picture.

    If I then ate fly #3 then the second textbox would show number 3.

    And so on.

  • aroh

    ok thanks for clarifying will try to implement this directly into your existing project if can't I'll make a comparable example so you can work it in your self how you wish

    work weekends so will do asap

    sorry if wait maybe someone can ninja it for you while I'm at work if need sooner

  • DrGreenThumbCAN

    Thanks I'll wait for your reply.

  • aroh

    • added texts into a family
    • add global variable hitCount - keeping track of # of bugs hit (start at 0 so can choose first instance in text family - because family indices are 0-based)
    • after each collision the textbox is chosen based on hitCount using Pick Family instance int(hitCount)
    • add value of bug ate to picked textbox
    • add 1 to hitCount so next bug's value is added to next textbox
    • on start of layout set hitCount to 0 so can restart Pick Family cycle of textboxes

    I've left in line comments also to hopefully help better understand


    added FPS text 25/06

  • DrGreenThumbCAN

    Thanks a lot!

    Is there a reason why the game runs so slow and feels heavy?

    Also, do you think it could be possible to make it so the tongue automatically retracts after eating a fly?

    All my attempts have been futile so far.

  • aroh

    to be honest I'm a Construct n00b

    I've added a FPS txt so if you redownload my capx example it'll have a FPS reading

    was testing it in firefox stayed around 45-60

    chrome worked for me well in beginning but then dipped to around 25-30 fps once it hits your wait function when get the correct ans or go over your goal. Maybe rather than use WAIT make a end level notice and set timescale = 0 so it pauses game and then have user hit R to restart or a dif button

    not sure exactly what mean by feels heavy?

    I haven't really experimented with C2 as much as I'd like yet

    real job and life gets in the way.

    As for the tongue retract just make addtl action when tongue hits fly to destroy tongue

    but with your coding right now unsure if that'd work

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