Math game

Get help using Construct 2

Post » Sun Jun 23, 2013 11:33 pm

@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


frogtestEDIT-R132

  • added FPS text 25/06
  • DrGreenThumbCAN2013-06-25 18:45:23
    B
    40
    S
    12
    G
    6
    Posts: 136
    Reputation: 6,347

    Post » Mon Jun 24, 2013 8:31 pm

    @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.
    B
    6
    S
    1
    G
    2
    Posts: 19
    Reputation: 1,717

    Post » Tue Jun 25, 2013 6:43 pm

    @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 workDrGreenThumbCAN2013-06-25 18:43:58
    B
    40
    S
    12
    G
    6
    Posts: 136
    Reputation: 6,347

    Previous

    Return to How do I....?

    Who is online

    Users browsing this forum: No registered users and 5 guests